@aptos-labs/ts-sdk 1.14.0-zeta.2 → 1.14.0-zeta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (435) hide show
  1. package/dist/common/chunk-KSEUZTKY.js +2 -0
  2. package/dist/common/chunk-KSEUZTKY.js.map +1 -0
  3. package/dist/common/cli/index.js +1 -245
  4. package/dist/common/cli/index.js.map +1 -1
  5. package/dist/common/index.d.ts +1 -1
  6. package/dist/common/index.js +390 -11802
  7. package/dist/common/index.js.map +1 -1
  8. package/dist/esm/account/Account.mjs +1 -55
  9. package/dist/esm/account/Ed25519Account.mjs +1 -53
  10. package/dist/esm/account/EphemeralKeyPair.mjs +1 -36
  11. package/dist/esm/account/KeylessAccount.mjs +1 -56
  12. package/dist/esm/account/MultiKeyAccount.mjs +1 -55
  13. package/dist/esm/account/SingleKeyAccount.mjs +1 -53
  14. package/dist/esm/account/index.mjs +1 -76
  15. package/dist/esm/api/account.mjs +1 -76
  16. package/dist/esm/api/ans.mjs +1 -87
  17. package/dist/esm/api/aptos.mjs +1 -116
  18. package/dist/esm/api/aptosConfig.mjs +1 -9
  19. package/dist/esm/api/coin.mjs +1 -86
  20. package/dist/esm/api/digitalAsset.mjs +1 -87
  21. package/dist/esm/api/event.mjs +1 -54
  22. package/dist/esm/api/faucet.mjs +1 -53
  23. package/dist/esm/api/fungibleAsset.mjs +1 -87
  24. package/dist/esm/api/general.mjs +1 -84
  25. package/dist/esm/api/index.mjs +1 -120
  26. package/dist/esm/api/keyless.mjs +1 -70
  27. package/dist/esm/api/staking.mjs +1 -54
  28. package/dist/esm/api/transaction.mjs +1 -94
  29. package/dist/esm/api/transactionSubmission/build.mjs +1 -85
  30. package/dist/esm/api/transactionSubmission/helpers.mjs +1 -9
  31. package/dist/esm/api/transactionSubmission/management.mjs +1 -89
  32. package/dist/esm/api/transactionSubmission/sign.mjs +1 -109
  33. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  34. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -86
  35. package/dist/esm/api/transactionSubmission/submit.mjs +1 -86
  36. package/dist/esm/api/utils.mjs +1 -34
  37. package/dist/esm/bcs/consts.mjs +1 -17
  38. package/dist/esm/bcs/deserializer.mjs +1 -8
  39. package/dist/esm/bcs/index.mjs +1 -57
  40. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -12
  41. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -11
  42. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -25
  43. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -18
  44. package/dist/esm/bcs/serializer.mjs +1 -18
  45. package/dist/esm/chunk-23MNZ5LZ.mjs +2 -0
  46. package/dist/esm/{chunk-RCQMWXEW.mjs.map → chunk-23MNZ5LZ.mjs.map} +1 -1
  47. package/dist/esm/chunk-24ZOKI52.mjs +2 -0
  48. package/dist/esm/{chunk-F2ZWA7B7.mjs.map → chunk-24ZOKI52.mjs.map} +1 -1
  49. package/dist/esm/chunk-25H3DXTL.mjs +2 -0
  50. package/dist/esm/{chunk-B5S6DDUD.mjs.map → chunk-25H3DXTL.mjs.map} +1 -1
  51. package/dist/esm/chunk-2ECWQRBB.mjs +2 -0
  52. package/dist/esm/{chunk-2OQW7BMN.mjs.map → chunk-2ECWQRBB.mjs.map} +1 -1
  53. package/dist/esm/chunk-2HD2G4AH.mjs +2 -0
  54. package/dist/esm/{chunk-Y2LV3S5W.mjs.map → chunk-2HD2G4AH.mjs.map} +1 -1
  55. package/dist/esm/chunk-3CMS2KOX.mjs +2 -0
  56. package/dist/esm/{chunk-NW45SCPY.mjs.map → chunk-3CMS2KOX.mjs.map} +1 -1
  57. package/dist/esm/chunk-3COVJN6Z.mjs +2 -0
  58. package/dist/esm/{chunk-2JOCR2VL.mjs.map → chunk-3COVJN6Z.mjs.map} +1 -1
  59. package/dist/esm/chunk-3CUVYW32.mjs +2 -0
  60. package/dist/esm/{chunk-DIYZRGR6.mjs.map → chunk-3CUVYW32.mjs.map} +1 -1
  61. package/dist/esm/chunk-3FVRXELT.mjs +2 -0
  62. package/dist/esm/{chunk-KK2BSALW.mjs.map → chunk-3FVRXELT.mjs.map} +1 -1
  63. package/dist/esm/chunk-3JPVQHOR.mjs +2 -0
  64. package/dist/esm/{chunk-GGMTQAQP.mjs.map → chunk-3JPVQHOR.mjs.map} +1 -1
  65. package/dist/esm/chunk-3S3GIUQY.mjs +2 -0
  66. package/dist/esm/{chunk-ASF2VWOX.mjs.map → chunk-3S3GIUQY.mjs.map} +1 -1
  67. package/dist/esm/chunk-3VGX3TXH.mjs +2 -0
  68. package/dist/esm/{chunk-7FO3S6IZ.mjs.map → chunk-3VGX3TXH.mjs.map} +1 -1
  69. package/dist/esm/chunk-56CNRT2K.mjs +2 -0
  70. package/dist/esm/{chunk-SBB4YEPT.mjs.map → chunk-56CNRT2K.mjs.map} +1 -1
  71. package/dist/esm/chunk-5XOFEQWC.mjs +2 -0
  72. package/dist/esm/{chunk-ATVFVXR6.mjs.map → chunk-5XOFEQWC.mjs.map} +1 -1
  73. package/dist/esm/chunk-6EMN3BOV.mjs +2 -0
  74. package/dist/esm/{chunk-SIJELMDP.mjs.map → chunk-6EMN3BOV.mjs.map} +1 -1
  75. package/dist/esm/chunk-6RBUXB5I.mjs +2 -0
  76. package/dist/esm/{chunk-WK5ZSNE2.mjs.map → chunk-6RBUXB5I.mjs.map} +1 -1
  77. package/dist/esm/chunk-6WIB3GGF.mjs +2 -0
  78. package/dist/esm/{chunk-CTJSZT5V.mjs.map → chunk-6WIB3GGF.mjs.map} +1 -1
  79. package/dist/esm/chunk-75J7H3XD.mjs +2 -0
  80. package/dist/esm/{chunk-GBEVD2VM.mjs.map → chunk-75J7H3XD.mjs.map} +1 -1
  81. package/dist/esm/chunk-7IMWGGA6.mjs +2 -0
  82. package/dist/esm/{chunk-UX5NSZEN.mjs.map → chunk-7IMWGGA6.mjs.map} +1 -1
  83. package/dist/esm/chunk-7KOC7VNK.mjs +2 -0
  84. package/dist/esm/{chunk-YYOPNUX5.mjs.map → chunk-7KOC7VNK.mjs.map} +1 -1
  85. package/dist/esm/chunk-7SIQDOYY.mjs +2 -0
  86. package/dist/esm/{chunk-ST4QXIMI.mjs.map → chunk-7SIQDOYY.mjs.map} +1 -1
  87. package/dist/esm/chunk-7STYQ5ZE.mjs +2 -0
  88. package/dist/esm/{chunk-UEBBLQJ5.mjs.map → chunk-7STYQ5ZE.mjs.map} +1 -1
  89. package/dist/esm/chunk-7XYECSW6.mjs +2 -0
  90. package/dist/esm/{chunk-GSVQ6EUD.mjs.map → chunk-7XYECSW6.mjs.map} +1 -1
  91. package/dist/esm/chunk-AH44UPM4.mjs +2 -0
  92. package/dist/esm/{chunk-EYHRMZPO.mjs.map → chunk-AH44UPM4.mjs.map} +1 -1
  93. package/dist/esm/chunk-AHNE2QA3.mjs +2 -0
  94. package/dist/esm/{chunk-WDRH2URB.mjs.map → chunk-AHNE2QA3.mjs.map} +1 -1
  95. package/dist/esm/chunk-AJ7UC2G3.mjs +2 -0
  96. package/dist/esm/{chunk-ZAHJ7KXB.mjs.map → chunk-AJ7UC2G3.mjs.map} +1 -1
  97. package/dist/esm/chunk-AOCNYMMX.mjs +2 -0
  98. package/dist/esm/{chunk-YV7M4CFP.mjs.map → chunk-AOCNYMMX.mjs.map} +1 -1
  99. package/dist/esm/chunk-BTLFW3YY.mjs +2 -0
  100. package/dist/esm/{chunk-2ZEGJU43.mjs.map → chunk-BTLFW3YY.mjs.map} +1 -1
  101. package/dist/esm/chunk-C3L4ETUF.mjs +2 -0
  102. package/dist/esm/{chunk-PIMQHG2J.mjs.map → chunk-C3L4ETUF.mjs.map} +1 -1
  103. package/dist/esm/chunk-CB6CNNM2.mjs +2 -0
  104. package/dist/esm/{chunk-VPWUODU4.mjs.map → chunk-CB6CNNM2.mjs.map} +1 -1
  105. package/dist/esm/chunk-CO53EOHE.mjs +2 -0
  106. package/dist/esm/{chunk-MZZLEY6O.mjs.map → chunk-CO53EOHE.mjs.map} +1 -1
  107. package/dist/esm/chunk-COW5IGYC.mjs +2 -0
  108. package/dist/esm/{chunk-FXKSE3ZP.mjs.map → chunk-COW5IGYC.mjs.map} +1 -1
  109. package/dist/esm/chunk-CS7B3FVO.mjs +2 -0
  110. package/dist/esm/{chunk-CXUGZXED.mjs.map → chunk-CS7B3FVO.mjs.map} +1 -1
  111. package/dist/esm/chunk-DD2VWOMZ.mjs +2 -0
  112. package/dist/esm/{chunk-55NODGHC.mjs.map → chunk-DD2VWOMZ.mjs.map} +1 -1
  113. package/dist/esm/chunk-EB7AI4B4.mjs +2 -0
  114. package/dist/esm/{chunk-AR7X6GWQ.mjs.map → chunk-EB7AI4B4.mjs.map} +1 -1
  115. package/dist/esm/chunk-FBPNHF54.mjs +2 -0
  116. package/dist/esm/{chunk-QMM2KL6C.mjs.map → chunk-FBPNHF54.mjs.map} +1 -1
  117. package/dist/esm/chunk-FLYEALDB.mjs +2 -0
  118. package/dist/esm/{chunk-76TSTAU4.mjs.map → chunk-FLYEALDB.mjs.map} +1 -1
  119. package/dist/esm/chunk-FVA2OPG4.mjs +2 -0
  120. package/dist/esm/chunk-GNNNICLW.mjs +2 -0
  121. package/dist/esm/{chunk-DGV7DYU4.mjs.map → chunk-GNNNICLW.mjs.map} +1 -1
  122. package/dist/esm/chunk-GQ6HIKZT.mjs +2 -0
  123. package/dist/esm/{chunk-NYL77J4X.mjs.map → chunk-GQ6HIKZT.mjs.map} +1 -1
  124. package/dist/esm/chunk-H62IKYXG.mjs +2 -0
  125. package/dist/esm/{chunk-QFOG4LIN.mjs.map → chunk-H62IKYXG.mjs.map} +1 -1
  126. package/dist/esm/chunk-HGZGTBA4.mjs +2 -0
  127. package/dist/esm/{chunk-PYLOAMR2.mjs.map → chunk-HGZGTBA4.mjs.map} +1 -1
  128. package/dist/esm/chunk-HHVAU5HU.mjs +2 -0
  129. package/dist/esm/{chunk-UKU6A2W2.mjs.map → chunk-HHVAU5HU.mjs.map} +1 -1
  130. package/dist/esm/chunk-HMFL7AOJ.mjs +2 -0
  131. package/dist/esm/{chunk-KMXSRHJ6.mjs.map → chunk-HMFL7AOJ.mjs.map} +1 -1
  132. package/dist/esm/chunk-HSFG2AIK.mjs +2 -0
  133. package/dist/esm/{chunk-HBNSRCZN.mjs.map → chunk-HSFG2AIK.mjs.map} +1 -1
  134. package/dist/esm/chunk-HYDDIAJ6.mjs +2 -0
  135. package/dist/esm/{chunk-IC56GQFJ.mjs.map → chunk-HYDDIAJ6.mjs.map} +1 -1
  136. package/dist/esm/chunk-HYU23YVP.mjs +2 -0
  137. package/dist/esm/{chunk-U3IUCR2G.mjs.map → chunk-HYU23YVP.mjs.map} +1 -1
  138. package/dist/esm/chunk-JLWKIYHV.mjs +2 -0
  139. package/dist/esm/{chunk-WHBWEN6N.mjs.map → chunk-JLWKIYHV.mjs.map} +1 -1
  140. package/dist/esm/chunk-JM2B5E2I.mjs +2 -0
  141. package/dist/esm/{chunk-CX3NAVRD.mjs.map → chunk-JM2B5E2I.mjs.map} +1 -1
  142. package/dist/esm/chunk-JM544NRW.mjs +2 -0
  143. package/dist/esm/{chunk-7REUIYF4.mjs.map → chunk-JM544NRW.mjs.map} +1 -1
  144. package/dist/esm/chunk-KMKSA7LM.mjs +2 -0
  145. package/dist/esm/{chunk-FF4JPDKD.mjs.map → chunk-KMKSA7LM.mjs.map} +1 -1
  146. package/dist/esm/chunk-L54P6EGN.mjs +2 -0
  147. package/dist/esm/{chunk-SS3NUM5L.mjs.map → chunk-L54P6EGN.mjs.map} +1 -1
  148. package/dist/esm/chunk-L5WUYZ35.mjs +2 -0
  149. package/dist/esm/{chunk-7FUHWL6A.mjs.map → chunk-L5WUYZ35.mjs.map} +1 -1
  150. package/dist/esm/chunk-LDQ6JFEF.mjs +2 -0
  151. package/dist/esm/{chunk-N4WKFNQ6.mjs.map → chunk-LDQ6JFEF.mjs.map} +1 -1
  152. package/dist/esm/chunk-LR65XHSF.mjs +2 -0
  153. package/dist/esm/{chunk-PU5AFUX3.mjs.map → chunk-LR65XHSF.mjs.map} +1 -1
  154. package/dist/esm/chunk-MGOHPDX4.mjs +2 -0
  155. package/dist/esm/{chunk-2TJJWII2.mjs.map → chunk-MGOHPDX4.mjs.map} +1 -1
  156. package/dist/esm/chunk-MOKAU77C.mjs +2 -0
  157. package/dist/esm/{chunk-IHNPN5CQ.mjs.map → chunk-MOKAU77C.mjs.map} +1 -1
  158. package/dist/esm/chunk-MWUJCP27.mjs +2 -0
  159. package/dist/esm/{chunk-6MSZMIFW.mjs.map → chunk-MWUJCP27.mjs.map} +1 -1
  160. package/dist/esm/chunk-N466X3S6.mjs +2 -0
  161. package/dist/esm/{chunk-WLTBF4DF.mjs.map → chunk-N466X3S6.mjs.map} +1 -1
  162. package/dist/esm/chunk-NBEXLW7P.mjs +2 -0
  163. package/dist/esm/{chunk-D2BVBXWO.mjs.map → chunk-NBEXLW7P.mjs.map} +1 -1
  164. package/dist/esm/chunk-NC5HHEEM.mjs +2 -0
  165. package/dist/esm/{chunk-XANFAUBD.mjs.map → chunk-NC5HHEEM.mjs.map} +1 -1
  166. package/dist/esm/chunk-O3PLAAN7.mjs +2 -0
  167. package/dist/esm/{chunk-LLLQJWRZ.mjs.map → chunk-O3PLAAN7.mjs.map} +1 -1
  168. package/dist/esm/chunk-P2WALKSW.mjs +2 -0
  169. package/dist/esm/{chunk-O6PSHSN3.mjs.map → chunk-P2WALKSW.mjs.map} +1 -1
  170. package/dist/esm/chunk-P7JMD7KZ.mjs +2 -0
  171. package/dist/esm/{chunk-TBHU6ZW6.mjs.map → chunk-P7JMD7KZ.mjs.map} +1 -1
  172. package/dist/esm/chunk-PFFAQZHT.mjs +2 -0
  173. package/dist/esm/{chunk-DNPMS2OF.mjs.map → chunk-PFFAQZHT.mjs.map} +1 -1
  174. package/dist/esm/chunk-PGCBIU33.mjs +2 -0
  175. package/dist/esm/{chunk-4OYYOYSO.mjs.map → chunk-PGCBIU33.mjs.map} +1 -1
  176. package/dist/esm/chunk-PMPTAPM3.mjs +2 -0
  177. package/dist/esm/{chunk-DVPQGCFT.mjs.map → chunk-PMPTAPM3.mjs.map} +1 -1
  178. package/dist/esm/chunk-PYUWGGAW.mjs +2 -0
  179. package/dist/esm/chunk-PYUWGGAW.mjs.map +1 -0
  180. package/dist/esm/chunk-R52BRP36.mjs +2 -0
  181. package/dist/esm/{chunk-BXMHDQHW.mjs.map → chunk-R52BRP36.mjs.map} +1 -1
  182. package/dist/esm/chunk-RKHPXZM6.mjs +2 -0
  183. package/dist/esm/{chunk-PCLNX6FS.mjs.map → chunk-RKHPXZM6.mjs.map} +1 -1
  184. package/dist/esm/chunk-RKTM5GBP.mjs +2 -0
  185. package/dist/esm/{chunk-LI2QV6RU.mjs.map → chunk-RKTM5GBP.mjs.map} +1 -1
  186. package/dist/esm/{chunk-4PJ5FYGQ.mjs → chunk-S4SEFF4K.mjs} +27 -302
  187. package/dist/esm/{chunk-4PJ5FYGQ.mjs.map → chunk-S4SEFF4K.mjs.map} +1 -1
  188. package/dist/esm/chunk-SI7MPP6G.mjs +2 -0
  189. package/dist/esm/{chunk-RX4VG2AT.mjs.map → chunk-SI7MPP6G.mjs.map} +1 -1
  190. package/dist/esm/chunk-SLI3KELH.mjs +2 -0
  191. package/dist/esm/{chunk-7IDBB4J4.mjs.map → chunk-SLI3KELH.mjs.map} +1 -1
  192. package/dist/esm/chunk-STYDBDYL.mjs +2 -0
  193. package/dist/esm/{chunk-FDWJNY4U.mjs.map → chunk-STYDBDYL.mjs.map} +1 -1
  194. package/dist/esm/chunk-T23OVRNF.mjs +2 -0
  195. package/dist/esm/{chunk-CMNJG4NN.mjs.map → chunk-T23OVRNF.mjs.map} +1 -1
  196. package/dist/esm/chunk-TE3WIJ26.mjs +2 -0
  197. package/dist/esm/{chunk-CC4DQ6NH.mjs.map → chunk-TE3WIJ26.mjs.map} +1 -1
  198. package/dist/esm/chunk-TICM455H.mjs +2 -0
  199. package/dist/esm/{chunk-ZMFKQUHL.mjs.map → chunk-TICM455H.mjs.map} +1 -1
  200. package/dist/esm/chunk-TJDC5PWD.mjs +2 -0
  201. package/dist/esm/{chunk-NMKCJNQM.mjs.map → chunk-TJDC5PWD.mjs.map} +1 -1
  202. package/dist/esm/chunk-TVRJ3M7B.mjs +2 -0
  203. package/dist/esm/{chunk-FQQW55X7.mjs.map → chunk-TVRJ3M7B.mjs.map} +1 -1
  204. package/dist/esm/chunk-U5C2PXC6.mjs +2 -0
  205. package/dist/esm/{chunk-WVGO4D7K.mjs.map → chunk-U5C2PXC6.mjs.map} +1 -1
  206. package/dist/esm/chunk-U6Z4FNB7.mjs +2 -0
  207. package/dist/esm/{chunk-AC3OGAL6.mjs.map → chunk-U6Z4FNB7.mjs.map} +1 -1
  208. package/dist/esm/chunk-UTXJOB3O.mjs +2 -0
  209. package/dist/esm/{chunk-QBBTUC66.mjs.map → chunk-UTXJOB3O.mjs.map} +1 -1
  210. package/dist/esm/chunk-VL6EYA53.mjs +2 -0
  211. package/dist/esm/{chunk-VZQXLVEP.mjs.map → chunk-VL6EYA53.mjs.map} +1 -1
  212. package/dist/esm/chunk-VPKPQBKL.mjs +2 -0
  213. package/dist/esm/{chunk-6LRQSBRH.mjs.map → chunk-VPKPQBKL.mjs.map} +1 -1
  214. package/dist/esm/chunk-VSD2AWUR.mjs +2 -0
  215. package/dist/esm/chunk-VSD2AWUR.mjs.map +1 -0
  216. package/dist/esm/chunk-VT6XJSRO.mjs +2 -0
  217. package/dist/esm/{chunk-7JRMOHBP.mjs.map → chunk-VT6XJSRO.mjs.map} +1 -1
  218. package/dist/esm/chunk-WM2NCYZL.mjs +2 -0
  219. package/dist/esm/{chunk-VKJQORON.mjs.map → chunk-WM2NCYZL.mjs.map} +1 -1
  220. package/dist/esm/chunk-WWGROAKX.mjs +2 -0
  221. package/dist/esm/{chunk-W76MGKZB.mjs.map → chunk-WWGROAKX.mjs.map} +1 -1
  222. package/dist/esm/chunk-XZGQMZ2H.mjs +2 -0
  223. package/dist/esm/{chunk-VJP2VWMF.mjs.map → chunk-XZGQMZ2H.mjs.map} +1 -1
  224. package/dist/esm/chunk-Y33CIIZX.mjs +2 -0
  225. package/dist/esm/{chunk-JHDHNGJ3.mjs.map → chunk-Y33CIIZX.mjs.map} +1 -1
  226. package/dist/esm/chunk-Y4SSUCPJ.mjs +2 -0
  227. package/dist/esm/{chunk-VDJBDX3A.mjs.map → chunk-Y4SSUCPJ.mjs.map} +1 -1
  228. package/dist/esm/chunk-YE5B2S5L.mjs +2 -0
  229. package/dist/esm/{chunk-NFJCQRVK.mjs.map → chunk-YE5B2S5L.mjs.map} +1 -1
  230. package/dist/esm/chunk-YGOJYDJA.mjs +2 -0
  231. package/dist/esm/{chunk-LYK4TQZO.mjs.map → chunk-YGOJYDJA.mjs.map} +1 -1
  232. package/dist/esm/chunk-YNNPWCF6.mjs +2 -0
  233. package/dist/esm/{chunk-NXFO2W4G.mjs.map → chunk-YNNPWCF6.mjs.map} +1 -1
  234. package/dist/esm/chunk-YV7OBLK2.mjs +2 -0
  235. package/dist/esm/{chunk-TLNHRJB2.mjs.map → chunk-YV7OBLK2.mjs.map} +1 -1
  236. package/dist/esm/chunk-ZKRG4C4U.mjs +2 -0
  237. package/dist/esm/{chunk-LYMY63SO.mjs.map → chunk-ZKRG4C4U.mjs.map} +1 -1
  238. package/dist/esm/chunk-ZNEBMSNC.mjs +2 -0
  239. package/dist/esm/{chunk-JL2JHVS4.mjs.map → chunk-ZNEBMSNC.mjs.map} +1 -1
  240. package/dist/esm/chunk-ZPMS2Q37.mjs +2 -0
  241. package/dist/esm/{chunk-KVSQ57HU.mjs.map → chunk-ZPMS2Q37.mjs.map} +1 -1
  242. package/dist/esm/cli/index.mjs +1 -12
  243. package/dist/esm/cli/localNode.mjs +1 -8
  244. package/dist/esm/cli/move.mjs +1 -7
  245. package/dist/esm/client/core.mjs +1 -27
  246. package/dist/esm/client/get.mjs +1 -32
  247. package/dist/esm/client/index.mjs +1 -55
  248. package/dist/esm/client/post.mjs +1 -36
  249. package/dist/esm/client/types.mjs +1 -7
  250. package/dist/esm/core/account/index.mjs +1 -19
  251. package/dist/esm/core/account/utils/address.mjs +1 -18
  252. package/dist/esm/core/account/utils/index.mjs +1 -19
  253. package/dist/esm/core/accountAddress.mjs +1 -15
  254. package/dist/esm/core/authenticationKey.mjs +1 -14
  255. package/dist/esm/core/common.mjs +1 -7
  256. package/dist/esm/core/crypto/ed25519.mjs +1 -29
  257. package/dist/esm/core/crypto/ephemeral.mjs +1 -28
  258. package/dist/esm/core/crypto/hdKey.mjs +1 -25
  259. package/dist/esm/core/crypto/index.mjs +1 -124
  260. package/dist/esm/core/crypto/keyless.mjs +1 -55
  261. package/dist/esm/core/crypto/multiEd25519.mjs +1 -28
  262. package/dist/esm/core/crypto/multiKey.mjs +1 -34
  263. package/dist/esm/core/crypto/poseidon.mjs +1 -15
  264. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  265. package/dist/esm/core/crypto/proof.mjs +1 -19
  266. package/dist/esm/core/crypto/publicKey.mjs +1 -21
  267. package/dist/esm/core/crypto/secp256k1.mjs +1 -27
  268. package/dist/esm/core/crypto/signature.mjs +1 -19
  269. package/dist/esm/core/crypto/singleKey.mjs +1 -33
  270. package/dist/esm/core/crypto/utils.mjs +1 -9
  271. package/dist/esm/core/hex.mjs +1 -10
  272. package/dist/esm/core/index.mjs +1 -141
  273. package/dist/esm/index.mjs +1 -635
  274. package/dist/esm/internal/account.mjs +1 -106
  275. package/dist/esm/internal/ans.mjs +1 -120
  276. package/dist/esm/internal/coin.mjs +1 -85
  277. package/dist/esm/internal/digitalAsset.mjs +1 -127
  278. package/dist/esm/internal/event.mjs +1 -55
  279. package/dist/esm/internal/faucet.mjs +1 -52
  280. package/dist/esm/internal/fungibleAsset.mjs +1 -91
  281. package/dist/esm/internal/general.mjs +1 -46
  282. package/dist/esm/internal/keyless.mjs +1 -73
  283. package/dist/esm/internal/staking.mjs +1 -53
  284. package/dist/esm/internal/transaction.mjs +1 -51
  285. package/dist/esm/internal/transactionSubmission.mjs +1 -102
  286. package/dist/esm/internal/view.mjs +1 -83
  287. package/dist/esm/transactions/authenticator/account.mjs +1 -44
  288. package/dist/esm/transactions/authenticator/index.mjs +1 -60
  289. package/dist/esm/transactions/authenticator/transaction.mjs +1 -48
  290. package/dist/esm/transactions/index.mjs +1 -284
  291. package/dist/esm/transactions/instances/chainId.mjs +1 -11
  292. package/dist/esm/transactions/instances/identifier.mjs +1 -11
  293. package/dist/esm/transactions/instances/index.mjs +1 -96
  294. package/dist/esm/transactions/instances/moduleId.mjs +1 -38
  295. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -43
  296. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -48
  297. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -20
  298. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -45
  299. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -43
  300. package/dist/esm/transactions/instances/transactionArgument.mjs +1 -1
  301. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -56
  302. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -74
  303. package/dist/esm/transactions/management/asyncQueue.mjs +1 -9
  304. package/dist/esm/transactions/management/index.mjs +1 -95
  305. package/dist/esm/transactions/management/transactionWorker.mjs +1 -91
  306. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -75
  307. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -162
  308. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -85
  309. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -58
  310. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +1 -1
  311. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -98
  312. package/dist/esm/transactions/typeTag/index.mjs +1 -74
  313. package/dist/esm/transactions/typeTag/parser.mjs +1 -43
  314. package/dist/esm/transactions/types.mjs +1 -1
  315. package/dist/esm/types/generated/queries.mjs +1 -57
  316. package/dist/esm/types/generated/types.mjs +1 -809
  317. package/dist/esm/types/generated/types.mjs.map +1 -1
  318. package/dist/esm/types/index.mjs +1 -68
  319. package/dist/esm/types/indexer.mjs +1 -1
  320. package/dist/esm/types/keyless.mjs +1 -9
  321. package/dist/esm/utils/apiEndpoints.mjs +1 -21
  322. package/dist/esm/utils/const.mjs +1 -21
  323. package/dist/esm/utils/helpers.mjs +1 -7
  324. package/dist/esm/utils/index.mjs +1 -56
  325. package/dist/esm/utils/memoize.mjs +1 -9
  326. package/dist/esm/utils/normalizeBundle.mjs +1 -19
  327. package/dist/esm/version.d.mts +1 -1
  328. package/dist/esm/version.mjs +1 -7
  329. package/package.json +2 -2
  330. package/src/account/KeylessAccount.ts +1 -2
  331. package/src/transactions/transactionBuilder/transactionBuilder.ts +16 -2
  332. package/src/version.ts +1 -1
  333. package/dist/common/chunk-QRI7EC4T.js +0 -24
  334. package/dist/common/chunk-QRI7EC4T.js.map +0 -1
  335. package/dist/esm/chunk-2JOCR2VL.mjs +0 -32
  336. package/dist/esm/chunk-2OQW7BMN.mjs +0 -129
  337. package/dist/esm/chunk-2TJJWII2.mjs +0 -23
  338. package/dist/esm/chunk-2ZEGJU43.mjs +0 -252
  339. package/dist/esm/chunk-4OYYOYSO.mjs +0 -336
  340. package/dist/esm/chunk-55NODGHC.mjs +0 -135
  341. package/dist/esm/chunk-6LRQSBRH.mjs +0 -130
  342. package/dist/esm/chunk-6MSZMIFW.mjs +0 -23
  343. package/dist/esm/chunk-76TSTAU4.mjs +0 -120
  344. package/dist/esm/chunk-7FO3S6IZ.mjs +0 -324
  345. package/dist/esm/chunk-7FUHWL6A.mjs +0 -42
  346. package/dist/esm/chunk-7IDBB4J4.mjs +0 -33
  347. package/dist/esm/chunk-7JRMOHBP.mjs +0 -247
  348. package/dist/esm/chunk-7REUIYF4.mjs +0 -63
  349. package/dist/esm/chunk-AC3OGAL6.mjs +0 -87
  350. package/dist/esm/chunk-AR7X6GWQ.mjs +0 -356
  351. package/dist/esm/chunk-ASF2VWOX.mjs +0 -142
  352. package/dist/esm/chunk-ATVFVXR6.mjs +0 -43
  353. package/dist/esm/chunk-B5S6DDUD.mjs +0 -120
  354. package/dist/esm/chunk-BXMHDQHW.mjs +0 -512
  355. package/dist/esm/chunk-CC4DQ6NH.mjs +0 -19
  356. package/dist/esm/chunk-CMNJG4NN.mjs +0 -345
  357. package/dist/esm/chunk-CTJSZT5V.mjs +0 -87
  358. package/dist/esm/chunk-CX3NAVRD.mjs +0 -205
  359. package/dist/esm/chunk-CXUGZXED.mjs +0 -307
  360. package/dist/esm/chunk-D2BVBXWO.mjs +0 -7
  361. package/dist/esm/chunk-DGV7DYU4.mjs +0 -413
  362. package/dist/esm/chunk-DIYZRGR6.mjs +0 -242
  363. package/dist/esm/chunk-DNPMS2OF.mjs +0 -236
  364. package/dist/esm/chunk-DVPQGCFT.mjs +0 -74
  365. package/dist/esm/chunk-EYHRMZPO.mjs +0 -34
  366. package/dist/esm/chunk-F2ZWA7B7.mjs +0 -412
  367. package/dist/esm/chunk-FDWJNY4U.mjs +0 -22
  368. package/dist/esm/chunk-FF4JPDKD.mjs +0 -315
  369. package/dist/esm/chunk-FQQW55X7.mjs +0 -288
  370. package/dist/esm/chunk-FXKSE3ZP.mjs +0 -25
  371. package/dist/esm/chunk-GBEVD2VM.mjs +0 -99
  372. package/dist/esm/chunk-GGMTQAQP.mjs +0 -11
  373. package/dist/esm/chunk-GSVQ6EUD.mjs +0 -649
  374. package/dist/esm/chunk-HBNSRCZN.mjs +0 -100
  375. package/dist/esm/chunk-IC56GQFJ.mjs +0 -127
  376. package/dist/esm/chunk-IHNPN5CQ.mjs +0 -256
  377. package/dist/esm/chunk-JHDHNGJ3.mjs +0 -126
  378. package/dist/esm/chunk-JL2JHVS4.mjs +0 -49
  379. package/dist/esm/chunk-JV3GSIJW.mjs +0 -268
  380. package/dist/esm/chunk-JV3GSIJW.mjs.map +0 -1
  381. package/dist/esm/chunk-KK2BSALW.mjs +0 -32
  382. package/dist/esm/chunk-KMXSRHJ6.mjs +0 -93
  383. package/dist/esm/chunk-KVSQ57HU.mjs +0 -45
  384. package/dist/esm/chunk-LI2QV6RU.mjs +0 -129
  385. package/dist/esm/chunk-LLLQJWRZ.mjs +0 -35
  386. package/dist/esm/chunk-LYK4TQZO.mjs +0 -70
  387. package/dist/esm/chunk-LYMY63SO.mjs +0 -124
  388. package/dist/esm/chunk-MZZLEY6O.mjs +0 -92
  389. package/dist/esm/chunk-N4WKFNQ6.mjs +0 -156
  390. package/dist/esm/chunk-NFJCQRVK.mjs +0 -37
  391. package/dist/esm/chunk-NMKCJNQM.mjs +0 -20
  392. package/dist/esm/chunk-NW45SCPY.mjs +0 -36
  393. package/dist/esm/chunk-NXFO2W4G.mjs +0 -84
  394. package/dist/esm/chunk-NYL77J4X.mjs +0 -97
  395. package/dist/esm/chunk-O6PSHSN3.mjs +0 -53
  396. package/dist/esm/chunk-OR7TEZ25.mjs +0 -16
  397. package/dist/esm/chunk-PCLNX6FS.mjs +0 -17
  398. package/dist/esm/chunk-PIMQHG2J.mjs +0 -49
  399. package/dist/esm/chunk-PU5AFUX3.mjs +0 -52
  400. package/dist/esm/chunk-PYLOAMR2.mjs +0 -29
  401. package/dist/esm/chunk-QBBTUC66.mjs +0 -15
  402. package/dist/esm/chunk-QFOG4LIN.mjs +0 -319
  403. package/dist/esm/chunk-QMM2KL6C.mjs +0 -12
  404. package/dist/esm/chunk-RCQMWXEW.mjs +0 -35
  405. package/dist/esm/chunk-RX4VG2AT.mjs +0 -314
  406. package/dist/esm/chunk-SBB4YEPT.mjs +0 -17
  407. package/dist/esm/chunk-SIJELMDP.mjs +0 -29
  408. package/dist/esm/chunk-SS3NUM5L.mjs +0 -94
  409. package/dist/esm/chunk-ST4QXIMI.mjs +0 -37
  410. package/dist/esm/chunk-TBHU6ZW6.mjs +0 -215
  411. package/dist/esm/chunk-TLNHRJB2.mjs +0 -155
  412. package/dist/esm/chunk-U3IUCR2G.mjs +0 -54
  413. package/dist/esm/chunk-U7QBZ6PP.mjs +0 -400
  414. package/dist/esm/chunk-U7QBZ6PP.mjs.map +0 -1
  415. package/dist/esm/chunk-UEBBLQJ5.mjs +0 -94
  416. package/dist/esm/chunk-UKU6A2W2.mjs +0 -232
  417. package/dist/esm/chunk-UX5NSZEN.mjs +0 -134
  418. package/dist/esm/chunk-VDJBDX3A.mjs +0 -79
  419. package/dist/esm/chunk-VJP2VWMF.mjs +0 -58
  420. package/dist/esm/chunk-VKJQORON.mjs +0 -93
  421. package/dist/esm/chunk-VPWUODU4.mjs +0 -51
  422. package/dist/esm/chunk-VZQXLVEP.mjs +0 -197
  423. package/dist/esm/chunk-W76MGKZB.mjs +0 -33
  424. package/dist/esm/chunk-WDRH2URB.mjs +0 -91
  425. package/dist/esm/chunk-WHBWEN6N.mjs +0 -206
  426. package/dist/esm/chunk-WK5ZSNE2.mjs +0 -173
  427. package/dist/esm/chunk-WLTBF4DF.mjs +0 -22
  428. package/dist/esm/chunk-WVGO4D7K.mjs +0 -254
  429. package/dist/esm/chunk-XANFAUBD.mjs +0 -44
  430. package/dist/esm/chunk-Y2LV3S5W.mjs +0 -410
  431. package/dist/esm/chunk-YV7M4CFP.mjs +0 -137
  432. package/dist/esm/chunk-YYOPNUX5.mjs +0 -41
  433. package/dist/esm/chunk-ZAHJ7KXB.mjs +0 -81
  434. package/dist/esm/chunk-ZMFKQUHL.mjs +0 -117
  435. /package/dist/esm/{chunk-OR7TEZ25.mjs.map → chunk-FVA2OPG4.mjs.map} +0 -0
@@ -1,87 +0,0 @@
1
- // src/transactions/management/asyncQueue.ts
2
- var AsyncQueue = class {
3
- constructor() {
4
- this.queue = [];
5
- // The pendingDequeue is used to handle the resolution of promises when items are enqueued and dequeued.
6
- this.pendingDequeue = [];
7
- this.cancelled = false;
8
- }
9
- /**
10
- * The enqueue method adds an item to the queue. If there are pending dequeued promises,
11
- * in the pendingDequeue, it resolves the oldest promise with the enqueued item immediately.
12
- * Otherwise, it adds the item to the queue.
13
- *
14
- * @param item T
15
- */
16
- enqueue(item) {
17
- this.cancelled = false;
18
- if (this.pendingDequeue.length > 0) {
19
- const promise = this.pendingDequeue.shift();
20
- promise?.resolve(item);
21
- return;
22
- }
23
- this.queue.push(item);
24
- }
25
- /**
26
- * The dequeue method returns a promise that resolves to the next item in the queue.
27
- * If the queue is not empty, it resolves the promise immediately with the next item.
28
- * Otherwise, it creates a new promise. The promise's resolve function is stored
29
- * in the pendingDequeue with a unique counter value as the key.
30
- * The newly created promise is then returned, and it will be resolved later when an item is enqueued.
31
- *
32
- * @returns Promise<T>
33
- */
34
- async dequeue() {
35
- if (this.queue.length > 0) {
36
- return Promise.resolve(this.queue.shift());
37
- }
38
- return new Promise((resolve, reject) => {
39
- this.pendingDequeue.push({ resolve, reject });
40
- });
41
- }
42
- /**
43
- * The isEmpty method returns whether the queue is empty or not.
44
- *
45
- * @returns boolean
46
- */
47
- isEmpty() {
48
- return this.queue.length === 0;
49
- }
50
- /**
51
- * The cancel method cancels all pending promises in the queue.
52
- * It rejects the promises with a AsyncQueueCancelledError error,
53
- * ensuring that any awaiting code can handle the cancellation appropriately.
54
- */
55
- cancel() {
56
- this.cancelled = true;
57
- this.pendingDequeue.forEach(async ({ reject }) => {
58
- reject(new AsyncQueueCancelledError("Task cancelled"));
59
- });
60
- this.pendingDequeue = [];
61
- this.queue.length = 0;
62
- }
63
- /**
64
- * The isCancelled method returns whether the queue is cancelled or not.
65
- *
66
- * @returns boolean
67
- */
68
- isCancelled() {
69
- return this.cancelled;
70
- }
71
- /**
72
- * The pendingDequeueLength method returns the length of the pendingDequeue.
73
- *
74
- * @returns number
75
- */
76
- pendingDequeueLength() {
77
- return this.pendingDequeue.length;
78
- }
79
- };
80
- var AsyncQueueCancelledError = class extends Error {
81
- };
82
-
83
- export {
84
- AsyncQueue,
85
- AsyncQueueCancelledError
86
- };
87
- //# sourceMappingURL=chunk-AC3OGAL6.mjs.map
@@ -1,356 +0,0 @@
1
- import {
2
- Bool,
3
- U128,
4
- U16,
5
- U256,
6
- U32,
7
- U64,
8
- U8
9
- } from "./chunk-WK5ZSNE2.mjs";
10
- import {
11
- Serializable
12
- } from "./chunk-FQQW55X7.mjs";
13
- import {
14
- Hex
15
- } from "./chunk-YV7M4CFP.mjs";
16
-
17
- // src/bcs/serializable/moveStructs.ts
18
- var MoveVector = class _MoveVector extends Serializable {
19
- constructor(values) {
20
- super();
21
- this.values = values;
22
- }
23
- serializeForEntryFunction(serializer) {
24
- const bcsBytes = this.bcsToBytes();
25
- serializer.serializeBytes(bcsBytes);
26
- }
27
- /**
28
- * NOTE: This function will only work when the inner values in the `MoveVector` are `U8`s.
29
- * @param serializer
30
- */
31
- serializeForScriptFunction(serializer) {
32
- const isU8 = this.values[0] instanceof U8;
33
- if (!isU8 && this.values[0] !== void 0) {
34
- throw new Error("Script function arguments only accept u8 vectors");
35
- }
36
- serializer.serializeU32AsUleb128(4 /* U8Vector */);
37
- serializer.serialize(this);
38
- }
39
- /**
40
- * Factory method to generate a MoveVector of U8s from an array of numbers.
41
- *
42
- * @example
43
- * const v = MoveVector.U8([1, 2, 3, 4]);
44
- * @params values: an array of `numbers` to convert to U8s
45
- * @returns a `MoveVector<U8>`
46
- */
47
- static U8(values) {
48
- let numbers;
49
- if (Array.isArray(values) && typeof values[0] === "number") {
50
- numbers = values;
51
- } else if (typeof values === "string") {
52
- const hex = Hex.fromHexInput(values);
53
- numbers = Array.from(hex.toUint8Array());
54
- } else if (values instanceof Uint8Array) {
55
- numbers = Array.from(values);
56
- } else {
57
- throw new Error("Invalid input type");
58
- }
59
- return new _MoveVector(numbers.map((v) => new U8(v)));
60
- }
61
- /**
62
- * Factory method to generate a MoveVector of U16s from an array of numbers.
63
- *
64
- * @example
65
- * const v = MoveVector.U16([1, 2, 3, 4]);
66
- * @params values: an array of `numbers` to convert to U16s
67
- * @returns a `MoveVector<U16>`
68
- */
69
- static U16(values) {
70
- return new _MoveVector(values.map((v) => new U16(v)));
71
- }
72
- /**
73
- * Factory method to generate a MoveVector of U32s from an array of numbers.
74
- *
75
- * @example
76
- * const v = MoveVector.U32([1, 2, 3, 4]);
77
- * @params values: an array of `numbers` to convert to U32s
78
- * @returns a `MoveVector<U32>`
79
- */
80
- static U32(values) {
81
- return new _MoveVector(values.map((v) => new U32(v)));
82
- }
83
- /**
84
- * Factory method to generate a MoveVector of U64s from an array of numbers or bigints.
85
- *
86
- * @example
87
- * const v = MoveVector.U64([1, 2, 3, 4]);
88
- * @params values: an array of numbers of type `number | bigint` to convert to U64s
89
- * @returns a `MoveVector<U64>`
90
- */
91
- static U64(values) {
92
- return new _MoveVector(values.map((v) => new U64(v)));
93
- }
94
- /**
95
- * Factory method to generate a MoveVector of U128s from an array of numbers or bigints.
96
- *
97
- * @example
98
- * const v = MoveVector.U128([1, 2, 3, 4]);
99
- * @params values: an array of numbers of type `number | bigint` to convert to U128s
100
- * @returns a `MoveVector<U128>`
101
- */
102
- static U128(values) {
103
- return new _MoveVector(values.map((v) => new U128(v)));
104
- }
105
- /**
106
- * Factory method to generate a MoveVector of U256s from an array of numbers or bigints.
107
- *
108
- * @example
109
- * const v = MoveVector.U256([1, 2, 3, 4]);
110
- * @params values: an array of numbers of type `number | bigint` to convert to U256s
111
- * @returns a `MoveVector<U256>`
112
- */
113
- static U256(values) {
114
- return new _MoveVector(values.map((v) => new U256(v)));
115
- }
116
- /**
117
- * Factory method to generate a MoveVector of Bools from an array of booleans.
118
- *
119
- * @example
120
- * const v = MoveVector.Bool([true, false, true, false]);
121
- * @params values: an array of `bools` to convert to Bools
122
- * @returns a `MoveVector<Bool>`
123
- */
124
- static Bool(values) {
125
- return new _MoveVector(values.map((v) => new Bool(v)));
126
- }
127
- /**
128
- * Factory method to generate a MoveVector of MoveStrings from an array of strings.
129
- *
130
- * @example
131
- * const v = MoveVector.MoveString(["hello", "world"]);
132
- * @params values: an array of `strings` to convert to MoveStrings
133
- * @returns a `MoveVector<MoveString>`
134
- */
135
- static MoveString(values) {
136
- return new _MoveVector(values.map((v) => new MoveString(v)));
137
- }
138
- serialize(serializer) {
139
- serializer.serializeVector(this.values);
140
- }
141
- /**
142
- * Deserialize a MoveVector of type T, specifically where T is a Serializable and Deserializable type.
143
- *
144
- * NOTE: This only works with a depth of one. Generics will not work.
145
- *
146
- * NOTE: This will not work with types that aren't of the Serializable class.
147
- *
148
- * If you're looking for a more flexible deserialization function, you can use the deserializeVector function
149
- * in the Deserializer class.
150
- *
151
- * @example
152
- * const vec = MoveVector.deserialize(deserializer, U64);
153
- * @params deserializer: the Deserializer instance to use, with bytes loaded into it already.
154
- * cls: the class to typecast the input values to, must be a Serializable and Deserializable type.
155
- * @returns a MoveVector of the corresponding class T
156
- * *
157
- */
158
- static deserialize(deserializer, cls) {
159
- const length = deserializer.deserializeUleb128AsU32();
160
- const values = new Array();
161
- for (let i = 0; i < length; i += 1) {
162
- values.push(cls.deserialize(deserializer));
163
- }
164
- return new _MoveVector(values);
165
- }
166
- };
167
- var MoveString = class _MoveString extends Serializable {
168
- constructor(value) {
169
- super();
170
- this.value = value;
171
- }
172
- serialize(serializer) {
173
- serializer.serializeStr(this.value);
174
- }
175
- serializeForEntryFunction(serializer) {
176
- const bcsBytes = this.bcsToBytes();
177
- serializer.serializeBytes(bcsBytes);
178
- }
179
- serializeForScriptFunction(serializer) {
180
- const fixedStringBytes = this.bcsToBytes().slice(1);
181
- const vectorU8 = MoveVector.U8(fixedStringBytes);
182
- vectorU8.serializeForScriptFunction(serializer);
183
- }
184
- static deserialize(deserializer) {
185
- return new _MoveString(deserializer.deserializeStr());
186
- }
187
- };
188
- var MoveOption = class _MoveOption extends Serializable {
189
- constructor(value) {
190
- super();
191
- if (typeof value !== "undefined" && value !== null) {
192
- this.vec = new MoveVector([value]);
193
- } else {
194
- this.vec = new MoveVector([]);
195
- }
196
- [this.value] = this.vec.values;
197
- }
198
- serializeForEntryFunction(serializer) {
199
- const bcsBytes = this.bcsToBytes();
200
- serializer.serializeBytes(bcsBytes);
201
- }
202
- /**
203
- * Retrieves the inner value of the MoveOption.
204
- *
205
- * This method is inspired by Rust's `Option<T>.unwrap()`.
206
- * In Rust, attempting to unwrap a `None` value results in a panic.
207
- *
208
- * Similarly, this method will throw an error if the value is not present.
209
- *
210
- * @example
211
- * const option = new MoveOption<Bool>(new Bool(true));
212
- * const value = option.unwrap(); // Returns the Bool instance
213
- *
214
- * @throws {Error} Throws an error if the MoveOption does not contain a value.
215
- *
216
- * @returns {T} The contained value if present.
217
- */
218
- unwrap() {
219
- if (!this.isSome()) {
220
- throw new Error("Called unwrap on a MoveOption with no value");
221
- } else {
222
- return this.vec.values[0];
223
- }
224
- }
225
- // Check if the MoveOption has a value.
226
- isSome() {
227
- return this.vec.values.length === 1;
228
- }
229
- serialize(serializer) {
230
- this.vec.serialize(serializer);
231
- }
232
- /**
233
- * Factory method to generate a MoveOption<U8> from a `number` or `undefined`.
234
- *
235
- * @example
236
- * MoveOption.U8(1).isSome() === true;
237
- * MoveOption.U8().isSome() === false;
238
- * MoveOption.U8(undefined).isSome() === false;
239
- * @params value: the value used to fill the MoveOption. If `value` is undefined
240
- * the resulting MoveOption's .isSome() method will return false.
241
- * @returns a MoveOption<U8> with an inner value `value`
242
- */
243
- static U8(value) {
244
- return new _MoveOption(value !== null && value !== void 0 ? new U8(value) : void 0);
245
- }
246
- /**
247
- * Factory method to generate a MoveOption<U16> from a `number` or `undefined`.
248
- *
249
- * @example
250
- * MoveOption.U16(1).isSome() === true;
251
- * MoveOption.U16().isSome() === false;
252
- * MoveOption.U16(undefined).isSome() === false;
253
- * @params value: the value used to fill the MoveOption. If `value` is undefined
254
- * the resulting MoveOption's .isSome() method will return false.
255
- * @returns a MoveOption<U16> with an inner value `value`
256
- */
257
- static U16(value) {
258
- return new _MoveOption(value !== null && value !== void 0 ? new U16(value) : void 0);
259
- }
260
- /**
261
- * Factory method to generate a MoveOption<U32> from a `number` or `undefined`.
262
- *
263
- * @example
264
- * MoveOption.U32(1).isSome() === true;
265
- * MoveOption.U32().isSome() === false;
266
- * MoveOption.U32(undefined).isSome() === false;
267
- * @params value: the value used to fill the MoveOption. If `value` is undefined
268
- * the resulting MoveOption's .isSome() method will return false.
269
- * @returns a MoveOption<U32> with an inner value `value`
270
- */
271
- static U32(value) {
272
- return new _MoveOption(value !== null && value !== void 0 ? new U32(value) : void 0);
273
- }
274
- /**
275
- * Factory method to generate a MoveOption<U64> from a `number` or a `bigint` or `undefined`.
276
- *
277
- * @example
278
- * MoveOption.U64(1).isSome() === true;
279
- * MoveOption.U64().isSome() === false;
280
- * MoveOption.U64(undefined).isSome() === false;
281
- * @params value: the value used to fill the MoveOption. If `value` is undefined
282
- * the resulting MoveOption's .isSome() method will return false.
283
- * @returns a MoveOption<U64> with an inner value `value`
284
- */
285
- static U64(value) {
286
- return new _MoveOption(value !== null && value !== void 0 ? new U64(value) : void 0);
287
- }
288
- /**
289
- * Factory method to generate a MoveOption<U128> from a `number` or a `bigint` or `undefined`.
290
- *
291
- * @example
292
- * MoveOption.U128(1).isSome() === true;
293
- * MoveOption.U128().isSome() === false;
294
- * MoveOption.U128(undefined).isSome() === false;
295
- * @params value: the value used to fill the MoveOption. If `value` is undefined
296
- * the resulting MoveOption's .isSome() method will return false.
297
- * @returns a MoveOption<U128> with an inner value `value`
298
- */
299
- static U128(value) {
300
- return new _MoveOption(value !== null && value !== void 0 ? new U128(value) : void 0);
301
- }
302
- /**
303
- * Factory method to generate a MoveOption<U256> from a `number` or a `bigint` or `undefined`.
304
- *
305
- * @example
306
- * MoveOption.U256(1).isSome() === true;
307
- * MoveOption.U256().isSome() === false;
308
- * MoveOption.U256(undefined).isSome() === false;
309
- * @params value: the value used to fill the MoveOption. If `value` is undefined
310
- * the resulting MoveOption's .isSome() method will return false.
311
- * @returns a MoveOption<U256> with an inner value `value`
312
- */
313
- static U256(value) {
314
- return new _MoveOption(value !== null && value !== void 0 ? new U256(value) : void 0);
315
- }
316
- /**
317
- * Factory method to generate a MoveOption<Bool> from a `boolean` or `undefined`.
318
- *
319
- * @example
320
- * MoveOption.Bool(true).isSome() === true;
321
- * MoveOption.Bool().isSome() === false;
322
- * MoveOption.Bool(undefined).isSome() === false;
323
- * @params value: the value used to fill the MoveOption. If `value` is undefined
324
- * the resulting MoveOption's .isSome() method will return false.
325
- * @returns a MoveOption<Bool> with an inner value `value`
326
- */
327
- static Bool(value) {
328
- return new _MoveOption(value !== null && value !== void 0 ? new Bool(value) : void 0);
329
- }
330
- /**
331
- * Factory method to generate a MoveOption<MoveString> from a `string` or `undefined`.
332
- *
333
- * @example
334
- * MoveOption.MoveString("hello").isSome() === true;
335
- * MoveOption.MoveString("").isSome() === true;
336
- * MoveOption.MoveString().isSome() === false;
337
- * MoveOption.MoveString(undefined).isSome() === false;
338
- * @params value: the value used to fill the MoveOption. If `value` is undefined
339
- * the resulting MoveOption's .isSome() method will return false.
340
- * @returns a MoveOption<MoveString> with an inner value `value`
341
- */
342
- static MoveString(value) {
343
- return new _MoveOption(value !== null && value !== void 0 ? new MoveString(value) : void 0);
344
- }
345
- static deserialize(deserializer, cls) {
346
- const vector = MoveVector.deserialize(deserializer, cls);
347
- return new _MoveOption(vector.values[0]);
348
- }
349
- };
350
-
351
- export {
352
- MoveVector,
353
- MoveString,
354
- MoveOption
355
- };
356
- //# sourceMappingURL=chunk-AR7X6GWQ.mjs.map
@@ -1,142 +0,0 @@
1
- import {
2
- AccountAuthenticator
3
- } from "./chunk-IC56GQFJ.mjs";
4
- import {
5
- MultiEd25519PublicKey,
6
- MultiEd25519Signature
7
- } from "./chunk-UKU6A2W2.mjs";
8
- import {
9
- Ed25519PublicKey,
10
- Ed25519Signature
11
- } from "./chunk-RX4VG2AT.mjs";
12
- import {
13
- AccountAddress
14
- } from "./chunk-CMNJG4NN.mjs";
15
- import {
16
- Serializable
17
- } from "./chunk-FQQW55X7.mjs";
18
-
19
- // src/transactions/authenticator/transaction.ts
20
- var TransactionAuthenticator = class extends Serializable {
21
- static deserialize(deserializer) {
22
- const index = deserializer.deserializeUleb128AsU32();
23
- switch (index) {
24
- case 0 /* Ed25519 */:
25
- return TransactionAuthenticatorEd25519.load(deserializer);
26
- case 1 /* MultiEd25519 */:
27
- return TransactionAuthenticatorMultiEd25519.load(deserializer);
28
- case 2 /* MultiAgent */:
29
- return TransactionAuthenticatorMultiAgent.load(deserializer);
30
- case 3 /* FeePayer */:
31
- return TransactionAuthenticatorFeePayer.load(deserializer);
32
- case 4 /* SingleSender */:
33
- return TransactionAuthenticatorSingleSender.load(deserializer);
34
- default:
35
- throw new Error(`Unknown variant index for TransactionAuthenticator: ${index}`);
36
- }
37
- }
38
- };
39
- var TransactionAuthenticatorEd25519 = class _TransactionAuthenticatorEd25519 extends TransactionAuthenticator {
40
- constructor(public_key, signature) {
41
- super();
42
- this.public_key = public_key;
43
- this.signature = signature;
44
- }
45
- serialize(serializer) {
46
- serializer.serializeU32AsUleb128(0 /* Ed25519 */);
47
- this.public_key.serialize(serializer);
48
- this.signature.serialize(serializer);
49
- }
50
- static load(deserializer) {
51
- const public_key = Ed25519PublicKey.deserialize(deserializer);
52
- const signature = Ed25519Signature.deserialize(deserializer);
53
- return new _TransactionAuthenticatorEd25519(public_key, signature);
54
- }
55
- };
56
- var TransactionAuthenticatorMultiEd25519 = class _TransactionAuthenticatorMultiEd25519 extends TransactionAuthenticator {
57
- constructor(public_key, signature) {
58
- super();
59
- this.public_key = public_key;
60
- this.signature = signature;
61
- }
62
- serialize(serializer) {
63
- serializer.serializeU32AsUleb128(1 /* MultiEd25519 */);
64
- this.public_key.serialize(serializer);
65
- this.signature.serialize(serializer);
66
- }
67
- static load(deserializer) {
68
- const public_key = MultiEd25519PublicKey.deserialize(deserializer);
69
- const signature = MultiEd25519Signature.deserialize(deserializer);
70
- return new _TransactionAuthenticatorMultiEd25519(public_key, signature);
71
- }
72
- };
73
- var TransactionAuthenticatorMultiAgent = class _TransactionAuthenticatorMultiAgent extends TransactionAuthenticator {
74
- constructor(sender, secondary_signer_addresses, secondary_signers) {
75
- super();
76
- this.sender = sender;
77
- this.secondary_signer_addresses = secondary_signer_addresses;
78
- this.secondary_signers = secondary_signers;
79
- }
80
- serialize(serializer) {
81
- serializer.serializeU32AsUleb128(2 /* MultiAgent */);
82
- this.sender.serialize(serializer);
83
- serializer.serializeVector(this.secondary_signer_addresses);
84
- serializer.serializeVector(this.secondary_signers);
85
- }
86
- static load(deserializer) {
87
- const sender = AccountAuthenticator.deserialize(deserializer);
88
- const secondary_signer_addresses = deserializer.deserializeVector(AccountAddress);
89
- const secondary_signers = deserializer.deserializeVector(AccountAuthenticator);
90
- return new _TransactionAuthenticatorMultiAgent(sender, secondary_signer_addresses, secondary_signers);
91
- }
92
- };
93
- var TransactionAuthenticatorFeePayer = class _TransactionAuthenticatorFeePayer extends TransactionAuthenticator {
94
- constructor(sender, secondary_signer_addresses, secondary_signers, fee_payer) {
95
- super();
96
- this.sender = sender;
97
- this.secondary_signer_addresses = secondary_signer_addresses;
98
- this.secondary_signers = secondary_signers;
99
- this.fee_payer = fee_payer;
100
- }
101
- serialize(serializer) {
102
- serializer.serializeU32AsUleb128(3 /* FeePayer */);
103
- this.sender.serialize(serializer);
104
- serializer.serializeVector(this.secondary_signer_addresses);
105
- serializer.serializeVector(this.secondary_signers);
106
- this.fee_payer.address.serialize(serializer);
107
- this.fee_payer.authenticator.serialize(serializer);
108
- }
109
- static load(deserializer) {
110
- const sender = AccountAuthenticator.deserialize(deserializer);
111
- const secondary_signer_addresses = deserializer.deserializeVector(AccountAddress);
112
- const secondary_signers = deserializer.deserializeVector(AccountAuthenticator);
113
- const address = AccountAddress.deserialize(deserializer);
114
- const authenticator = AccountAuthenticator.deserialize(deserializer);
115
- const fee_payer = { address, authenticator };
116
- return new _TransactionAuthenticatorFeePayer(sender, secondary_signer_addresses, secondary_signers, fee_payer);
117
- }
118
- };
119
- var TransactionAuthenticatorSingleSender = class _TransactionAuthenticatorSingleSender extends TransactionAuthenticator {
120
- constructor(sender) {
121
- super();
122
- this.sender = sender;
123
- }
124
- serialize(serializer) {
125
- serializer.serializeU32AsUleb128(4 /* SingleSender */);
126
- this.sender.serialize(serializer);
127
- }
128
- static load(deserializer) {
129
- const sender = AccountAuthenticator.deserialize(deserializer);
130
- return new _TransactionAuthenticatorSingleSender(sender);
131
- }
132
- };
133
-
134
- export {
135
- TransactionAuthenticator,
136
- TransactionAuthenticatorEd25519,
137
- TransactionAuthenticatorMultiEd25519,
138
- TransactionAuthenticatorMultiAgent,
139
- TransactionAuthenticatorFeePayer,
140
- TransactionAuthenticatorSingleSender
141
- };
142
- //# sourceMappingURL=chunk-ASF2VWOX.mjs.map
@@ -1,43 +0,0 @@
1
- import {
2
- RawTransaction
3
- } from "./chunk-2OQW7BMN.mjs";
4
- import {
5
- TransactionAuthenticator
6
- } from "./chunk-ASF2VWOX.mjs";
7
- import {
8
- Serializable
9
- } from "./chunk-FQQW55X7.mjs";
10
-
11
- // src/transactions/instances/signedTransaction.ts
12
- var SignedTransaction = class _SignedTransaction extends Serializable {
13
- /**
14
- * A SignedTransaction consists of a raw transaction and an authenticator. The authenticator
15
- * contains a client's public key and the signature of the raw transaction.
16
- *
17
- * @see {@link https://aptos.dev/integration/creating-a-signed-transaction | Creating a Signed Transaction}
18
- *
19
- * @param raw_txn
20
- * @param authenticator Contains a client's public key and the signature of the raw transaction.
21
- * Authenticator has 3 flavors: single signature, multi-signature and multi-agent.
22
- * @see {@link https://github.com/aptos-labs/aptos-core/blob/main/types/src/transaction/authenticator.rs} for details.
23
- */
24
- constructor(raw_txn, authenticator) {
25
- super();
26
- this.raw_txn = raw_txn;
27
- this.authenticator = authenticator;
28
- }
29
- serialize(serializer) {
30
- this.raw_txn.serialize(serializer);
31
- this.authenticator.serialize(serializer);
32
- }
33
- static deserialize(deserializer) {
34
- const raw_txn = RawTransaction.deserialize(deserializer);
35
- const authenticator = TransactionAuthenticator.deserialize(deserializer);
36
- return new _SignedTransaction(raw_txn, authenticator);
37
- }
38
- };
39
-
40
- export {
41
- SignedTransaction
42
- };
43
- //# sourceMappingURL=chunk-ATVFVXR6.mjs.map