@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,315 +0,0 @@
1
- import {
2
- Simulate
3
- } from "./chunk-W76MGKZB.mjs";
4
- import {
5
- Submit
6
- } from "./chunk-7IDBB4J4.mjs";
7
- import {
8
- Build
9
- } from "./chunk-7FUHWL6A.mjs";
10
- import {
11
- TransactionManagement
12
- } from "./chunk-WDRH2URB.mjs";
13
- import {
14
- getSigningMessage,
15
- publicPackageTransaction,
16
- rotateAuthKey,
17
- signAndSubmitTransaction,
18
- signTransaction
19
- } from "./chunk-IHNPN5CQ.mjs";
20
- import {
21
- getGasPriceEstimation,
22
- getTransactionByHash,
23
- getTransactionByVersion,
24
- getTransactions,
25
- isTransactionPending,
26
- waitForTransaction
27
- } from "./chunk-TBHU6ZW6.mjs";
28
-
29
- // src/api/transaction.ts
30
- var Transaction = class {
31
- constructor(config) {
32
- this.config = config;
33
- this.build = new Build(this.config);
34
- this.simulate = new Simulate(this.config);
35
- this.submit = new Submit(this.config);
36
- this.batch = new TransactionManagement(this.config);
37
- }
38
- /**
39
- * Queries on-chain transactions. This function will not return pending
40
- * transactions. For that, use `getTransactionsByHash`.
41
- *
42
- * @example
43
- * const transactions = await aptos.getTransactions()
44
- *
45
- * @param args.options.offset The number transaction to start with
46
- * @param args.options.limit Number of results to return
47
- *
48
- * @returns Array of on-chain transactions
49
- */
50
- async getTransactions(args) {
51
- return getTransactions({
52
- aptosConfig: this.config,
53
- ...args
54
- });
55
- }
56
- /**
57
- * Queries on-chain transaction by version. This function will not return pending transactions.
58
- *
59
- * @example
60
- * const transaction = await aptos.getTransactions({ledgerVersion:1})
61
- *
62
- * @param args.ledgerVersion - Transaction version is an unsigned 64-bit number.
63
- * @returns On-chain transaction. Only on-chain transactions have versions, so this
64
- * function cannot be used to query pending transactions.
65
- */
66
- async getTransactionByVersion(args) {
67
- return getTransactionByVersion({
68
- aptosConfig: this.config,
69
- ...args
70
- });
71
- }
72
- /**
73
- * Queries on-chain transaction by transaction hash. This function will return pending transactions.
74
- *
75
- * @example
76
- * const transaction = await aptos.getTransactionByHash({transactionHash:"0x123"})
77
- *
78
- * @param args.transactionHash - Transaction hash should be hex-encoded bytes string with 0x prefix.
79
- * @returns Transaction from mempool (pending) or on-chain (committed) transaction
80
- */
81
- async getTransactionByHash(args) {
82
- return getTransactionByHash({
83
- aptosConfig: this.config,
84
- ...args
85
- });
86
- }
87
- /**
88
- * Defines if specified transaction is currently in pending state
89
- *
90
- * To create a transaction hash:
91
- *
92
- * 1. Create a hash message from the bytes: "Aptos::Transaction" bytes + the BCS-serialized Transaction bytes.
93
- * 2. Apply hash algorithm SHA3-256 to the hash message bytes.
94
- * 3. Hex-encode the hash bytes with 0x prefix.
95
- *
96
- * @example
97
- * const isPendingTransaction = await aptos.isPendingTransaction({transactionHash:"0x123"})
98
- *
99
- * @param args.transactionHash A hash of transaction
100
- * @returns `true` if transaction is in pending state and `false` otherwise
101
- */
102
- async isPendingTransaction(args) {
103
- return isTransactionPending({
104
- aptosConfig: this.config,
105
- ...args
106
- });
107
- }
108
- /**
109
- * Waits for a transaction to move past the pending state.
110
- *
111
- * There are 4 cases.
112
- * 1. Transaction is successfully processed and committed to the chain.
113
- * - The function will resolve with the transaction response from the API.
114
- * 2. Transaction is rejected for some reason, and is therefore not committed to the blockchain.
115
- * - The function will throw an AptosApiError with an HTTP status code indicating some problem with the request.
116
- * 3. Transaction is committed but execution failed, meaning no changes were
117
- * written to the blockchain state.
118
- * - If `checkSuccess` is true, the function will throw a FailedTransactionError
119
- * If `checkSuccess` is false, the function will resolve with the transaction response where the `success` field is false.
120
- * 4. Transaction does not move past the pending state within `args.options.timeoutSecs` seconds.
121
- * - The function will throw a WaitForTransactionError
122
- *
123
- * @example
124
- * const transaction = await aptos.waitForTransaction({transactionHash:"0x123"})
125
- *
126
- * @param args.transactionHash The hash of a transaction previously submitted to the blockchain.
127
- * @param args.options.timeoutSecs Timeout in seconds. Defaults to 20 seconds.
128
- * @param args.options.checkSuccess A boolean which controls whether the function will error if the transaction failed.
129
- * Defaults to true. See case 3 above.
130
- * @returns The transaction on-chain. See above for more details.
131
- */
132
- async waitForTransaction(args) {
133
- return waitForTransaction({
134
- aptosConfig: this.config,
135
- ...args
136
- });
137
- }
138
- /**
139
- * Gives an estimate of the gas unit price required to get a
140
- * transaction on chain in a reasonable amount of time.
141
- * For more information {@link https://api.mainnet.aptoslabs.com/v1/spec#/operations/estimate_gas_price}
142
- *
143
- * @returns Object holding the outputs of the estimate gas API
144
- *
145
- * @example
146
- * const gasPrice = await aptos.waitForTransaction()
147
- */
148
- async getGasPriceEstimation() {
149
- return getGasPriceEstimation({
150
- aptosConfig: this.config
151
- });
152
- }
153
- /**
154
- * Returns a signing message for a transaction.
155
- *
156
- * This allows a user to sign a transaction using their own preferred signing method, and
157
- * then submit it to the network.
158
- *
159
- * @example
160
- * const transaction = await aptos.transaction.build.simple({...})
161
- * const message = await aptos.getSigningMessage({transaction})
162
- *
163
- * @param args.transaction A raw transaction for signing elsewhere
164
- */
165
- // eslint-disable-next-line class-methods-use-this
166
- getSigningMessage(args) {
167
- return getSigningMessage(args);
168
- }
169
- /**
170
- * Generates a transaction to publish a move package to chain.
171
- *
172
- * To get the `metadataBytes` and `byteCode`, can compile using Aptos CLI with command
173
- * `aptos move compile --save-metadata ...`,
174
- * For more info {@link https://aptos.dev/tutorials/your-first-dapp/#step-4-publish-a-move-module}
175
- *
176
- * @example
177
- * const transaction = await aptos.publishPackageTransaction({
178
- * account: alice,
179
- * metadataBytes,
180
- * moduleBytecode: [byteCode],
181
- * })
182
- *
183
- * @param args.account The publisher account
184
- * @param args.metadataBytes The package metadata bytes
185
- * @param args.moduleBytecode An array of the bytecode of each module in the package in compiler output order
186
- *
187
- * @returns A SimpleTransaction that can be simulated or submitted to chain
188
- */
189
- async publishPackageTransaction(args) {
190
- return publicPackageTransaction({ aptosConfig: this.config, ...args });
191
- }
192
- /**
193
- * Rotate an account's auth key. After rotation, only the new private key can be used to sign txns for
194
- * the account.
195
- * Note: Only legacy Ed25519 scheme is supported for now.
196
- * More info: {@link https://aptos.dev/guides/account-management/key-rotation/}
197
- *
198
- * @example
199
- * const response = await aptos.rotateAuthKey({
200
- * fromAccount: alice,
201
- * toNewPrivateKey: new ED25519PublicKey("0x123"),
202
- * })
203
- *
204
- * @param args.fromAccount The account to rotate the auth key for
205
- * @param args.toNewPrivateKey The new private key to rotate to
206
- *
207
- * @returns PendingTransactionResponse
208
- */
209
- async rotateAuthKey(args) {
210
- return rotateAuthKey({ aptosConfig: this.config, ...args });
211
- }
212
- /**
213
- * Sign a transaction that can later be submitted to chain
214
- *
215
- * @example
216
- * const transaction = await aptos.transaction.build.simple({...})
217
- * const transaction = await aptos.transaction.sign({
218
- * signer: alice,
219
- * transaction
220
- * })
221
- *
222
- * @param args.signer The signer account
223
- * @param args.transaction A raw transaction to sign on
224
- *
225
- * @returns AccountAuthenticator
226
- */
227
- // eslint-disable-next-line class-methods-use-this
228
- sign(args) {
229
- return signTransaction({
230
- ...args
231
- });
232
- }
233
- /**
234
- * Sign a transaction as a fee payer that can later be submitted to chain
235
- *
236
- * @example
237
- * const transaction = await aptos.transaction.build.simple({...})
238
- * const transaction = await aptos.transaction.signAsFeePayer({
239
- * signer: alice,
240
- * transaction
241
- * })
242
- *
243
- * @param args.signer The fee payer signer account
244
- * @param args.transaction A raw transaction to sign on
245
- *
246
- * @returns AccountAuthenticator
247
- */
248
- // eslint-disable-next-line class-methods-use-this
249
- signAsFeePayer(args) {
250
- const { signer, transaction } = args;
251
- if (!transaction.feePayerAddress) {
252
- throw new Error(`Transaction ${transaction} is not a Fee Payer transaction`);
253
- }
254
- transaction.feePayerAddress = signer.accountAddress;
255
- return signTransaction({
256
- signer,
257
- transaction
258
- });
259
- }
260
- // TRANSACTION SUBMISSION //
261
- /**
262
- * @deprecated Prefer to use `aptos.transaction.batch.forSingleAccount()`
263
- *
264
- * Batch transactions for a single account.
265
- *
266
- * This function uses a transaction worker that receives payloads to be processed
267
- * and submitted to chain.
268
- * Note that this process is best for submitting multiple transactions that
269
- * dont rely on each other, i.e batch funds, batch token mints, etc.
270
- *
271
- * If any worker failure, the functions throws an error.
272
- *
273
- * @param args.sender The sender account to sign and submit the transaction
274
- * @param args.data An array of transaction payloads
275
- * @param args.options optional. Transaction generation configurations (excluding accountSequenceNumber)
276
- *
277
- * @return void. Throws if any error
278
- */
279
- async batchTransactionsForSingleAccount(args) {
280
- try {
281
- const { sender, data, options } = args;
282
- this.batch.forSingleAccount({ sender, data, options });
283
- } catch (error) {
284
- throw new Error(`failed to submit transactions with error: ${error}`);
285
- }
286
- }
287
- /**
288
- * Sign and submit a single signer transaction to chain
289
- *
290
- * @param args.signer The signer account to sign the transaction
291
- * @param args.transaction An instance of a RawTransaction, plus optional secondary/fee payer addresses
292
- *
293
- * @example
294
- * const transaction = await aptos.transaction.build.simple({...})
295
- * const transaction = await aptos.signAndSubmitTransaction({
296
- * signer: alice,
297
- * transaction
298
- * })
299
- *
300
- * @return PendingTransactionResponse
301
- */
302
- async signAndSubmitTransaction(args) {
303
- const { signer, transaction } = args;
304
- return signAndSubmitTransaction({
305
- aptosConfig: this.config,
306
- signer,
307
- transaction
308
- });
309
- }
310
- };
311
-
312
- export {
313
- Transaction
314
- };
315
- //# sourceMappingURL=chunk-FF4JPDKD.mjs.map
@@ -1,288 +0,0 @@
1
- import {
2
- Hex
3
- } from "./chunk-YV7M4CFP.mjs";
4
- import {
5
- MAX_U128_BIG_INT,
6
- MAX_U16_NUMBER,
7
- MAX_U256_BIG_INT,
8
- MAX_U32_NUMBER,
9
- MAX_U64_BIG_INT,
10
- MAX_U8_NUMBER
11
- } from "./chunk-SBB4YEPT.mjs";
12
- import {
13
- __decorateClass
14
- } from "./chunk-OR7TEZ25.mjs";
15
-
16
- // src/bcs/serializer.ts
17
- var Serializable = class {
18
- /**
19
- * Serializes a `Serializable` value to its BCS representation.
20
- * This function is the Typescript SDK equivalent of `bcs::to_bytes` in Move.
21
- * @returns the BCS representation of the Serializable instance as a byte buffer
22
- */
23
- bcsToBytes() {
24
- const serializer = new Serializer();
25
- this.serialize(serializer);
26
- return serializer.toUint8Array();
27
- }
28
- /**
29
- * Helper function to get a value's BCS-serialized bytes as a Hex instance.
30
- * @returns a Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array
31
- */
32
- bcsToHex() {
33
- const bcsBytes = this.bcsToBytes();
34
- return Hex.fromHexInput(bcsBytes);
35
- }
36
- };
37
- var Serializer = class {
38
- // Constructs a serializer with a buffer of size `length` bytes, 64 bytes by default.
39
- // `length` must be greater than 0.
40
- constructor(length = 64) {
41
- if (length <= 0) {
42
- throw new Error("Length needs to be greater than 0");
43
- }
44
- this.buffer = new ArrayBuffer(length);
45
- this.offset = 0;
46
- }
47
- ensureBufferWillHandleSize(bytes) {
48
- while (this.buffer.byteLength < this.offset + bytes) {
49
- const newBuffer = new ArrayBuffer(this.buffer.byteLength * 2);
50
- new Uint8Array(newBuffer).set(new Uint8Array(this.buffer));
51
- this.buffer = newBuffer;
52
- }
53
- }
54
- appendToBuffer(values) {
55
- this.ensureBufferWillHandleSize(values.length);
56
- new Uint8Array(this.buffer, this.offset).set(values);
57
- this.offset += values.length;
58
- }
59
- serializeWithFunction(fn, bytesLength, value) {
60
- this.ensureBufferWillHandleSize(bytesLength);
61
- const dv = new DataView(this.buffer, this.offset);
62
- fn.apply(dv, [0, value, true]);
63
- this.offset += bytesLength;
64
- }
65
- /**
66
- * Serializes a string. UTF8 string is supported.
67
- *
68
- * The number of bytes in the string content is serialized first, as a uleb128-encoded u32 integer.
69
- * Then the string content is serialized as UTF8 encoded bytes.
70
- *
71
- * BCS layout for "string": string_length | string_content
72
- * where string_length is a u32 integer encoded as a uleb128 integer, equal to the number of bytes in string_content.
73
- *
74
- * @example
75
- * ```ts
76
- * const serializer = new Serializer();
77
- * serializer.serializeStr("1234abcd");
78
- * assert(serializer.toUint8Array() === new Uint8Array([8, 49, 50, 51, 52, 97, 98, 99, 100]));
79
- * ```
80
- */
81
- serializeStr(value) {
82
- const textEncoder = new TextEncoder();
83
- this.serializeBytes(textEncoder.encode(value));
84
- }
85
- /**
86
- * Serializes an array of bytes.
87
- *
88
- * BCS layout for "bytes": bytes_length | bytes
89
- * where bytes_length is a u32 integer encoded as a uleb128 integer, equal to the length of the bytes array.
90
- */
91
- serializeBytes(value) {
92
- this.serializeU32AsUleb128(value.length);
93
- this.appendToBuffer(value);
94
- }
95
- /**
96
- * Serializes an array of bytes with known length. Therefore, length doesn't need to be
97
- * serialized to help deserialization.
98
- *
99
- * When deserializing, the number of bytes to deserialize needs to be passed in.
100
- */
101
- serializeFixedBytes(value) {
102
- this.appendToBuffer(value);
103
- }
104
- /**
105
- * Serializes a boolean value.
106
- *
107
- * BCS layout for "boolean": One byte. "0x01" for true and "0x00" for false.
108
- */
109
- serializeBool(value) {
110
- ensureBoolean(value);
111
- const byteValue = value ? 1 : 0;
112
- this.appendToBuffer(new Uint8Array([byteValue]));
113
- }
114
- serializeU8(value) {
115
- this.appendToBuffer(new Uint8Array([value]));
116
- }
117
- serializeU16(value) {
118
- this.serializeWithFunction(DataView.prototype.setUint16, 2, value);
119
- }
120
- serializeU32(value) {
121
- this.serializeWithFunction(DataView.prototype.setUint32, 4, value);
122
- }
123
- serializeU64(value) {
124
- const low = BigInt(value) & BigInt(MAX_U32_NUMBER);
125
- const high = BigInt(value) >> BigInt(32);
126
- this.serializeU32(Number(low));
127
- this.serializeU32(Number(high));
128
- }
129
- serializeU128(value) {
130
- const low = BigInt(value) & MAX_U64_BIG_INT;
131
- const high = BigInt(value) >> BigInt(64);
132
- this.serializeU64(low);
133
- this.serializeU64(high);
134
- }
135
- serializeU256(value) {
136
- const low = BigInt(value) & MAX_U128_BIG_INT;
137
- const high = BigInt(value) >> BigInt(128);
138
- this.serializeU128(low);
139
- this.serializeU128(high);
140
- }
141
- serializeU32AsUleb128(val) {
142
- let value = val;
143
- const valueArray = [];
144
- while (value >>> 7 !== 0) {
145
- valueArray.push(value & 127 | 128);
146
- value >>>= 7;
147
- }
148
- valueArray.push(value);
149
- this.appendToBuffer(new Uint8Array(valueArray));
150
- }
151
- /**
152
- * Returns the buffered bytes
153
- */
154
- toUint8Array() {
155
- return new Uint8Array(this.buffer).slice(0, this.offset);
156
- }
157
- /**
158
- * Serializes a `Serializable` value, facilitating composable serialization.
159
- *
160
- * @param value The Serializable value to serialize
161
- *
162
- * @example
163
- * // Define the MoveStruct class that implements the Serializable interface
164
- * class MoveStruct extends Serializable {
165
- * constructor(
166
- * public creatorAddress: AccountAddress, // where AccountAddress extends Serializable
167
- * public collectionName: string,
168
- * public tokenName: string
169
- * ) {}
170
- *
171
- * serialize(serializer: Serializer): void {
172
- * serializer.serialize(this.creatorAddress); // Composable serialization of another Serializable object
173
- * serializer.serializeStr(this.collectionName);
174
- * serializer.serializeStr(this.tokenName);
175
- * }
176
- * }
177
- *
178
- * // Construct a MoveStruct
179
- * const moveStruct = new MoveStruct(new AccountAddress(...), "MyCollection", "TokenA");
180
- *
181
- * // Serialize a string, a u64 number, and a MoveStruct instance.
182
- * const serializer = new Serializer();
183
- * serializer.serializeStr("ExampleString");
184
- * serializer.serializeU64(12345678);
185
- * serializer.serialize(moveStruct);
186
- *
187
- * // Get the bytes from the Serializer instance
188
- * const serializedBytes = serializer.toUint8Array();
189
- *
190
- * @returns the serializer instance
191
- */
192
- serialize(value) {
193
- value.serialize(this);
194
- }
195
- /**
196
- * Serializes an array of BCS Serializable values to a serializer instance.
197
- * Note that this does not return anything. The bytes are added to the serializer instance's byte buffer.
198
- *
199
- * @param values The array of BCS Serializable values
200
- * @example
201
- * const addresses = new Array<AccountAddress>(
202
- * AccountAddress.from("0x1"),
203
- * AccountAddress.from("0x2"),
204
- * AccountAddress.from("0xa"),
205
- * AccountAddress.from("0xb"),
206
- * );
207
- * const serializer = new Serializer();
208
- * serializer.serializeVector(addresses);
209
- * const serializedBytes = serializer.toUint8Array();
210
- * // serializedBytes is now the BCS-serialized bytes
211
- * // The equivalent value in Move would be:
212
- * // `bcs::to_bytes(&vector<address> [@0x1, @0x2, @0xa, @0xb])`;
213
- */
214
- serializeVector(values) {
215
- this.serializeU32AsUleb128(values.length);
216
- values.forEach((item) => {
217
- item.serialize(this);
218
- });
219
- }
220
- serializeOption(value) {
221
- if (value === void 0) {
222
- this.serializeU32AsUleb128(0);
223
- } else {
224
- this.serializeU32AsUleb128(1);
225
- value.serialize(this);
226
- }
227
- }
228
- serializeOptionStr(value) {
229
- if (value === void 0) {
230
- this.serializeU32AsUleb128(0);
231
- } else {
232
- this.serializeU32AsUleb128(1);
233
- this.serializeStr(value);
234
- }
235
- }
236
- };
237
- __decorateClass([
238
- checkNumberRange(0, MAX_U8_NUMBER)
239
- ], Serializer.prototype, "serializeU8", 1);
240
- __decorateClass([
241
- checkNumberRange(0, MAX_U16_NUMBER)
242
- ], Serializer.prototype, "serializeU16", 1);
243
- __decorateClass([
244
- checkNumberRange(0, MAX_U32_NUMBER)
245
- ], Serializer.prototype, "serializeU32", 1);
246
- __decorateClass([
247
- checkNumberRange(BigInt(0), MAX_U64_BIG_INT)
248
- ], Serializer.prototype, "serializeU64", 1);
249
- __decorateClass([
250
- checkNumberRange(BigInt(0), MAX_U128_BIG_INT)
251
- ], Serializer.prototype, "serializeU128", 1);
252
- __decorateClass([
253
- checkNumberRange(BigInt(0), MAX_U256_BIG_INT)
254
- ], Serializer.prototype, "serializeU256", 1);
255
- __decorateClass([
256
- checkNumberRange(0, MAX_U32_NUMBER)
257
- ], Serializer.prototype, "serializeU32AsUleb128", 1);
258
- function ensureBoolean(value) {
259
- if (typeof value !== "boolean") {
260
- throw new Error(`${value} is not a boolean value`);
261
- }
262
- }
263
- var outOfRangeErrorMessage = (value, min, max) => `${value} is out of range: [${min}, ${max}]`;
264
- function validateNumberInRange(value, minValue, maxValue) {
265
- const valueBigInt = BigInt(value);
266
- if (valueBigInt > BigInt(maxValue) || valueBigInt < BigInt(minValue)) {
267
- throw new Error(outOfRangeErrorMessage(value, minValue, maxValue));
268
- }
269
- }
270
- function checkNumberRange(minValue, maxValue) {
271
- return (target, propertyKey, descriptor) => {
272
- const childFunction = descriptor.value;
273
- descriptor.value = function deco(value) {
274
- validateNumberInRange(value, minValue, maxValue);
275
- return childFunction.apply(this, [value]);
276
- };
277
- return descriptor;
278
- };
279
- }
280
-
281
- export {
282
- Serializable,
283
- Serializer,
284
- ensureBoolean,
285
- outOfRangeErrorMessage,
286
- validateNumberInRange
287
- };
288
- //# sourceMappingURL=chunk-FQQW55X7.mjs.map
@@ -1,25 +0,0 @@
1
- import {
2
- Serializable
3
- } from "./chunk-FQQW55X7.mjs";
4
- import {
5
- Hex
6
- } from "./chunk-YV7M4CFP.mjs";
7
-
8
- // src/core/crypto/publicKey.ts
9
- var PublicKey = class extends Serializable {
10
- /**
11
- * Get the public key as a hex string with a 0x prefix e.g. 0x123456...
12
- */
13
- toString() {
14
- const bytes = this.toUint8Array();
15
- return Hex.fromHexInput(bytes).toString();
16
- }
17
- };
18
- var AccountPublicKey = class extends PublicKey {
19
- };
20
-
21
- export {
22
- PublicKey,
23
- AccountPublicKey
24
- };
25
- //# sourceMappingURL=chunk-FXKSE3ZP.mjs.map