zkcloudworker 0.17.7 → 0.18.1

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 +6 -2
  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,18 +1,7 @@
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.BalanceChangeEvent = exports.BurnEvent = exports.MintEvent = exports.PauseEvent = exports.SetAdminEvent = exports.FungibleToken = exports.FungibleTokenErrors = void 0;
13
- const o1js_1 = require("o1js");
14
- const FungibleTokenAdmin_js_1 = require("./FungibleTokenAdmin.js");
15
- exports.FungibleTokenErrors = {
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { AccountUpdate, AccountUpdateForest, assert, Bool, Int64, method, Permissions, Provable, PublicKey, State, state, Struct, TokenContract, Types, UInt64, UInt8, VerificationKey, } from "o1js";
3
+ import { FungibleTokenAdmin, } from "./FungibleTokenAdmin.js";
4
+ export const FungibleTokenErrors = {
16
5
  noAdminKey: "could not fetch admin contract key",
17
6
  noPermissionToChangeAdmin: "Not allowed to change admin contract",
18
7
  tokenPaused: "Token is currently paused",
@@ -24,12 +13,12 @@ exports.FungibleTokenErrors = {
24
13
  flashMinting: "Flash-minting or unbalanced transaction detected. Please make sure that your transaction is balanced, and that your `AccountUpdate`s are ordered properly, so that tokens are not received before they are sent.",
25
14
  unbalancedTransaction: "Transaction is unbalanced",
26
15
  };
27
- class FungibleToken extends o1js_1.TokenContract {
16
+ export class FungibleToken extends TokenContract {
28
17
  constructor() {
29
18
  super(...arguments);
30
- this.decimals = (0, o1js_1.State)();
31
- this.admin = (0, o1js_1.State)();
32
- this.paused = (0, o1js_1.State)();
19
+ this.decimals = State();
20
+ this.admin = State();
21
+ this.paused = State();
33
22
  this.events = {
34
23
  SetAdmin: SetAdminEvent,
35
24
  Pause: PauseEvent,
@@ -40,14 +29,14 @@ class FungibleToken extends o1js_1.TokenContract {
40
29
  }
41
30
  async deploy(props) {
42
31
  await super.deploy(props);
43
- this.paused.set((0, o1js_1.Bool)(true));
32
+ this.paused.set(Bool(true));
44
33
  this.account.zkappUri.set(props.src);
45
34
  this.account.tokenSymbol.set(props.symbol);
46
35
  this.account.permissions.set({
47
- ...o1js_1.Permissions.default(),
48
- setVerificationKey: o1js_1.Permissions.VerificationKey.impossibleDuringCurrentVersion(),
49
- setPermissions: o1js_1.Permissions.impossible(),
50
- access: o1js_1.Permissions.proof(),
36
+ ...Permissions.default(),
37
+ setVerificationKey: Permissions.VerificationKey.impossibleDuringCurrentVersion(),
38
+ setPermissions: Permissions.impossible(),
39
+ access: Permissions.proof(),
51
40
  });
52
41
  }
53
42
  /** Update the verification key.
@@ -62,22 +51,22 @@ class FungibleToken extends o1js_1.TokenContract {
62
51
  * @argument {Bool} startPaused - if set to `Bool(true), the contract will start in a mode where token minting and transfers are paused. This should be used for non-atomic deployments
63
52
  */
64
53
  async initialize(admin, decimals, startPaused) {
65
- this.account.provedState.requireEquals((0, o1js_1.Bool)(false));
54
+ this.account.provedState.requireEquals(Bool(false));
66
55
  this.admin.set(admin);
67
56
  this.decimals.set(decimals);
68
- this.paused.set((0, o1js_1.Bool)(false));
57
+ this.paused.set(Bool(false));
69
58
  this.paused.set(startPaused);
70
- const accountUpdate = o1js_1.AccountUpdate.createSigned(this.address, this.deriveTokenId());
71
- let permissions = o1js_1.Permissions.default();
59
+ const accountUpdate = AccountUpdate.createSigned(this.address, this.deriveTokenId());
60
+ let permissions = Permissions.default();
72
61
  // This is necessary in order to allow token holders to burn.
73
- permissions.send = o1js_1.Permissions.none();
74
- permissions.setPermissions = o1js_1.Permissions.impossible();
62
+ permissions.send = Permissions.none();
63
+ permissions.setPermissions = Permissions.impossible();
75
64
  accountUpdate.account.permissions.set(permissions);
76
65
  }
77
66
  async getAdminContract() {
78
- const admin = await o1js_1.Provable.witnessAsync(o1js_1.PublicKey, async () => {
67
+ const admin = await Provable.witnessAsync(PublicKey, async () => {
79
68
  let pk = await this.admin.fetch();
80
- (0, o1js_1.assert)(pk !== undefined, exports.FungibleTokenErrors.noAdminKey);
69
+ assert(pk !== undefined, FungibleTokenErrors.noAdminKey);
81
70
  return pk;
82
71
  });
83
72
  this.admin.requireEquals(admin);
@@ -86,71 +75,71 @@ class FungibleToken extends o1js_1.TokenContract {
86
75
  async setAdmin(admin) {
87
76
  const adminContract = await this.getAdminContract();
88
77
  const canChangeAdmin = await adminContract.canChangeAdmin(admin);
89
- canChangeAdmin.assertTrue(exports.FungibleTokenErrors.noPermissionToChangeAdmin);
78
+ canChangeAdmin.assertTrue(FungibleTokenErrors.noPermissionToChangeAdmin);
90
79
  this.admin.set(admin);
91
80
  this.emitEvent("SetAdmin", new SetAdminEvent({ adminKey: admin }));
92
81
  }
93
82
  async mint(recipient, amount) {
94
83
  this.paused
95
84
  .getAndRequireEquals()
96
- .assertFalse(exports.FungibleTokenErrors.tokenPaused);
85
+ .assertFalse(FungibleTokenErrors.tokenPaused);
97
86
  const accountUpdate = this.internal.mint({ address: recipient, amount });
98
87
  const adminContract = await this.getAdminContract();
99
88
  const canMint = await adminContract.canMint(accountUpdate);
100
- canMint.assertTrue(exports.FungibleTokenErrors.noPermissionToMint);
89
+ canMint.assertTrue(FungibleTokenErrors.noPermissionToMint);
101
90
  recipient
102
91
  .equals(this.address)
103
- .assertFalse(exports.FungibleTokenErrors.noTransferFromCirculation);
92
+ .assertFalse(FungibleTokenErrors.noTransferFromCirculation);
104
93
  this.approve(accountUpdate);
105
94
  this.emitEvent("Mint", new MintEvent({ recipient, amount }));
106
- const circulationUpdate = o1js_1.AccountUpdate.create(this.address, this.deriveTokenId());
107
- circulationUpdate.balanceChange = o1js_1.Int64.fromUnsigned(amount);
95
+ const circulationUpdate = AccountUpdate.create(this.address, this.deriveTokenId());
96
+ circulationUpdate.balanceChange = Int64.fromUnsigned(amount);
108
97
  return accountUpdate;
109
98
  }
110
99
  async burn(from, amount) {
111
100
  this.paused
112
101
  .getAndRequireEquals()
113
- .assertFalse(exports.FungibleTokenErrors.tokenPaused);
102
+ .assertFalse(FungibleTokenErrors.tokenPaused);
114
103
  const accountUpdate = this.internal.burn({ address: from, amount });
115
- const circulationUpdate = o1js_1.AccountUpdate.create(this.address, this.deriveTokenId());
104
+ const circulationUpdate = AccountUpdate.create(this.address, this.deriveTokenId());
116
105
  from
117
106
  .equals(this.address)
118
- .assertFalse(exports.FungibleTokenErrors.noTransferFromCirculation);
119
- circulationUpdate.balanceChange = o1js_1.Int64.fromUnsigned(amount).neg();
107
+ .assertFalse(FungibleTokenErrors.noTransferFromCirculation);
108
+ circulationUpdate.balanceChange = Int64.fromUnsigned(amount).neg();
120
109
  this.emitEvent("Burn", new BurnEvent({ from, amount }));
121
110
  return accountUpdate;
122
111
  }
123
112
  async pause() {
124
113
  const adminContract = await this.getAdminContract();
125
114
  const canPause = await adminContract.canPause();
126
- canPause.assertTrue(exports.FungibleTokenErrors.noPermissionToPause);
127
- this.paused.set((0, o1js_1.Bool)(true));
128
- this.emitEvent("Pause", new PauseEvent({ isPaused: (0, o1js_1.Bool)(true) }));
115
+ canPause.assertTrue(FungibleTokenErrors.noPermissionToPause);
116
+ this.paused.set(Bool(true));
117
+ this.emitEvent("Pause", new PauseEvent({ isPaused: Bool(true) }));
129
118
  }
130
119
  async resume() {
131
120
  const adminContract = await this.getAdminContract();
132
121
  const canResume = await adminContract.canResume();
133
- canResume.assertTrue(exports.FungibleTokenErrors.noPermissionToResume);
134
- this.paused.set((0, o1js_1.Bool)(false));
135
- this.emitEvent("Pause", new PauseEvent({ isPaused: (0, o1js_1.Bool)(false) }));
122
+ canResume.assertTrue(FungibleTokenErrors.noPermissionToResume);
123
+ this.paused.set(Bool(false));
124
+ this.emitEvent("Pause", new PauseEvent({ isPaused: Bool(false) }));
136
125
  }
137
126
  async transfer(from, to, amount) {
138
127
  this.paused
139
128
  .getAndRequireEquals()
140
- .assertFalse(exports.FungibleTokenErrors.tokenPaused);
129
+ .assertFalse(FungibleTokenErrors.tokenPaused);
141
130
  from
142
131
  .equals(this.address)
143
- .assertFalse(exports.FungibleTokenErrors.noTransferFromCirculation);
144
- to.equals(this.address).assertFalse(exports.FungibleTokenErrors.noTransferFromCirculation);
132
+ .assertFalse(FungibleTokenErrors.noTransferFromCirculation);
133
+ to.equals(this.address).assertFalse(FungibleTokenErrors.noTransferFromCirculation);
145
134
  this.internal.send({ from, to, amount });
146
135
  }
147
136
  checkPermissionsUpdate(update) {
148
137
  let permissions = update.update.permissions;
149
138
  let { access, receive } = permissions.value;
150
- let accessIsNone = o1js_1.Provable.equal(o1js_1.Types.AuthRequired, access, o1js_1.Permissions.none());
151
- let receiveIsNone = o1js_1.Provable.equal(o1js_1.Types.AuthRequired, receive, o1js_1.Permissions.none());
139
+ let accessIsNone = Provable.equal(Types.AuthRequired, access, Permissions.none());
140
+ let receiveIsNone = Provable.equal(Types.AuthRequired, receive, Permissions.none());
152
141
  let updateAllowed = accessIsNone.and(receiveIsNone);
153
- (0, o1js_1.assert)(updateAllowed.or(permissions.isSome.not()), exports.FungibleTokenErrors.noPermissionChangeAllowed);
142
+ assert(updateAllowed.or(permissions.isSome.not()), FungibleTokenErrors.noPermissionChangeAllowed);
154
143
  }
155
144
  /** Approve `AccountUpdate`s that have been created outside of the token contract.
156
145
  *
@@ -159,8 +148,8 @@ class FungibleToken extends o1js_1.TokenContract {
159
148
  async approveBase(updates) {
160
149
  this.paused
161
150
  .getAndRequireEquals()
162
- .assertFalse(exports.FungibleTokenErrors.tokenPaused);
163
- let totalBalance = o1js_1.Int64.from(0);
151
+ .assertFalse(FungibleTokenErrors.tokenPaused);
152
+ let totalBalance = Int64.from(0);
164
153
  this.forEachUpdate(updates, (update, usesToken) => {
165
154
  // Make sure that the account permissions are not changed
166
155
  this.checkPermissionsUpdate(update);
@@ -172,14 +161,14 @@ class FungibleToken extends o1js_1.TokenContract {
172
161
  update.publicKey
173
162
  .equals(this.address)
174
163
  .and(usesToken)
175
- .assertFalse(exports.FungibleTokenErrors.noTransferFromCirculation);
176
- totalBalance = o1js_1.Provable.if(usesToken, totalBalance.add(update.balanceChange), totalBalance);
177
- totalBalance.isPositive().assertFalse(exports.FungibleTokenErrors.flashMinting);
164
+ .assertFalse(FungibleTokenErrors.noTransferFromCirculation);
165
+ totalBalance = Provable.if(usesToken, totalBalance.add(update.balanceChange), totalBalance);
166
+ totalBalance.isPositive().assertFalse(FungibleTokenErrors.flashMinting);
178
167
  });
179
- totalBalance.assertEquals(o1js_1.Int64.zero, exports.FungibleTokenErrors.unbalancedTransaction);
168
+ totalBalance.assertEquals(Int64.zero, FungibleTokenErrors.unbalancedTransaction);
180
169
  }
181
170
  async getBalanceOf(address) {
182
- const account = o1js_1.AccountUpdate.create(address, this.deriveTokenId()).account;
171
+ const account = AccountUpdate.create(address, this.deriveTokenId()).account;
183
172
  const balance = account.balance.get();
184
173
  account.balance.requireEquals(balance);
185
174
  return balance;
@@ -195,114 +184,109 @@ class FungibleToken extends o1js_1.TokenContract {
195
184
  return this.decimals.getAndRequireEquals();
196
185
  }
197
186
  }
198
- exports.FungibleToken = FungibleToken;
199
187
  // This defines the type of the contract that is used to control access to administrative actions.
200
188
  // If you want to have a custom contract, overwrite this by setting FungibleToken.AdminContract to
201
189
  // your own implementation of FungibleTokenAdminBase.
202
- FungibleToken.AdminContract = FungibleTokenAdmin_js_1.FungibleTokenAdmin;
190
+ FungibleToken.AdminContract = FungibleTokenAdmin;
203
191
  __decorate([
204
- (0, o1js_1.state)(o1js_1.UInt8),
192
+ state(UInt8),
205
193
  __metadata("design:type", Object)
206
194
  ], FungibleToken.prototype, "decimals", void 0);
207
195
  __decorate([
208
- (0, o1js_1.state)(o1js_1.PublicKey),
196
+ state(PublicKey),
209
197
  __metadata("design:type", Object)
210
198
  ], FungibleToken.prototype, "admin", void 0);
211
199
  __decorate([
212
- (0, o1js_1.state)(o1js_1.Bool),
200
+ state(Bool),
213
201
  __metadata("design:type", Object)
214
202
  ], FungibleToken.prototype, "paused", void 0);
215
203
  __decorate([
216
- o1js_1.method,
204
+ method,
217
205
  __metadata("design:type", Function),
218
- __metadata("design:paramtypes", [o1js_1.VerificationKey]),
206
+ __metadata("design:paramtypes", [VerificationKey]),
219
207
  __metadata("design:returntype", Promise)
220
208
  ], FungibleToken.prototype, "updateVerificationKey", null);
221
209
  __decorate([
222
- o1js_1.method,
210
+ method,
223
211
  __metadata("design:type", Function),
224
- __metadata("design:paramtypes", [o1js_1.PublicKey, o1js_1.UInt8, o1js_1.Bool]),
212
+ __metadata("design:paramtypes", [PublicKey, UInt8, Bool]),
225
213
  __metadata("design:returntype", Promise)
226
214
  ], FungibleToken.prototype, "initialize", null);
227
215
  __decorate([
228
- o1js_1.method,
216
+ method,
229
217
  __metadata("design:type", Function),
230
- __metadata("design:paramtypes", [o1js_1.PublicKey]),
218
+ __metadata("design:paramtypes", [PublicKey]),
231
219
  __metadata("design:returntype", Promise)
232
220
  ], FungibleToken.prototype, "setAdmin", null);
233
221
  __decorate([
234
- o1js_1.method.returns(o1js_1.AccountUpdate),
222
+ method.returns(AccountUpdate),
235
223
  __metadata("design:type", Function),
236
- __metadata("design:paramtypes", [o1js_1.PublicKey, o1js_1.UInt64]),
224
+ __metadata("design:paramtypes", [PublicKey, UInt64]),
237
225
  __metadata("design:returntype", Promise)
238
226
  ], FungibleToken.prototype, "mint", null);
239
227
  __decorate([
240
- o1js_1.method.returns(o1js_1.AccountUpdate),
228
+ method.returns(AccountUpdate),
241
229
  __metadata("design:type", Function),
242
- __metadata("design:paramtypes", [o1js_1.PublicKey, o1js_1.UInt64]),
230
+ __metadata("design:paramtypes", [PublicKey, UInt64]),
243
231
  __metadata("design:returntype", Promise)
244
232
  ], FungibleToken.prototype, "burn", null);
245
233
  __decorate([
246
- o1js_1.method,
234
+ method,
247
235
  __metadata("design:type", Function),
248
236
  __metadata("design:paramtypes", []),
249
237
  __metadata("design:returntype", Promise)
250
238
  ], FungibleToken.prototype, "pause", null);
251
239
  __decorate([
252
- o1js_1.method,
240
+ method,
253
241
  __metadata("design:type", Function),
254
242
  __metadata("design:paramtypes", []),
255
243
  __metadata("design:returntype", Promise)
256
244
  ], FungibleToken.prototype, "resume", null);
257
245
  __decorate([
258
- o1js_1.method,
246
+ method,
259
247
  __metadata("design:type", Function),
260
- __metadata("design:paramtypes", [o1js_1.PublicKey, o1js_1.PublicKey, o1js_1.UInt64]),
248
+ __metadata("design:paramtypes", [PublicKey, PublicKey, UInt64]),
261
249
  __metadata("design:returntype", Promise)
262
250
  ], FungibleToken.prototype, "transfer", null);
263
251
  __decorate([
264
- o1js_1.method,
252
+ method,
265
253
  __metadata("design:type", Function),
266
- __metadata("design:paramtypes", [o1js_1.AccountUpdateForest]),
254
+ __metadata("design:paramtypes", [AccountUpdateForest]),
267
255
  __metadata("design:returntype", Promise)
268
256
  ], FungibleToken.prototype, "approveBase", null);
269
257
  __decorate([
270
- o1js_1.method.returns(o1js_1.UInt64),
258
+ method.returns(UInt64),
271
259
  __metadata("design:type", Function),
272
- __metadata("design:paramtypes", [o1js_1.PublicKey]),
260
+ __metadata("design:paramtypes", [PublicKey]),
273
261
  __metadata("design:returntype", Promise)
274
262
  ], FungibleToken.prototype, "getBalanceOf", null);
275
263
  __decorate([
276
- o1js_1.method.returns(o1js_1.UInt8),
264
+ method.returns(UInt8),
277
265
  __metadata("design:type", Function),
278
266
  __metadata("design:paramtypes", []),
279
267
  __metadata("design:returntype", Promise)
280
268
  ], FungibleToken.prototype, "getDecimals", null);
281
- class SetAdminEvent extends (0, o1js_1.Struct)({
282
- adminKey: o1js_1.PublicKey,
269
+ export class SetAdminEvent extends Struct({
270
+ adminKey: PublicKey,
283
271
  }) {
284
272
  }
285
- exports.SetAdminEvent = SetAdminEvent;
286
- class PauseEvent extends (0, o1js_1.Struct)({
287
- isPaused: o1js_1.Bool,
273
+ export class PauseEvent extends Struct({
274
+ isPaused: Bool,
288
275
  }) {
289
276
  }
290
- exports.PauseEvent = PauseEvent;
291
- class MintEvent extends (0, o1js_1.Struct)({
292
- recipient: o1js_1.PublicKey,
293
- amount: o1js_1.UInt64,
277
+ export class MintEvent extends Struct({
278
+ recipient: PublicKey,
279
+ amount: UInt64,
294
280
  }) {
295
281
  }
296
- exports.MintEvent = MintEvent;
297
- class BurnEvent extends (0, o1js_1.Struct)({
298
- from: o1js_1.PublicKey,
299
- amount: o1js_1.UInt64,
282
+ export class BurnEvent extends Struct({
283
+ from: PublicKey,
284
+ amount: UInt64,
300
285
  }) {
301
286
  }
302
- exports.BurnEvent = BurnEvent;
303
- class BalanceChangeEvent extends (0, o1js_1.Struct)({
304
- address: o1js_1.PublicKey,
305
- amount: o1js_1.Int64,
287
+ export class BalanceChangeEvent extends Struct({
288
+ address: PublicKey,
289
+ amount: Int64,
306
290
  }) {
307
291
  }
308
- exports.BalanceChangeEvent = BalanceChangeEvent;
292
+ //# sourceMappingURL=FungibleToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FungibleToken.js","sourceRoot":"","sources":["../../../../../src/mina/token/FungibleToken.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,MAAM,EACN,IAAI,EAGJ,KAAK,EACL,MAAM,EACN,WAAW,EACX,QAAQ,EACR,SAAS,EACT,KAAK,EACL,KAAK,EAC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l
24
24
  */
25
25
  updateVerificationKey(vk: VerificationKey): Promise<void>;
26
26
  private ensureAdminSignature;
27
- canMint(_accountUpdate: AccountUpdate): Promise<import("o1js/dist/node/lib/provable/bool").Bool>;
28
- canChangeAdmin(_admin: PublicKey): Promise<import("o1js/dist/node/lib/provable/bool").Bool>;
27
+ canMint(_accountUpdate: AccountUpdate): Promise<import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool>;
28
+ canChangeAdmin(_admin: PublicKey): Promise<import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool>;
29
29
  canPause(): Promise<Bool>;
30
30
  canResume(): Promise<Bool>;
31
31
  }
@@ -1,16 +1,5 @@
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.FungibleTokenAdmin = void 0;
13
- const o1js_1 = require("o1js");
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { AccountUpdate, assert, Bool, method, Permissions, Provable, PublicKey, SmartContract, State, state, VerificationKey, } from "o1js";
14
3
  /** A contract that grants permissions for administrative actions on a token.
15
4
  *
16
5
  * We separate this out into a dedicated contract. That way, when issuing a token, a user can
@@ -19,18 +8,18 @@ const o1js_1 = require("o1js");
19
8
  * The advantage is that third party applications that only use the token in a non-privileged way
20
9
  * can integrate against the unchanged token contract.
21
10
  */
22
- class FungibleTokenAdmin extends o1js_1.SmartContract {
11
+ export class FungibleTokenAdmin extends SmartContract {
23
12
  constructor() {
24
13
  super(...arguments);
25
- this.adminPublicKey = (0, o1js_1.State)();
14
+ this.adminPublicKey = State();
26
15
  }
27
16
  async deploy(props) {
28
17
  await super.deploy(props);
29
18
  this.adminPublicKey.set(props.adminPublicKey);
30
19
  this.account.permissions.set({
31
- ...o1js_1.Permissions.default(),
32
- setVerificationKey: o1js_1.Permissions.VerificationKey.impossibleDuringCurrentVersion(),
33
- setPermissions: o1js_1.Permissions.impossible(),
20
+ ...Permissions.default(),
21
+ setVerificationKey: Permissions.VerificationKey.impossibleDuringCurrentVersion(),
22
+ setPermissions: Permissions.impossible(),
34
23
  });
35
24
  }
36
25
  /** Update the verification key.
@@ -40,63 +29,63 @@ class FungibleTokenAdmin extends o1js_1.SmartContract {
40
29
  this.account.verificationKey.set(vk);
41
30
  }
42
31
  async ensureAdminSignature() {
43
- const admin = await o1js_1.Provable.witnessAsync(o1js_1.PublicKey, async () => {
32
+ const admin = await Provable.witnessAsync(PublicKey, async () => {
44
33
  let pk = await this.adminPublicKey.fetch();
45
- (0, o1js_1.assert)(pk !== undefined, "could not fetch admin public key");
34
+ assert(pk !== undefined, "could not fetch admin public key");
46
35
  return pk;
47
36
  });
48
37
  this.adminPublicKey.requireEquals(admin);
49
- return o1js_1.AccountUpdate.createSigned(admin);
38
+ return AccountUpdate.createSigned(admin);
50
39
  }
51
40
  async canMint(_accountUpdate) {
52
41
  await this.ensureAdminSignature();
53
- return (0, o1js_1.Bool)(true);
42
+ return Bool(true);
54
43
  }
55
44
  async canChangeAdmin(_admin) {
56
45
  await this.ensureAdminSignature();
57
- return (0, o1js_1.Bool)(true);
46
+ return Bool(true);
58
47
  }
59
48
  async canPause() {
60
49
  await this.ensureAdminSignature();
61
- return (0, o1js_1.Bool)(true);
50
+ return Bool(true);
62
51
  }
63
52
  async canResume() {
64
53
  await this.ensureAdminSignature();
65
- return (0, o1js_1.Bool)(true);
54
+ return Bool(true);
66
55
  }
67
56
  }
68
- exports.FungibleTokenAdmin = FungibleTokenAdmin;
69
57
  __decorate([
70
- (0, o1js_1.state)(o1js_1.PublicKey),
58
+ state(PublicKey),
71
59
  __metadata("design:type", Object)
72
60
  ], FungibleTokenAdmin.prototype, "adminPublicKey", void 0);
73
61
  __decorate([
74
- o1js_1.method,
62
+ method,
75
63
  __metadata("design:type", Function),
76
- __metadata("design:paramtypes", [o1js_1.VerificationKey]),
64
+ __metadata("design:paramtypes", [VerificationKey]),
77
65
  __metadata("design:returntype", Promise)
78
66
  ], FungibleTokenAdmin.prototype, "updateVerificationKey", null);
79
67
  __decorate([
80
- o1js_1.method.returns(o1js_1.Bool),
68
+ method.returns(Bool),
81
69
  __metadata("design:type", Function),
82
- __metadata("design:paramtypes", [o1js_1.AccountUpdate]),
70
+ __metadata("design:paramtypes", [AccountUpdate]),
83
71
  __metadata("design:returntype", Promise)
84
72
  ], FungibleTokenAdmin.prototype, "canMint", null);
85
73
  __decorate([
86
- o1js_1.method.returns(o1js_1.Bool),
74
+ method.returns(Bool),
87
75
  __metadata("design:type", Function),
88
- __metadata("design:paramtypes", [o1js_1.PublicKey]),
76
+ __metadata("design:paramtypes", [PublicKey]),
89
77
  __metadata("design:returntype", Promise)
90
78
  ], FungibleTokenAdmin.prototype, "canChangeAdmin", null);
91
79
  __decorate([
92
- o1js_1.method.returns(o1js_1.Bool),
80
+ method.returns(Bool),
93
81
  __metadata("design:type", Function),
94
82
  __metadata("design:paramtypes", []),
95
83
  __metadata("design:returntype", Promise)
96
84
  ], FungibleTokenAdmin.prototype, "canPause", null);
97
85
  __decorate([
98
- o1js_1.method.returns(o1js_1.Bool),
86
+ method.returns(Bool),
99
87
  __metadata("design:type", Function),
100
88
  __metadata("design:paramtypes", []),
101
89
  __metadata("design:returntype", Promise)
102
90
  ], FungibleTokenAdmin.prototype, "canResume", null);
91
+ //# sourceMappingURL=FungibleTokenAdmin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"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K,CAAC,CAAC;QACzC,OAAO,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAGY,AAAN,KAAK,CAAC,OAAO,CAAC,cAA6B;QAChD,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAGY,AAAN,KAAK,CAAC,cAAc,CAAC,MAAiB;QAC3C,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAGY,AAAN,KAAK,CAAC,QAAQ;QACnB,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAGY,AAAN,KAAK,CAAC,SAAS;QACpB,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;CACF;AAtDS;IADP,KAAK,CAAC,SAAS,CAAC;;0DAC2B;AAiBtC;IADL,MAAM;;qCACyB,eAAe;;+DAE9C;AAaY;IADZ,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;;qCACgB,aAAa;;iDAGjD;AAGY;IADZ,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;;qCACe,SAAS;;wDAG5C;AAGY;IADZ,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;;;;kDAIpB;AAGY;IADZ,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;;;;mDAIpB"}
@@ -1,6 +1,6 @@
1
- import { blockchain, Cloud, JobStatus } from "../../cloud";
2
- import { zkCloudWorkerClient } from "../api/api";
3
- import { zkCloudWorker } from "../../cloud/worker";
1
+ import { blockchain, Cloud, JobStatus } from "../../cloud/index.js";
2
+ import { zkCloudWorkerClient } from "../api/api.js";
3
+ import { zkCloudWorker } from "../../cloud/worker/index.js";
4
4
  export interface FungibleTokenDeployParams {
5
5
  txType: "deploy";
6
6
  tokenAddress: string;
@@ -1,13 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TokenAPI = void 0;
4
- const api_1 = require("../api/api");
5
- class TokenAPI {
1
+ import { zkCloudWorkerClient } from "../api/api.js";
2
+ export class TokenAPI {
6
3
  constructor(params) {
7
4
  const { jwt, zkcloudworker, chain } = params;
8
5
  if (jwt === undefined)
9
6
  throw new Error("jwt is undefined");
10
- this.client = new api_1.zkCloudWorkerClient({
7
+ this.client = new zkCloudWorkerClient({
11
8
  jwt,
12
9
  chain,
13
10
  zkcloudworker,
@@ -104,4 +101,4 @@ class TokenAPI {
104
101
  }
105
102
  }
106
103
  }
107
- exports.TokenAPI = TokenAPI;
104
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../../src/mina/token/api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAmDpD,MAAM,OAAO,QAAQ;IAGnB,YAAY,MAIX;QACC,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QAC7C,IAAI,GAAG,KAAK,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAE3D,IAAI,CAAC,MAAM,GAAG,IAAI,mBAAmB,CAAC;YACpC,GAAG;YACH,KAAK;YACL,aAAa;SACd,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,qBAAqB,CACzB,MAAiC;QAEjC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAE1B,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAEpD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;YACvC,SAAS,EAAE,MAAM;YACj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J,IAAI,CAAC;gBACH,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBAC3D,IAAI,OAAO,KAAK,SAAS;oBACvB,OAAO;wBACL,OAAO,EAAE,KAAK;wBACd,EAAE;wBACF,IAAI;wBACJ,KAAK;wBACL,SAAS;qBACV,CAAC;gBACJ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;YACjD,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO;oBACL,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE,6BAA6B,SAAS,EAAE;iBAChD,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,6BAA6B,CAAC,EAAE,EAAE,CAAC;QACrE,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,5 @@
1
+ export * from "./FungibleToken.js";
2
+ export * from "./FungibleTokenAdmin.js";
3
+ export * from "./api.js";
4
+ export * from "./vk.js";
5
+ export * from "./whitelist.js";
@@ -0,0 +1,6 @@
1
+ export * from "./FungibleToken.js";
2
+ export * from "./FungibleTokenAdmin.js";
3
+ export * from "./api.js";
4
+ export * from "./vk.js";
5
+ export * from "./whitelist.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mina/token/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fungibleTokenVerificationKeys = void 0;
4
- exports.fungibleTokenVerificationKeys = {
1
+ export const fungibleTokenVerificationKeys = {
5
2
  testnet: {
6
3
  admin: {
7
4
  hash: "15958550144671703080408884627087990244648824766878280780120011347457437134053",
@@ -43,3 +40,4 @@ exports.fungibleTokenVerificationKeys = {
43
40
  },
44
41
  },
45
42
  };
43
+ //# sourceMappingURL=vk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vk.js","sourceRoot":"","sources":["../../../../../src/mina/token/vk.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,OAAO,EAAE;QACP,KAAK,EAAE;YACL,IAAI,EAAE,+EAA+E;YACrF,IAAI,EAAE,81EAA81E;SACr2E;QACD,KAAK,EAAE;YACL,IAAI,EAAE,+EAA+E;YACrF,IAAI,EAAE,81EAA81E;SACr2E;KACF;IACD,OAAO,EAAE;QACP,KAAK,EAAE;YACL,IAAI,EAAE,+EAA+E;YACrF,IAAI,EAAE,81EAA81E;SACr2E;QACD,KAAK,EAAE;YACL,IAAI,EAAE,+EAA+E;YACrF,IAAI,EAAE,81EAA81E;SACr2E;KACF;IACD,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,8EAA8E;YACpF,IAAI,EAAE,81EAA81E;SACr2E;QACD,KAAK,EAAE;YACL,IAAI,EAAE,+EAA+E;YACrF,IAAI,EAAE,81EAA81E;SACr2E;KACF;IACD,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,+EAA+E;YACrF,IAAI,EAAE,81EAA81E;SACr2E;QACD,KAAK,EAAE;YACL,IAAI,EAAE,+EAA+E;YACrF,IAAI,EAAE,81EAA81E;SACr2E;KACF;CACF,CAAC"}