@aptos-labs/ts-sdk 1.32.0 → 1.33.0-sc.0

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 (406) hide show
  1. package/dist/common/{accountAddress-6RqI8Aam.d.ts → accountAddress-fJZJVSBc.d.ts} +2 -1
  2. package/dist/common/chunk-F43XVDYJ.js.map +1 -1
  3. package/dist/common/cli/index.d.ts +10 -1
  4. package/dist/common/cli/index.js +1 -1
  5. package/dist/common/cli/index.js.map +1 -1
  6. package/dist/common/index.d.ts +33 -16
  7. package/dist/common/index.js +31 -31
  8. package/dist/common/index.js.map +1 -1
  9. package/dist/esm/account/AbstractKeylessAccount.d.mts +1 -1
  10. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  11. package/dist/esm/account/Account.d.mts +1 -1
  12. package/dist/esm/account/Account.mjs +1 -1
  13. package/dist/esm/account/Ed25519Account.d.mts +1 -1
  14. package/dist/esm/account/Ed25519Account.mjs +1 -1
  15. package/dist/esm/account/EphemeralKeyPair.d.mts +1 -1
  16. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  17. package/dist/esm/account/FederatedKeylessAccount.d.mts +1 -1
  18. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  19. package/dist/esm/account/KeylessAccount.d.mts +1 -1
  20. package/dist/esm/account/KeylessAccount.mjs +1 -1
  21. package/dist/esm/account/MultiKeyAccount.d.mts +1 -1
  22. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  23. package/dist/esm/account/SingleKeyAccount.d.mts +1 -1
  24. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  25. package/dist/esm/account/index.d.mts +1 -1
  26. package/dist/esm/account/index.mjs +1 -1
  27. package/dist/esm/api/account.d.mts +1 -1
  28. package/dist/esm/api/account.mjs +1 -1
  29. package/dist/esm/api/ans.d.mts +1 -1
  30. package/dist/esm/api/ans.mjs +1 -1
  31. package/dist/esm/api/aptos.d.mts +1 -1
  32. package/dist/esm/api/aptos.mjs +1 -1
  33. package/dist/esm/api/aptosConfig.d.mts +1 -1
  34. package/dist/esm/api/aptosConfig.mjs +1 -1
  35. package/dist/esm/api/coin.d.mts +3 -3
  36. package/dist/esm/api/coin.mjs +1 -1
  37. package/dist/esm/api/digitalAsset.d.mts +1 -1
  38. package/dist/esm/api/digitalAsset.mjs +1 -1
  39. package/dist/esm/api/event.d.mts +1 -1
  40. package/dist/esm/api/event.mjs +1 -1
  41. package/dist/esm/api/faucet.d.mts +1 -1
  42. package/dist/esm/api/faucet.mjs +1 -1
  43. package/dist/esm/api/fungibleAsset.d.mts +1 -1
  44. package/dist/esm/api/fungibleAsset.mjs +1 -1
  45. package/dist/esm/api/general.d.mts +1 -1
  46. package/dist/esm/api/general.mjs +1 -1
  47. package/dist/esm/api/index.d.mts +1 -1
  48. package/dist/esm/api/index.mjs +1 -1
  49. package/dist/esm/api/keyless.d.mts +2 -2
  50. package/dist/esm/api/keyless.mjs +1 -1
  51. package/dist/esm/api/object.d.mts +1 -1
  52. package/dist/esm/api/object.mjs +1 -1
  53. package/dist/esm/api/staking.d.mts +1 -1
  54. package/dist/esm/api/staking.mjs +1 -1
  55. package/dist/esm/api/table.d.mts +1 -1
  56. package/dist/esm/api/table.mjs +1 -1
  57. package/dist/esm/api/transaction.d.mts +1 -1
  58. package/dist/esm/api/transaction.mjs +1 -1
  59. package/dist/esm/api/transactionSubmission/build.d.mts +1 -1
  60. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  61. package/dist/esm/api/transactionSubmission/helpers.mjs +1 -1
  62. package/dist/esm/api/transactionSubmission/management.d.mts +1 -1
  63. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  64. package/dist/esm/api/transactionSubmission/sign.d.mts +1 -1
  65. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  66. package/dist/esm/api/transactionSubmission/simulate.d.mts +10 -9
  67. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  68. package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
  69. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  70. package/dist/esm/api/utils.d.mts +1 -1
  71. package/dist/esm/api/utils.mjs +1 -1
  72. package/dist/esm/bcs/consts.d.mts +1 -1
  73. package/dist/esm/bcs/deserializer.d.mts +1 -1
  74. package/dist/esm/bcs/index.d.mts +1 -1
  75. package/dist/esm/bcs/index.mjs +1 -1
  76. package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +1 -1
  77. package/dist/esm/bcs/serializable/fixedBytes.d.mts +1 -1
  78. package/dist/esm/bcs/serializable/movePrimitives.d.mts +1 -1
  79. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  80. package/dist/esm/bcs/serializable/moveStructs.d.mts +1 -1
  81. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  82. package/dist/esm/bcs/serializer.d.mts +1 -1
  83. package/dist/esm/{chunk-HEHVWRMO.mjs → chunk-2E3BT4YW.mjs} +2 -2
  84. package/dist/esm/{chunk-JDNI5VIJ.mjs → chunk-2E3EAJPC.mjs} +2 -2
  85. package/dist/esm/chunk-2OF44LP4.mjs +2 -0
  86. package/dist/esm/chunk-2OF44LP4.mjs.map +1 -0
  87. package/dist/esm/{chunk-AVPQOD67.mjs → chunk-2VDQXUT4.mjs} +2 -2
  88. package/dist/esm/{chunk-5AKSORBJ.mjs → chunk-353SWAAB.mjs} +2 -2
  89. package/dist/esm/{chunk-6PJH53CK.mjs → chunk-3NPN2MSI.mjs} +2 -2
  90. package/dist/esm/chunk-3OLFJ65O.mjs +2 -0
  91. package/dist/esm/chunk-3OLFJ65O.mjs.map +1 -0
  92. package/dist/esm/{chunk-JJUINAQE.mjs → chunk-3R3XGOPC.mjs} +2 -2
  93. package/dist/esm/chunk-3R3XGOPC.mjs.map +1 -0
  94. package/dist/esm/{chunk-F2AIWA7L.mjs → chunk-4FIBPKCN.mjs} +2 -2
  95. package/dist/esm/{chunk-HXXELLHN.mjs → chunk-4GNR3AQF.mjs} +2 -2
  96. package/dist/esm/{chunk-IBMZYDAR.mjs → chunk-4IQZOAN7.mjs} +2 -2
  97. package/dist/esm/{chunk-LAAFLCDM.mjs → chunk-5BZEH4H5.mjs} +2 -2
  98. package/dist/esm/{chunk-WSFHH3BK.mjs → chunk-5O3RHPER.mjs} +2 -2
  99. package/dist/esm/{chunk-SBCLBDCP.mjs → chunk-632VRZYX.mjs} +2 -2
  100. package/dist/esm/chunk-6H5QNZRH.mjs +2 -0
  101. package/dist/esm/chunk-6H5QNZRH.mjs.map +1 -0
  102. package/dist/esm/{chunk-DDVOBEJA.mjs → chunk-6NEN65HA.mjs} +2 -2
  103. package/dist/esm/{chunk-GBVRCWCD.mjs → chunk-6YJW6OC5.mjs} +2 -2
  104. package/dist/esm/{chunk-DSKAMBBL.mjs → chunk-7M3NKATD.mjs} +2 -2
  105. package/dist/esm/{chunk-AHWZA3GD.mjs → chunk-7RYYUO4V.mjs} +2 -2
  106. package/dist/esm/chunk-7RYYUO4V.mjs.map +1 -0
  107. package/dist/esm/{chunk-L2QVUMBV.mjs → chunk-A3USS2NC.mjs} +2 -2
  108. package/dist/esm/{chunk-46L6BAJG.mjs → chunk-A6AAR5TS.mjs} +2 -2
  109. package/dist/esm/{chunk-DP3YPGIK.mjs → chunk-B77HJ77O.mjs} +2 -2
  110. package/dist/esm/{chunk-HFWFDS6Y.mjs → chunk-BFBRLEQM.mjs} +2 -2
  111. package/dist/esm/{chunk-NHKAQRJB.mjs → chunk-BMAIA7QJ.mjs} +2 -2
  112. package/dist/esm/{chunk-AAATWCJT.mjs → chunk-BU6PBOHF.mjs} +2 -2
  113. package/dist/esm/{chunk-4YEOOZ2N.mjs → chunk-CGDYWQSB.mjs} +2 -2
  114. package/dist/esm/{chunk-PW3ISXPN.mjs → chunk-CK5NDXQT.mjs} +2 -2
  115. package/dist/esm/{chunk-XT5T5LAP.mjs → chunk-CW6P2DDJ.mjs} +2 -2
  116. package/dist/esm/{chunk-X3JPX7T6.mjs → chunk-D54FD6XE.mjs} +2 -2
  117. package/dist/esm/chunk-DSKXYJFZ.mjs +2 -0
  118. package/dist/esm/chunk-DSKXYJFZ.mjs.map +1 -0
  119. package/dist/esm/{chunk-VCY3JGZM.mjs → chunk-DULHBLPY.mjs} +2 -2
  120. package/dist/esm/chunk-FZDEGDUY.mjs +2 -0
  121. package/dist/esm/{chunk-AITN3DO4.mjs.map → chunk-FZDEGDUY.mjs.map} +1 -1
  122. package/dist/esm/{chunk-ZRWZIAF5.mjs → chunk-HMDLBOCN.mjs} +2 -2
  123. package/dist/esm/{chunk-E2NYQVP3.mjs → chunk-HPYBNJ7J.mjs} +2 -2
  124. package/dist/esm/chunk-IHGA5KAD.mjs +2 -0
  125. package/dist/esm/{chunk-I2NMCLNW.mjs.map → chunk-IHGA5KAD.mjs.map} +1 -1
  126. package/dist/esm/{chunk-BLLHTGAP.mjs → chunk-IT42PQ4G.mjs} +2 -2
  127. package/dist/esm/{chunk-J245N3XF.mjs → chunk-J7PJSK3J.mjs} +2 -2
  128. package/dist/esm/{chunk-J245N3XF.mjs.map → chunk-J7PJSK3J.mjs.map} +1 -1
  129. package/dist/esm/{chunk-CA3Q2X6B.mjs → chunk-JEKZN7SO.mjs} +2 -2
  130. package/dist/esm/{chunk-XUP6VABV.mjs → chunk-L365GPP2.mjs} +2 -2
  131. package/dist/esm/{chunk-6LLGRGCN.mjs → chunk-LRN4ALMT.mjs} +2 -2
  132. package/dist/esm/{chunk-3DQVGPFE.mjs → chunk-MPEPVGWG.mjs} +2 -2
  133. package/dist/esm/{chunk-K4TJRYGQ.mjs → chunk-MWWYVW65.mjs} +2 -2
  134. package/dist/esm/{chunk-MOGPSSTD.mjs → chunk-NQW2T6H6.mjs} +2 -2
  135. package/dist/esm/{chunk-YNT7JHMS.mjs → chunk-O4MRRWRI.mjs} +2 -2
  136. package/dist/esm/{chunk-ONFKJ57C.mjs → chunk-OCE3XXUA.mjs} +2 -2
  137. package/dist/esm/{chunk-KT3DT5GV.mjs → chunk-P6RNNESB.mjs} +2 -2
  138. package/dist/esm/{chunk-II654QZU.mjs → chunk-PKWX45UR.mjs} +2 -2
  139. package/dist/esm/{chunk-TM7OZT3W.mjs → chunk-Q3CWUEXI.mjs} +2 -2
  140. package/dist/esm/{chunk-H457BI3I.mjs → chunk-QAYDBQJZ.mjs} +2 -2
  141. package/dist/esm/chunk-QCUXDDCU.mjs +2 -0
  142. package/dist/esm/chunk-QCUXDDCU.mjs.map +1 -0
  143. package/dist/esm/{chunk-KA5FX53Q.mjs → chunk-RKMIDNYX.mjs} +2 -2
  144. package/dist/esm/{chunk-SU2WB34N.mjs → chunk-S22QVNK7.mjs} +2 -2
  145. package/dist/esm/{chunk-37Y54PJ5.mjs → chunk-SBQJ3A7H.mjs} +2 -2
  146. package/dist/esm/{chunk-YPBNYKOD.mjs → chunk-SFSQ2TIU.mjs} +2 -2
  147. package/dist/esm/{chunk-JLD7DLKM.mjs → chunk-T6QKKUEK.mjs} +2 -2
  148. package/dist/esm/{chunk-4DNCQM3S.mjs → chunk-THRFTTUG.mjs} +2 -2
  149. package/dist/esm/{chunk-G2GN4LH5.mjs → chunk-TIKXNQYC.mjs} +2 -2
  150. package/dist/esm/{chunk-FXUI3SSD.mjs → chunk-TQA6HY6A.mjs} +2 -2
  151. package/dist/esm/{chunk-3XCYCFYI.mjs → chunk-TXD342Q6.mjs} +2 -2
  152. package/dist/esm/chunk-U2PRGW4O.mjs +2 -0
  153. package/dist/esm/chunk-U2PRGW4O.mjs.map +1 -0
  154. package/dist/esm/{chunk-2NHQQQZK.mjs → chunk-UKXLESMW.mjs} +2 -2
  155. package/dist/esm/{chunk-OJBMR5CT.mjs → chunk-UTOO6IVJ.mjs} +2 -2
  156. package/dist/esm/{chunk-2QBCTW67.mjs → chunk-UZGSDK63.mjs} +2 -2
  157. package/dist/esm/{chunk-7WXDXBXK.mjs → chunk-VUZFKJBB.mjs} +2 -2
  158. package/dist/esm/{chunk-5NJWJXSS.mjs → chunk-WF3HSWHT.mjs} +2 -2
  159. package/dist/esm/{chunk-OKE3FXIP.mjs → chunk-XWUMN7TI.mjs} +2 -2
  160. package/dist/esm/{chunk-6K4TOFCO.mjs → chunk-YFIXGTWP.mjs} +2 -2
  161. package/dist/esm/{chunk-IDNDUJOK.mjs → chunk-YM6SNW4X.mjs} +2 -2
  162. package/dist/esm/chunk-YQHOQJRQ.mjs +2 -0
  163. package/dist/esm/{chunk-AMCJQIOT.mjs.map → chunk-YQHOQJRQ.mjs.map} +1 -1
  164. package/dist/esm/{chunk-WGIYSLH6.mjs → chunk-YSBSCW5S.mjs} +2 -2
  165. package/dist/esm/{chunk-WKNX43KN.mjs → chunk-YT3IP57B.mjs} +2 -2
  166. package/dist/esm/{chunk-NARS3JDH.mjs → chunk-YZFMBFJN.mjs} +2 -2
  167. package/dist/esm/cli/index.d.mts +1 -1
  168. package/dist/esm/cli/index.mjs +1 -1
  169. package/dist/esm/cli/move.d.mts +10 -1
  170. package/dist/esm/cli/move.mjs +1 -1
  171. package/dist/esm/client/core.d.mts +1 -1
  172. package/dist/esm/client/core.mjs +1 -1
  173. package/dist/esm/client/get.d.mts +1 -1
  174. package/dist/esm/client/get.mjs +1 -1
  175. package/dist/esm/client/index.d.mts +1 -1
  176. package/dist/esm/client/index.mjs +1 -1
  177. package/dist/esm/client/post.d.mts +1 -1
  178. package/dist/esm/client/post.mjs +1 -1
  179. package/dist/esm/core/account/index.d.mts +1 -1
  180. package/dist/esm/core/account/index.mjs +1 -1
  181. package/dist/esm/core/account/utils/address.d.mts +1 -1
  182. package/dist/esm/core/account/utils/address.mjs +1 -1
  183. package/dist/esm/core/account/utils/index.d.mts +1 -1
  184. package/dist/esm/core/account/utils/index.mjs +1 -1
  185. package/dist/esm/core/accountAddress.d.mts +1 -1
  186. package/dist/esm/core/accountAddress.mjs +1 -1
  187. package/dist/esm/core/authenticationKey.d.mts +1 -1
  188. package/dist/esm/core/authenticationKey.mjs +1 -1
  189. package/dist/esm/core/crypto/ed25519.d.mts +1 -1
  190. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  191. package/dist/esm/core/crypto/ephemeral.d.mts +1 -1
  192. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  193. package/dist/esm/core/crypto/federatedKeyless.d.mts +1 -1
  194. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  195. package/dist/esm/core/crypto/index.d.mts +1 -1
  196. package/dist/esm/core/crypto/index.mjs +1 -1
  197. package/dist/esm/core/crypto/keyless.d.mts +1 -1
  198. package/dist/esm/core/crypto/keyless.mjs +1 -1
  199. package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
  200. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  201. package/dist/esm/core/crypto/multiKey.d.mts +1 -1
  202. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  203. package/dist/esm/core/crypto/privateKey.d.mts +1 -1
  204. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  205. package/dist/esm/core/crypto/proof.d.mts +1 -1
  206. package/dist/esm/core/crypto/proof.mjs +1 -1
  207. package/dist/esm/core/crypto/publicKey.d.mts +1 -1
  208. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  209. package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
  210. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  211. package/dist/esm/core/crypto/signature.d.mts +1 -1
  212. package/dist/esm/core/crypto/signature.mjs +1 -1
  213. package/dist/esm/core/crypto/singleKey.d.mts +1 -1
  214. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  215. package/dist/esm/core/crypto/utils.d.mts +1 -1
  216. package/dist/esm/core/hex.d.mts +1 -1
  217. package/dist/esm/core/index.d.mts +1 -1
  218. package/dist/esm/core/index.mjs +1 -1
  219. package/dist/esm/errors/index.d.mts +1 -1
  220. package/dist/esm/errors/index.mjs +1 -1
  221. package/dist/esm/index.d.mts +3 -3
  222. package/dist/esm/index.mjs +1 -1
  223. package/dist/esm/internal/account.d.mts +1 -1
  224. package/dist/esm/internal/account.mjs +1 -1
  225. package/dist/esm/internal/ans.d.mts +1 -1
  226. package/dist/esm/internal/ans.mjs +1 -1
  227. package/dist/esm/internal/coin.d.mts +1 -1
  228. package/dist/esm/internal/coin.mjs +1 -1
  229. package/dist/esm/internal/digitalAsset.d.mts +1 -1
  230. package/dist/esm/internal/digitalAsset.mjs +1 -1
  231. package/dist/esm/internal/event.d.mts +1 -1
  232. package/dist/esm/internal/event.mjs +1 -1
  233. package/dist/esm/internal/faucet.d.mts +1 -1
  234. package/dist/esm/internal/faucet.mjs +1 -1
  235. package/dist/esm/internal/fungibleAsset.d.mts +1 -1
  236. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  237. package/dist/esm/internal/general.d.mts +1 -1
  238. package/dist/esm/internal/general.mjs +1 -1
  239. package/dist/esm/internal/keyless.d.mts +1 -1
  240. package/dist/esm/internal/keyless.mjs +1 -1
  241. package/dist/esm/internal/object.d.mts +1 -1
  242. package/dist/esm/internal/object.mjs +1 -1
  243. package/dist/esm/internal/staking.d.mts +1 -1
  244. package/dist/esm/internal/staking.mjs +1 -1
  245. package/dist/esm/internal/table.d.mts +1 -1
  246. package/dist/esm/internal/table.mjs +1 -1
  247. package/dist/esm/internal/transaction.d.mts +1 -1
  248. package/dist/esm/internal/transaction.mjs +1 -1
  249. package/dist/esm/internal/transactionSubmission.d.mts +2 -2
  250. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  251. package/dist/esm/internal/view.d.mts +1 -1
  252. package/dist/esm/internal/view.mjs +1 -1
  253. package/dist/esm/transactions/authenticator/account.d.mts +11 -2
  254. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  255. package/dist/esm/transactions/authenticator/index.d.mts +2 -2
  256. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  257. package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
  258. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  259. package/dist/esm/transactions/index.d.mts +2 -2
  260. package/dist/esm/transactions/index.mjs +1 -1
  261. package/dist/esm/transactions/instances/chainId.d.mts +1 -1
  262. package/dist/esm/transactions/instances/identifier.d.mts +1 -1
  263. package/dist/esm/transactions/instances/index.d.mts +1 -1
  264. package/dist/esm/transactions/instances/index.mjs +1 -1
  265. package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
  266. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  267. package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +1 -1
  268. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  269. package/dist/esm/transactions/instances/rawTransaction.d.mts +1 -1
  270. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  271. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
  272. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  273. package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
  274. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  275. package/dist/esm/transactions/instances/simpleTransaction.d.mts +1 -1
  276. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  277. package/dist/esm/transactions/instances/transactionArgument.d.mts +1 -1
  278. package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
  279. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  280. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +1 -1
  281. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  282. package/dist/esm/transactions/management/index.d.mts +1 -1
  283. package/dist/esm/transactions/management/index.mjs +1 -1
  284. package/dist/esm/transactions/management/transactionWorker.d.mts +1 -1
  285. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  286. package/dist/esm/transactions/script-composer/index.d.mts +1 -1
  287. package/dist/esm/transactions/script-composer/index.mjs +1 -1
  288. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +1 -1
  289. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  290. package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
  291. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  292. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -1
  293. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  294. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +1 -1
  295. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  296. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +3 -3
  297. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  298. package/dist/esm/transactions/typeTag/index.d.mts +1 -1
  299. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  300. package/dist/esm/transactions/typeTag/parser.d.mts +1 -1
  301. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  302. package/dist/esm/transactions/types.d.mts +4 -3
  303. package/dist/esm/types/index.d.mts +1 -1
  304. package/dist/esm/types/index.mjs +1 -1
  305. package/dist/esm/types/types.d.mts +3 -2
  306. package/dist/esm/types/types.mjs +1 -1
  307. package/dist/esm/utils/const.d.mts +7 -1
  308. package/dist/esm/utils/const.mjs +1 -1
  309. package/dist/esm/utils/helpers.d.mts +1 -1
  310. package/dist/esm/utils/index.d.mts +2 -2
  311. package/dist/esm/utils/index.mjs +1 -1
  312. package/dist/esm/utils/normalizeBundle.d.mts +1 -1
  313. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  314. package/dist/esm/version.d.mts +1 -1
  315. package/dist/esm/version.mjs +1 -1
  316. package/package.json +3 -3
  317. package/src/api/transactionSubmission/helpers.ts +0 -6
  318. package/src/api/transactionSubmission/simulate.ts +9 -8
  319. package/src/cli/move.ts +16 -0
  320. package/src/internal/keyless.ts +11 -1
  321. package/src/internal/transactionSubmission.ts +1 -1
  322. package/src/transactions/authenticator/account.ts +19 -0
  323. package/src/transactions/script-composer/index.ts +1 -1
  324. package/src/transactions/transactionBuilder/transactionBuilder.ts +25 -17
  325. package/src/transactions/types.ts +4 -3
  326. package/src/types/index.ts +1 -1
  327. package/src/types/types.ts +1 -0
  328. package/src/utils/const.ts +7 -0
  329. package/src/version.ts +1 -1
  330. package/dist/esm/chunk-4PBXTMN3.mjs +0 -2
  331. package/dist/esm/chunk-4PBXTMN3.mjs.map +0 -1
  332. package/dist/esm/chunk-AHWZA3GD.mjs.map +0 -1
  333. package/dist/esm/chunk-AITN3DO4.mjs +0 -2
  334. package/dist/esm/chunk-AMCJQIOT.mjs +0 -2
  335. package/dist/esm/chunk-EEB7EZFO.mjs +0 -2
  336. package/dist/esm/chunk-EEB7EZFO.mjs.map +0 -1
  337. package/dist/esm/chunk-I2NMCLNW.mjs +0 -2
  338. package/dist/esm/chunk-JJUINAQE.mjs.map +0 -1
  339. package/dist/esm/chunk-L56DQ4N3.mjs +0 -2
  340. package/dist/esm/chunk-L56DQ4N3.mjs.map +0 -1
  341. package/dist/esm/chunk-WQF3IOXC.mjs +0 -2
  342. package/dist/esm/chunk-WQF3IOXC.mjs.map +0 -1
  343. package/dist/esm/chunk-XKOSS5KC.mjs +0 -2
  344. package/dist/esm/chunk-XKOSS5KC.mjs.map +0 -1
  345. package/dist/esm/chunk-YZ3YPLEU.mjs +0 -2
  346. package/dist/esm/chunk-YZ3YPLEU.mjs.map +0 -1
  347. /package/dist/esm/{chunk-HEHVWRMO.mjs.map → chunk-2E3BT4YW.mjs.map} +0 -0
  348. /package/dist/esm/{chunk-JDNI5VIJ.mjs.map → chunk-2E3EAJPC.mjs.map} +0 -0
  349. /package/dist/esm/{chunk-AVPQOD67.mjs.map → chunk-2VDQXUT4.mjs.map} +0 -0
  350. /package/dist/esm/{chunk-5AKSORBJ.mjs.map → chunk-353SWAAB.mjs.map} +0 -0
  351. /package/dist/esm/{chunk-6PJH53CK.mjs.map → chunk-3NPN2MSI.mjs.map} +0 -0
  352. /package/dist/esm/{chunk-F2AIWA7L.mjs.map → chunk-4FIBPKCN.mjs.map} +0 -0
  353. /package/dist/esm/{chunk-HXXELLHN.mjs.map → chunk-4GNR3AQF.mjs.map} +0 -0
  354. /package/dist/esm/{chunk-IBMZYDAR.mjs.map → chunk-4IQZOAN7.mjs.map} +0 -0
  355. /package/dist/esm/{chunk-LAAFLCDM.mjs.map → chunk-5BZEH4H5.mjs.map} +0 -0
  356. /package/dist/esm/{chunk-WSFHH3BK.mjs.map → chunk-5O3RHPER.mjs.map} +0 -0
  357. /package/dist/esm/{chunk-SBCLBDCP.mjs.map → chunk-632VRZYX.mjs.map} +0 -0
  358. /package/dist/esm/{chunk-DDVOBEJA.mjs.map → chunk-6NEN65HA.mjs.map} +0 -0
  359. /package/dist/esm/{chunk-GBVRCWCD.mjs.map → chunk-6YJW6OC5.mjs.map} +0 -0
  360. /package/dist/esm/{chunk-DSKAMBBL.mjs.map → chunk-7M3NKATD.mjs.map} +0 -0
  361. /package/dist/esm/{chunk-L2QVUMBV.mjs.map → chunk-A3USS2NC.mjs.map} +0 -0
  362. /package/dist/esm/{chunk-46L6BAJG.mjs.map → chunk-A6AAR5TS.mjs.map} +0 -0
  363. /package/dist/esm/{chunk-DP3YPGIK.mjs.map → chunk-B77HJ77O.mjs.map} +0 -0
  364. /package/dist/esm/{chunk-HFWFDS6Y.mjs.map → chunk-BFBRLEQM.mjs.map} +0 -0
  365. /package/dist/esm/{chunk-NHKAQRJB.mjs.map → chunk-BMAIA7QJ.mjs.map} +0 -0
  366. /package/dist/esm/{chunk-AAATWCJT.mjs.map → chunk-BU6PBOHF.mjs.map} +0 -0
  367. /package/dist/esm/{chunk-4YEOOZ2N.mjs.map → chunk-CGDYWQSB.mjs.map} +0 -0
  368. /package/dist/esm/{chunk-PW3ISXPN.mjs.map → chunk-CK5NDXQT.mjs.map} +0 -0
  369. /package/dist/esm/{chunk-XT5T5LAP.mjs.map → chunk-CW6P2DDJ.mjs.map} +0 -0
  370. /package/dist/esm/{chunk-X3JPX7T6.mjs.map → chunk-D54FD6XE.mjs.map} +0 -0
  371. /package/dist/esm/{chunk-VCY3JGZM.mjs.map → chunk-DULHBLPY.mjs.map} +0 -0
  372. /package/dist/esm/{chunk-ZRWZIAF5.mjs.map → chunk-HMDLBOCN.mjs.map} +0 -0
  373. /package/dist/esm/{chunk-E2NYQVP3.mjs.map → chunk-HPYBNJ7J.mjs.map} +0 -0
  374. /package/dist/esm/{chunk-BLLHTGAP.mjs.map → chunk-IT42PQ4G.mjs.map} +0 -0
  375. /package/dist/esm/{chunk-CA3Q2X6B.mjs.map → chunk-JEKZN7SO.mjs.map} +0 -0
  376. /package/dist/esm/{chunk-XUP6VABV.mjs.map → chunk-L365GPP2.mjs.map} +0 -0
  377. /package/dist/esm/{chunk-6LLGRGCN.mjs.map → chunk-LRN4ALMT.mjs.map} +0 -0
  378. /package/dist/esm/{chunk-3DQVGPFE.mjs.map → chunk-MPEPVGWG.mjs.map} +0 -0
  379. /package/dist/esm/{chunk-K4TJRYGQ.mjs.map → chunk-MWWYVW65.mjs.map} +0 -0
  380. /package/dist/esm/{chunk-MOGPSSTD.mjs.map → chunk-NQW2T6H6.mjs.map} +0 -0
  381. /package/dist/esm/{chunk-YNT7JHMS.mjs.map → chunk-O4MRRWRI.mjs.map} +0 -0
  382. /package/dist/esm/{chunk-ONFKJ57C.mjs.map → chunk-OCE3XXUA.mjs.map} +0 -0
  383. /package/dist/esm/{chunk-KT3DT5GV.mjs.map → chunk-P6RNNESB.mjs.map} +0 -0
  384. /package/dist/esm/{chunk-II654QZU.mjs.map → chunk-PKWX45UR.mjs.map} +0 -0
  385. /package/dist/esm/{chunk-TM7OZT3W.mjs.map → chunk-Q3CWUEXI.mjs.map} +0 -0
  386. /package/dist/esm/{chunk-H457BI3I.mjs.map → chunk-QAYDBQJZ.mjs.map} +0 -0
  387. /package/dist/esm/{chunk-KA5FX53Q.mjs.map → chunk-RKMIDNYX.mjs.map} +0 -0
  388. /package/dist/esm/{chunk-SU2WB34N.mjs.map → chunk-S22QVNK7.mjs.map} +0 -0
  389. /package/dist/esm/{chunk-37Y54PJ5.mjs.map → chunk-SBQJ3A7H.mjs.map} +0 -0
  390. /package/dist/esm/{chunk-YPBNYKOD.mjs.map → chunk-SFSQ2TIU.mjs.map} +0 -0
  391. /package/dist/esm/{chunk-JLD7DLKM.mjs.map → chunk-T6QKKUEK.mjs.map} +0 -0
  392. /package/dist/esm/{chunk-4DNCQM3S.mjs.map → chunk-THRFTTUG.mjs.map} +0 -0
  393. /package/dist/esm/{chunk-G2GN4LH5.mjs.map → chunk-TIKXNQYC.mjs.map} +0 -0
  394. /package/dist/esm/{chunk-FXUI3SSD.mjs.map → chunk-TQA6HY6A.mjs.map} +0 -0
  395. /package/dist/esm/{chunk-3XCYCFYI.mjs.map → chunk-TXD342Q6.mjs.map} +0 -0
  396. /package/dist/esm/{chunk-2NHQQQZK.mjs.map → chunk-UKXLESMW.mjs.map} +0 -0
  397. /package/dist/esm/{chunk-OJBMR5CT.mjs.map → chunk-UTOO6IVJ.mjs.map} +0 -0
  398. /package/dist/esm/{chunk-2QBCTW67.mjs.map → chunk-UZGSDK63.mjs.map} +0 -0
  399. /package/dist/esm/{chunk-7WXDXBXK.mjs.map → chunk-VUZFKJBB.mjs.map} +0 -0
  400. /package/dist/esm/{chunk-5NJWJXSS.mjs.map → chunk-WF3HSWHT.mjs.map} +0 -0
  401. /package/dist/esm/{chunk-OKE3FXIP.mjs.map → chunk-XWUMN7TI.mjs.map} +0 -0
  402. /package/dist/esm/{chunk-6K4TOFCO.mjs.map → chunk-YFIXGTWP.mjs.map} +0 -0
  403. /package/dist/esm/{chunk-IDNDUJOK.mjs.map → chunk-YM6SNW4X.mjs.map} +0 -0
  404. /package/dist/esm/{chunk-WGIYSLH6.mjs.map → chunk-YSBSCW5S.mjs.map} +0 -0
  405. /package/dist/esm/{chunk-WKNX43KN.mjs.map → chunk-YT3IP57B.mjs.map} +0 -0
  406. /package/dist/esm/{chunk-NARS3JDH.mjs.map → chunk-YZFMBFJN.mjs.map} +0 -0
@@ -648,7 +648,8 @@ declare enum AccountAuthenticatorVariant {
648
648
  Ed25519 = 0,
649
649
  MultiEd25519 = 1,
650
650
  SingleKey = 2,
651
- MultiKey = 3
651
+ MultiKey = 3,
652
+ NoAccountAuthenticator = 4
652
653
  }
653
654
  /**
654
655
  * Variants of private keys that can comply with the AIP-80 standard.
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/oliverhe/aptos-ts-sdk/dist/common/chunk-F43XVDYJ.js","../../src/utils/helpers.ts"],"names":["sleep","timeMs","resolve","getErrorMessage","error","nowInSeconds","floorToWholeHour","timestampInSeconds","date","base64UrlDecode","base64Url","base64","paddedBase64","decode","convertAmountFromHumanReadableToOnChain","value","decimal","convertAmountFromOnChainToHumanReadable","hexToAscii","hex","str","n","parseEncodedStruct","structObj","account_address","module_name","struct_name","moduleName","structName"],"mappings":"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","file":"/Users/oliverhe/aptos-ts-sdk/dist/common/chunk-F43XVDYJ.js","sourcesContent":[null,"// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { decode } from \"js-base64\";\nimport { MoveStructId } from \"../types\";\n\n/**\n * Sleep for the specified amount of time in milliseconds.\n * This function can be used to introduce delays in asynchronous operations.\n *\n * @param timeMs - The time in milliseconds to sleep.\n */\nexport async function sleep(timeMs: number): Promise<null> {\n return new Promise((resolve) => {\n setTimeout(resolve, timeMs);\n });\n}\n\n/**\n * Get the error message from an unknown error.\n *\n * @param error The error to get the message from\n * @returns The error message\n */\nexport function getErrorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\nexport const nowInSeconds = () => Math.floor(Date.now() / 1000);\n\n/**\n * Floors the given timestamp to the nearest whole hour.\n * This function is useful for normalizing timestamps to hourly intervals.\n *\n * @param timestampInSeconds - The timestamp in seconds to be floored.\n */\nexport function floorToWholeHour(timestampInSeconds: number): number {\n const date = new Date(timestampInSeconds * 1000);\n // Reset minutes and seconds to zero\n date.setMinutes(0);\n date.setSeconds(0);\n date.setMilliseconds(0);\n return Math.floor(date.getTime() / 1000);\n}\n\n/**\n * Decodes a base64 URL-encoded string into its original form.\n * This function is useful for converting base64 URL-encoded data back to a readable format.\n *\n * @param base64Url - The base64 URL-encoded string to decode.\n * @returns The decoded string.\n */\nexport function base64UrlDecode(base64Url: string): string {\n // Replace base64url-specific characters\n const base64 = base64Url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n // Pad the string with '=' characters if needed\n const paddedBase64 = base64 + \"==\".substring(0, (3 - (base64.length % 3)) % 3);\n const decodedString = decode(paddedBase64);\n return decodedString;\n}\n\n/**\n * Amount is represented in the smallest unit format on chain, this function converts\n * a human-readable amount format to the smallest unit format\n * @example\n * human-readable amount format: 500\n * on chain amount format when decimal is 8: 50000000000\n *\n * @param value The value in human-readable format\n * @param decimal The token decimal\n * @returns The value in the smallest units\n */\nexport const convertAmountFromHumanReadableToOnChain = (value: number, decimal: number) => value * 10 ** decimal;\n\n/**\n * Amount is represented in the smallest unit format on chain, this function converts\n * the smallest unit format to a human-readable amount format\n * @example\n * human-readable amount format: 500\n * on chain amount format when decimal is 8: 50000000000\n *\n * @param value The value in human-readable format\n * @param decimal The token decimal\n * @returns The value in the smallest units\n */\nexport const convertAmountFromOnChainToHumanReadable = (value: number, decimal: number) => value / 10 ** decimal;\n\n/**\n * Convert a hex string to an ascii string with the `0x` prefix.\n *\n * `0x6170746f735f636f696e` --> `aptos_coin`\n *\n * @param hex The hex string to convert (e.g. `0x6170746f735f636f696e`)\n * @returns The ascii string\n */\nconst hexToAscii = (hex: string) => {\n let str = \"\";\n for (let n = 2; n < hex.length; n += 2) {\n str += String.fromCharCode(parseInt(hex.substring(n, n + 2), 16));\n }\n return str;\n};\n\n/**\n * Convert an encoded struct to a MoveStructId.\n *\n * @example\n * const structObj = {\n * account_address: \"0x1\",\n * module_name: \"0x6170746f735f636f696e\",\n * struct_name: \"0x4170746f73436f696e\",\n * };\n * // structId is \"0x1::aptos_coin::AptosCoin\"\n * const structId = parseEncodedStruct(structObj);\n *\n * @param structObj The struct with account_address, module_name, and struct_name properties\n * @returns The MoveStructId\n */\nexport const parseEncodedStruct = (structObj: {\n account_address: string;\n module_name: string;\n struct_name: string;\n}): MoveStructId => {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const { account_address, module_name, struct_name } = structObj;\n const moduleName = hexToAscii(module_name);\n const structName = hexToAscii(struct_name);\n return `${account_address}::${moduleName}::${structName}`;\n};\n\n/**\n * Determines whether the given object is an encoded struct type with the following properties:\n * - account_address: string\n * - module_name: string\n * - struct_name: string\n *\n * @param structObj The object to check\n * @returns Whether the object is an encoded struct type\n */\nexport const isEncodedStruct = (\n structObj: any,\n): structObj is {\n account_address: string;\n module_name: string;\n struct_name: string;\n} =>\n typeof structObj === \"object\" &&\n !Array.isArray(structObj) &&\n structObj !== null &&\n \"account_address\" in structObj &&\n \"module_name\" in structObj &&\n \"struct_name\" in structObj &&\n typeof structObj.account_address === \"string\" &&\n typeof structObj.module_name === \"string\" &&\n typeof structObj.struct_name === \"string\";\n"]}
1
+ {"version":3,"sources":["/Users/maayansavir/work/aptos_repos/aptos-ts-sdk/dist/common/chunk-F43XVDYJ.js","../../src/utils/helpers.ts"],"names":["sleep","timeMs","resolve","getErrorMessage","error","nowInSeconds","floorToWholeHour","timestampInSeconds","date","base64UrlDecode","base64Url","base64","paddedBase64","decode","convertAmountFromHumanReadableToOnChain","value","decimal","convertAmountFromOnChainToHumanReadable","hexToAscii","hex","str","n","parseEncodedStruct","structObj","account_address","module_name","struct_name","moduleName","structName"],"mappings":"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","file":"/Users/maayansavir/work/aptos_repos/aptos-ts-sdk/dist/common/chunk-F43XVDYJ.js","sourcesContent":[null,"// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { decode } from \"js-base64\";\nimport { MoveStructId } from \"../types\";\n\n/**\n * Sleep for the specified amount of time in milliseconds.\n * This function can be used to introduce delays in asynchronous operations.\n *\n * @param timeMs - The time in milliseconds to sleep.\n */\nexport async function sleep(timeMs: number): Promise<null> {\n return new Promise((resolve) => {\n setTimeout(resolve, timeMs);\n });\n}\n\n/**\n * Get the error message from an unknown error.\n *\n * @param error The error to get the message from\n * @returns The error message\n */\nexport function getErrorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\nexport const nowInSeconds = () => Math.floor(Date.now() / 1000);\n\n/**\n * Floors the given timestamp to the nearest whole hour.\n * This function is useful for normalizing timestamps to hourly intervals.\n *\n * @param timestampInSeconds - The timestamp in seconds to be floored.\n */\nexport function floorToWholeHour(timestampInSeconds: number): number {\n const date = new Date(timestampInSeconds * 1000);\n // Reset minutes and seconds to zero\n date.setMinutes(0);\n date.setSeconds(0);\n date.setMilliseconds(0);\n return Math.floor(date.getTime() / 1000);\n}\n\n/**\n * Decodes a base64 URL-encoded string into its original form.\n * This function is useful for converting base64 URL-encoded data back to a readable format.\n *\n * @param base64Url - The base64 URL-encoded string to decode.\n * @returns The decoded string.\n */\nexport function base64UrlDecode(base64Url: string): string {\n // Replace base64url-specific characters\n const base64 = base64Url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n // Pad the string with '=' characters if needed\n const paddedBase64 = base64 + \"==\".substring(0, (3 - (base64.length % 3)) % 3);\n const decodedString = decode(paddedBase64);\n return decodedString;\n}\n\n/**\n * Amount is represented in the smallest unit format on chain, this function converts\n * a human-readable amount format to the smallest unit format\n * @example\n * human-readable amount format: 500\n * on chain amount format when decimal is 8: 50000000000\n *\n * @param value The value in human-readable format\n * @param decimal The token decimal\n * @returns The value in the smallest units\n */\nexport const convertAmountFromHumanReadableToOnChain = (value: number, decimal: number) => value * 10 ** decimal;\n\n/**\n * Amount is represented in the smallest unit format on chain, this function converts\n * the smallest unit format to a human-readable amount format\n * @example\n * human-readable amount format: 500\n * on chain amount format when decimal is 8: 50000000000\n *\n * @param value The value in human-readable format\n * @param decimal The token decimal\n * @returns The value in the smallest units\n */\nexport const convertAmountFromOnChainToHumanReadable = (value: number, decimal: number) => value / 10 ** decimal;\n\n/**\n * Convert a hex string to an ascii string with the `0x` prefix.\n *\n * `0x6170746f735f636f696e` --> `aptos_coin`\n *\n * @param hex The hex string to convert (e.g. `0x6170746f735f636f696e`)\n * @returns The ascii string\n */\nconst hexToAscii = (hex: string) => {\n let str = \"\";\n for (let n = 2; n < hex.length; n += 2) {\n str += String.fromCharCode(parseInt(hex.substring(n, n + 2), 16));\n }\n return str;\n};\n\n/**\n * Convert an encoded struct to a MoveStructId.\n *\n * @example\n * const structObj = {\n * account_address: \"0x1\",\n * module_name: \"0x6170746f735f636f696e\",\n * struct_name: \"0x4170746f73436f696e\",\n * };\n * // structId is \"0x1::aptos_coin::AptosCoin\"\n * const structId = parseEncodedStruct(structObj);\n *\n * @param structObj The struct with account_address, module_name, and struct_name properties\n * @returns The MoveStructId\n */\nexport const parseEncodedStruct = (structObj: {\n account_address: string;\n module_name: string;\n struct_name: string;\n}): MoveStructId => {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const { account_address, module_name, struct_name } = structObj;\n const moduleName = hexToAscii(module_name);\n const structName = hexToAscii(struct_name);\n return `${account_address}::${moduleName}::${structName}`;\n};\n\n/**\n * Determines whether the given object is an encoded struct type with the following properties:\n * - account_address: string\n * - module_name: string\n * - struct_name: string\n *\n * @param structObj The object to check\n * @returns Whether the object is an encoded struct type\n */\nexport const isEncodedStruct = (\n structObj: any,\n): structObj is {\n account_address: string;\n module_name: string;\n struct_name: string;\n} =>\n typeof structObj === \"object\" &&\n !Array.isArray(structObj) &&\n structObj !== null &&\n \"account_address\" in structObj &&\n \"module_name\" in structObj &&\n \"struct_name\" in structObj &&\n typeof structObj.account_address === \"string\" &&\n typeof structObj.module_name === \"string\" &&\n typeof structObj.struct_name === \"string\";\n"]}
@@ -1,5 +1,5 @@
1
1
  import { ChildProcessWithoutNullStreams } from 'child_process';
2
- import { N as Network, g as AccountAddress } from '../accountAddress-6RqI8Aam.js';
2
+ import { N as Network, g as AccountAddress } from '../accountAddress-fJZJVSBc.js';
3
3
 
4
4
  /**
5
5
  * Represents a local node for running a testnet environment.
@@ -228,6 +228,15 @@ declare class Move {
228
228
  }): Promise<{
229
229
  output: string;
230
230
  }>;
231
+ gasProfile(args: {
232
+ network: string;
233
+ transactionId: string;
234
+ extraArguments?: Array<string>;
235
+ showStdout?: boolean;
236
+ }): Promise<{
237
+ output: string;
238
+ result?: any;
239
+ }>;
231
240
  /**
232
241
  * Run a command with the specified arguments and return the output.
233
242
  *
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkF43XVDYJjs = require('../chunk-F43XVDYJ.js');var _child_process = require('child_process');var _treekill = require('tree-kill'); var _treekill2 = _interopRequireDefault(_treekill);var _os = require('os');var l=class{constructor(s){this.MAXIMUM_WAIT_TIME_SEC=75;this.READINESS_ENDPOINT="http://127.0.0.1:8070/";this.showStdout=!0;this.process=null;this.showStdout=_nullishCoalesce(_optionalChain([s, 'optionalAccess', _ => _.showStdout]), () => (!0))}async stop(){await new Promise((s,e)=>{_optionalChain([this, 'access', _2 => _2.process, 'optionalAccess', _3 => _3.pid])&&_treekill2.default.call(void 0, this.process.pid,r=>{r?e(r):s(!0)})})}async run(){await this.checkIfProcessIsUp()||(this.start(),await this.waitUntilProcessIsUp())}start(){let s="npx",e=["aptos","node","run-localnet","--force-restart","--assume-yes","--with-indexer-api"],r=_os.platform.call(void 0, ),o;r==="win32"?o=_child_process.spawn.call(void 0, s,e,{shell:!0}):o=_child_process.spawn.call(void 0, s,e),this.process=o,_optionalChain([o, 'access', _4 => _4.stderr, 'optionalAccess', _5 => _5.on, 'call', _6 => _6("data",a=>{let t=a.toString();console.log(t)})]),_optionalChain([o, 'access', _7 => _7.stdout, 'optionalAccess', _8 => _8.on, 'call', _9 => _9("data",a=>{let t=a.toString();this.showStdout&&console.log(t)})])}async waitUntilProcessIsUp(){let s=await this.checkIfProcessIsUp(),e=Date.now()/1e3,r=e;for(;!s&&e+this.MAXIMUM_WAIT_TIME_SEC>r;)await _chunkF43XVDYJjs.b.call(void 0, 1e3),s=await this.checkIfProcessIsUp(),r=Date.now()/1e3;if(!s)throw new Error("Process failed to start");return!0}async checkIfProcessIsUp(){try{return(await fetch(this.READINESS_ENDPOINT)).status===200}catch (e2){return!1}}};var h=class{async init(s){let{network:e,profile:r,extraArguments:o,showStdout:a}=s,t=["aptos","init",`--network=${_nullishCoalesce(e, () => ("local"))}`,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return o&&t.push(...o),this.runCommand(t,a)}async compile(s){let{packageDirectoryPath:e,namedAddresses:r,extraArguments:o,showStdout:a}=s,t=["aptos","move","compile","--package-dir",e],n=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(n)),o&&t.push(...o),this.runCommand(t,a)}async test(s){let{packageDirectoryPath:e,namedAddresses:r,extraArguments:o,showStdout:a}=s,t=["aptos","move","test","--package-dir",e],n=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(n)),o&&t.push(...o),this.runCommand(t,a)}async publish(s){let{packageDirectoryPath:e,namedAddresses:r,profile:o,extraArguments:a,showStdout:t}=s,n=["aptos","move","publish","--package-dir",e,`--profile=${_nullishCoalesce(o, () => ("default"))}`],i=this.parseNamedAddresses(r);return n.push(...this.prepareNamedAddresses(i)),a&&n.push(...a),this.runCommand(n,t)}async createObjectAndPublishPackage(s){let{packageDirectoryPath:e,addressName:r,namedAddresses:o,profile:a,extraArguments:t,showStdout:n}=s,i=["aptos","move","create-object-and-publish-package","--package-dir",e,"--address-name",r,`--profile=${_nullishCoalesce(a, () => ("default"))}`],d=this.parseNamedAddresses(o);i.push(...this.prepareNamedAddresses(d)),t&&i.push(...t);let{output:c}=await this.runCommand(i,n);return{objectAddress:this.extractAddressFromOutput(c)}}async upgradeObjectPackage(s){let{packageDirectoryPath:e,objectAddress:r,namedAddresses:o,profile:a,extraArguments:t,showStdout:n}=s,i=["aptos","move","upgrade-object-package","--package-dir",e,"--object-address",r,`--profile=${_nullishCoalesce(a, () => ("default"))}`],d=this.parseNamedAddresses(o);return i.push(...this.prepareNamedAddresses(d)),t&&i.push(...t),this.runCommand(i,n)}async buildPublishPayload(s){let{outputFile:e,packageDirectoryPath:r,namedAddresses:o,extraArguments:a,showStdout:t}=s,n=["aptos","move","build-publish-payload","--json-output-file",e,"--package-dir",r],i=this.parseNamedAddresses(o);return n.push(...this.prepareNamedAddresses(i)),a&&n.push(...a),this.runCommand(n,t)}async runScript(s){let{compiledScriptPath:e,profile:r,extraArguments:o,showStdout:a}=s,t=["aptos","move","run-script","--compiled-script-path",e,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return o&&t.push(...o),this.runCommand(t,a)}async runCommand(s,e=!0){return new Promise((r,o)=>{let a=_os.platform.call(void 0, ),t,n="",i="";a==="win32"?t=_child_process.spawn.call(void 0, "npx",s,{shell:!0}):t=_child_process.spawn.call(void 0, "npx",s),t.stdout.on("data",d=>{i=d.toString(),n+=d.toString()}),e&&(t.stdout.pipe(process.stdout),t.stderr.pipe(process.stderr)),process.stdin.pipe(t.stdin),t.on("close",d=>{if(d===0)try{let c=JSON.parse(i);c.Error?o(new Error(`Error: ${c.Error}`)):c.Result&&r({result:c.Result,output:n})}catch (e3){r({output:n})}else o(new Error(`Child process exited with code ${d}`))})})}prepareNamedAddresses(s){let e=s.size,r=[];if(e===0)return r;r.push("--named-addresses");let o=[];return s.forEach((a,t)=>{let n=`${t}=${a.toString()}`;o.push(n)}),r.push(o.join(",")),r}parseNamedAddresses(s){let e=new Map;return Object.keys(s).forEach(r=>{let o=s[r];e.set(r,o)}),e}extractAddressFromOutput(s){let e=s.match("Code was successfully deployed to object address (0x[0-9a-fA-F]+)");if(e)return e[1];throw new Error("Failed to extract object address from output")}};exports.LocalNode = l; exports.Move = h;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkF43XVDYJjs = require('../chunk-F43XVDYJ.js');var _child_process = require('child_process');var _treekill = require('tree-kill'); var _treekill2 = _interopRequireDefault(_treekill);var _os = require('os');var l=class{constructor(s){this.MAXIMUM_WAIT_TIME_SEC=75;this.READINESS_ENDPOINT="http://127.0.0.1:8070/";this.showStdout=!0;this.process=null;this.showStdout=_nullishCoalesce(_optionalChain([s, 'optionalAccess', _ => _.showStdout]), () => (!0))}async stop(){await new Promise((s,o)=>{_optionalChain([this, 'access', _2 => _2.process, 'optionalAccess', _3 => _3.pid])&&_treekill2.default.call(void 0, this.process.pid,r=>{r?o(r):s(!0)})})}async run(){await this.checkIfProcessIsUp()||(this.start(),await this.waitUntilProcessIsUp())}start(){let s="npx",o=["aptos","node","run-localnet","--force-restart","--assume-yes","--with-indexer-api"],r=_os.platform.call(void 0, ),e;r==="win32"?e=_child_process.spawn.call(void 0, s,o,{shell:!0}):e=_child_process.spawn.call(void 0, s,o),this.process=e,_optionalChain([e, 'access', _4 => _4.stderr, 'optionalAccess', _5 => _5.on, 'call', _6 => _6("data",a=>{let t=a.toString();console.log(t)})]),_optionalChain([e, 'access', _7 => _7.stdout, 'optionalAccess', _8 => _8.on, 'call', _9 => _9("data",a=>{let t=a.toString();this.showStdout&&console.log(t)})])}async waitUntilProcessIsUp(){let s=await this.checkIfProcessIsUp(),o=Date.now()/1e3,r=o;for(;!s&&o+this.MAXIMUM_WAIT_TIME_SEC>r;)await _chunkF43XVDYJjs.b.call(void 0, 1e3),s=await this.checkIfProcessIsUp(),r=Date.now()/1e3;if(!s)throw new Error("Process failed to start");return!0}async checkIfProcessIsUp(){try{return(await fetch(this.READINESS_ENDPOINT)).status===200}catch (e2){return!1}}};var h=class{async init(s){let{network:o,profile:r,extraArguments:e,showStdout:a}=s,t=["aptos","init",`--network=${_nullishCoalesce(o, () => ("local"))}`,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return e&&t.push(...e),this.runCommand(t,a)}async compile(s){let{packageDirectoryPath:o,namedAddresses:r,extraArguments:e,showStdout:a}=s,t=["aptos","move","compile","--package-dir",o],n=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(n)),e&&t.push(...e),this.runCommand(t,a)}async test(s){let{packageDirectoryPath:o,namedAddresses:r,extraArguments:e,showStdout:a}=s,t=["aptos","move","test","--package-dir",o],n=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(n)),e&&t.push(...e),this.runCommand(t,a)}async publish(s){let{packageDirectoryPath:o,namedAddresses:r,profile:e,extraArguments:a,showStdout:t}=s,n=["aptos","move","publish","--package-dir",o,`--profile=${_nullishCoalesce(e, () => ("default"))}`],i=this.parseNamedAddresses(r);return n.push(...this.prepareNamedAddresses(i)),a&&n.push(...a),this.runCommand(n,t)}async createObjectAndPublishPackage(s){let{packageDirectoryPath:o,addressName:r,namedAddresses:e,profile:a,extraArguments:t,showStdout:n}=s,i=["aptos","move","create-object-and-publish-package","--package-dir",o,"--address-name",r,`--profile=${_nullishCoalesce(a, () => ("default"))}`],d=this.parseNamedAddresses(e);i.push(...this.prepareNamedAddresses(d)),t&&i.push(...t);let{output:c}=await this.runCommand(i,n);return{objectAddress:this.extractAddressFromOutput(c)}}async upgradeObjectPackage(s){let{packageDirectoryPath:o,objectAddress:r,namedAddresses:e,profile:a,extraArguments:t,showStdout:n}=s,i=["aptos","move","upgrade-object-package","--package-dir",o,"--object-address",r,`--profile=${_nullishCoalesce(a, () => ("default"))}`],d=this.parseNamedAddresses(e);return i.push(...this.prepareNamedAddresses(d)),t&&i.push(...t),this.runCommand(i,n)}async buildPublishPayload(s){let{outputFile:o,packageDirectoryPath:r,namedAddresses:e,extraArguments:a,showStdout:t}=s,n=["aptos","move","build-publish-payload","--json-output-file",o,"--package-dir",r],i=this.parseNamedAddresses(e);return n.push(...this.prepareNamedAddresses(i)),a&&n.push(...a),this.runCommand(n,t)}async runScript(s){let{compiledScriptPath:o,profile:r,extraArguments:e,showStdout:a}=s,t=["aptos","move","run-script","--compiled-script-path",o,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return e&&t.push(...e),this.runCommand(t,a)}async gasProfile(s){let{network:o,transactionId:r,extraArguments:e,showStdout:a}=s,t=["aptos","move","replay","--profile-gas","--network",o,"--txn-id",r];return e&&t.push(...e),this.runCommand(t,a)}async runCommand(s,o=!0){return new Promise((r,e)=>{let a=_os.platform.call(void 0, ),t,n="",i="";a==="win32"?t=_child_process.spawn.call(void 0, "npx",s,{shell:!0}):t=_child_process.spawn.call(void 0, "npx",s),t.stdout.on("data",d=>{i=d.toString(),n+=d.toString()}),o&&(t.stdout.pipe(process.stdout),t.stderr.pipe(process.stderr)),process.stdin.pipe(t.stdin),t.on("close",d=>{if(d===0)try{let c=JSON.parse(i);c.Error?e(new Error(`Error: ${c.Error}`)):c.Result&&r({result:c.Result,output:n})}catch (e3){r({output:n})}else e(new Error(`Child process exited with code ${d}`))})})}prepareNamedAddresses(s){let o=s.size,r=[];if(o===0)return r;r.push("--named-addresses");let e=[];return s.forEach((a,t)=>{let n=`${t}=${a.toString()}`;e.push(n)}),r.push(e.join(",")),r}parseNamedAddresses(s){let o=new Map;return Object.keys(s).forEach(r=>{let e=s[r];o.set(r,e)}),o}extractAddressFromOutput(s){let o=s.match("Code was successfully deployed to object address (0x[0-9a-fA-F]+)");if(o)return o[1];throw new Error("Failed to extract object address from output")}};exports.LocalNode = l; exports.Move = h;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/oliverhe/aptos-ts-sdk/dist/common/cli/index.js","../../../src/cli/localNode.ts","../../../src/cli/move.ts"],"names":["LocalNode","args","resolve","reject","kill","err","cliCommand","cliArgs","currentPlatform","platform","childProcess","spawn","data","str","operational","start","last","sleep","Move","network","profile","extraArguments","showStdout"],"mappings":"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","file":"/Users/oliverhe/aptos-ts-sdk/dist/common/cli/index.js","sourcesContent":[null,"/* eslint-disable no-console */\n\nimport { ChildProcessWithoutNullStreams, spawn } from \"child_process\";\nimport kill from \"tree-kill\";\nimport { platform } from \"os\";\n\nimport { sleep } from \"../utils/helpers\";\n\n/**\n * Represents a local node for running a testnet environment.\n * This class provides methods to start, stop, and check the status of the local testnet process.\n * It manages the lifecycle of the node process and ensures that it is operational before executing tests.\n */\nexport class LocalNode {\n readonly MAXIMUM_WAIT_TIME_SEC = 75;\n\n readonly READINESS_ENDPOINT = \"http://127.0.0.1:8070/\";\n\n showStdout: boolean = true;\n\n process: ChildProcessWithoutNullStreams | null = null;\n\n constructor(args?: { showStdout?: boolean }) {\n this.showStdout = args?.showStdout ?? true;\n }\n\n /**\n * Kills the current process and all its descendant processes.\n *\n * @returns {Promise<void>} A promise that resolves to true if the process was successfully killed.\n * @throws {Error} If there is an error while attempting to kill the process.\n */\n async stop(): Promise<void> {\n await new Promise((resolve, reject) => {\n if (!this.process?.pid) return;\n\n /**\n * Terminates the process associated with the given process ID.\n *\n * @param pid - The process ID of the process to be terminated.\n * @param callback - A function that is called after the termination attempt is complete.\n * @param callback.err - An error object if the termination failed; otherwise, null.\n * @param callback.resolve - A boolean indicating whether the termination was successful.\n */\n kill(this.process.pid, (err) => {\n if (err) {\n reject(err);\n } else {\n resolve(true);\n }\n });\n });\n }\n\n /**\n * Runs a local testnet and waits for the process to be up.\n * If the local node process is already running, it returns without starting the process.\n *\n * @returns {Promise<void>} A promise that resolves when the process is up.\n */\n async run(): Promise<void> {\n const nodeIsUp = await this.checkIfProcessIsUp();\n if (nodeIsUp) {\n return;\n }\n this.start();\n await this.waitUntilProcessIsUp();\n }\n\n /**\n * Starts the local testnet by running the Aptos node with the specified command-line arguments.\n *\n * @returns {void}\n *\n * @throws {Error} If there is an issue starting the local testnet.\n */\n start(): void {\n const cliCommand = \"npx\";\n const cliArgs = [\"aptos\", \"node\", \"run-localnet\", \"--force-restart\", \"--assume-yes\", \"--with-indexer-api\"];\n\n const currentPlatform = platform();\n let childProcess;\n // Check if current OS is windows\n if (currentPlatform === \"win32\") {\n childProcess = spawn(cliCommand, cliArgs, { shell: true });\n } else {\n childProcess = spawn(cliCommand, cliArgs);\n }\n\n this.process = childProcess;\n\n childProcess.stderr?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output error log\n console.log(str);\n });\n\n childProcess.stdout?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n if (this.showStdout) {\n console.log(str);\n }\n });\n }\n\n /**\n * Waits for the local testnet process to be operational within a specified maximum wait time.\n * This function continuously checks if the process is up and will throw an error if it fails to start.\n *\n * @returns Promise<boolean> - Resolves to true if the process is up, otherwise throws an error.\n */\n async waitUntilProcessIsUp(): Promise<boolean> {\n let operational = await this.checkIfProcessIsUp();\n const start = Date.now() / 1000;\n let last = start;\n\n while (!operational && start + this.MAXIMUM_WAIT_TIME_SEC > last) {\n // eslint-disable-next-line no-await-in-loop\n await sleep(1000);\n // eslint-disable-next-line no-await-in-loop\n operational = await this.checkIfProcessIsUp();\n last = Date.now() / 1000;\n }\n\n // If we are here it means something blocks the process to start.\n // Might worth checking if another process is running on port 8080\n if (!operational) {\n throw new Error(\"Process failed to start\");\n }\n\n return true;\n }\n\n /**\n * Checks if the local testnet is up by querying the readiness endpoint.\n *\n * @returns Promise<boolean> - A promise that resolves to true if the testnet is up, otherwise false.\n */\n async checkIfProcessIsUp(): Promise<boolean> {\n try {\n // Query readiness endpoint\n const data = await fetch(this.READINESS_ENDPOINT);\n if (data.status === 200) {\n return true;\n }\n return false;\n } catch (err: any) {\n return false;\n }\n }\n}\n","import { spawn } from \"child_process\";\nimport { platform } from \"os\";\n\nimport { AccountAddress } from \"../core\";\nimport { Network } from \"../utils\";\n\n/**\n * Class representing a Move package management utility for the Aptos blockchain.\n * This class provides methods to initialize directories, compile packages, run tests, publish modules, create objects, upgrade\n * packages, build transaction payloads, and run scripts.\n */\nexport class Move {\n /**\n * Initialize the current directory for Aptos by configuring the necessary settings.\n * Configuration will be pushed into .aptos/config.yaml.\n *\n * @param args - The arguments for initialization.\n * @param args.network - Optional Network type argument to use for default settings; defaults to local.\n * @param args.profile - Optional Profile to use from the config file; defaults to 'default'. This will override associated\n * settings such as the REST URL, the Faucet URL, and the private key arguments.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async init(args: {\n network?: Network;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { network, profile, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"init\", `--network=${network ?? \"local\"}`, `--profile=${profile ?? \"default\"}`];\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Compile a Move package located at the specified directory path.\n * This function helps in preparing the Move package for deployment or further processing.\n *\n * @param args - The arguments for compiling the package.\n * @param args.packageDirectoryPath - Path to a Move package (the folder with a Move.toml file).\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async compile(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"move\", \"compile\", \"--package-dir\", packageDirectoryPath];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Run Move unit tests for a specified package.\n *\n * @param args - The arguments for running the tests.\n * @param args.packageDirectoryPath - The path to a Move package (the folder containing a Move.toml file).\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns The stdout output from running the tests.\n */\n async test(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"move\", \"test\", \"--package-dir\", packageDirectoryPath];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Publishes the modules to the publisher account on the Aptos blockchain.\n *\n * @param args - The arguments for publishing the modules.\n * @param args.packageDirectoryPath - The path to a move package (the folder with a Move.toml file).\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async publish(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"publish\",\n \"--package-dir\",\n packageDirectoryPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Create a new object and publish the Move package to it on the Aptos blockchain.\n *\n * @param args - The arguments for creating the object and publishing the package.\n * @param args.packageDirectoryPath - Path to a Move package (the folder with a Move.toml file).\n * @param args.addressName - Address name for the Move package.\n * @param args.namedAddresses - Named addresses for the Move binary.\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns The object address.\n *\n * A complete example in CLI:\n * aptos move create-object-and-publish-package \\\n * --package-dir path_to_directory_that_has_move.toml \\\n * --address-name launchpad_addr \\\n * --named-addresses \"launchpad_addr=0x123,initial_creator_addr=0x456\" \\\n * --profile my_profile \\\n * --assume-yes\n */\n async createObjectAndPublishPackage(args: {\n packageDirectoryPath: string;\n addressName: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ objectAddress: string }> {\n const { packageDirectoryPath, addressName, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"create-object-and-publish-package\",\n \"--package-dir\",\n packageDirectoryPath,\n \"--address-name\",\n addressName,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n const { output } = await this.runCommand(cliArgs, showStdout);\n return { objectAddress: this.extractAddressFromOutput(output) };\n }\n\n /**\n * Upgrade a Move package previously published to an object on the Aptos blockchain.\n * The caller must be the object owner to execute this function.\n *\n * @param args - The arguments for upgrading the object package.\n * @param args.packageDirectoryPath - Path to a Move package (the folder with a Move.toml file).\n * @param args.objectAddress - Address of the object that the Move package published to. Ex. 0x1000\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async upgradeObjectPackage(args: {\n packageDirectoryPath: string;\n objectAddress: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, objectAddress, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"upgrade-object-package\",\n \"--package-dir\",\n packageDirectoryPath,\n \"--object-address\",\n objectAddress,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Build a publication transaction payload and store it in a JSON output file.\n *\n * @param args - The arguments for building the publishing payload.\n * @param args.packageDirectoryPath - Path to a move package (the folder with a Move.toml file).\n * @param args.outputFile - Output file to write the publication transaction to.\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"] *\n * @returns stdout\n */\n async buildPublishPayload(args: {\n packageDirectoryPath: string;\n outputFile: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { outputFile, packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"build-publish-payload\",\n \"--json-output-file\",\n outputFile,\n \"--package-dir\",\n packageDirectoryPath,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Runs a Move script using the provided compiled script path and optional parameters. Ensure that the script is compiled\n * before executing this function.\n *\n * @param args - The arguments for running the script.\n * @param args.compiledScriptPath - Path to a compiled Move script bytecode file.\n * Ex. \"build/my_package/bytecode_scripts/my_move_script.mv\"\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n *\n * @returns The standard output from running the script.\n */\n async runScript(args: {\n compiledScriptPath: string;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { compiledScriptPath, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"run-script\",\n \"--compiled-script-path\",\n compiledScriptPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Run a command with the specified arguments and return the output.\n *\n * @param args - An array of strings representing the command-line arguments to be passed to the command.\n * @param showStdout - Show the standard output generated by the command.\n * @returns The standard output generated by the command.\n */\n // eslint-disable-next-line class-methods-use-this\n private async runCommand(args: Array<string>, showStdout: boolean = true): Promise<{ result?: any; output: string }> {\n return new Promise((resolve, reject) => {\n const currentPlatform = platform();\n let childProcess;\n let stdout = \"\";\n // CLI final stdout is the Result/Error JSON string output\n // so we need to keep track of the last stdout\n let lastStdout = \"\";\n\n // Check if current OS is windows\n if (currentPlatform === \"win32\") {\n childProcess = spawn(\"npx\", args, { shell: true });\n } else {\n childProcess = spawn(\"npx\", args);\n }\n\n childProcess.stdout.on(\"data\", (data) => {\n lastStdout = data.toString();\n stdout += data.toString();\n });\n\n if (showStdout) {\n childProcess.stdout.pipe(process.stdout);\n childProcess.stderr.pipe(process.stderr);\n }\n process.stdin.pipe(childProcess.stdin);\n\n childProcess.on(\"close\", (code) => {\n if (code === 0) {\n try {\n // parse the last stdout as it might be the result\n const parsed = JSON.parse(lastStdout);\n if (parsed.Error) {\n reject(new Error(`Error: ${parsed.Error}`)); // Reject if the \"Error\" key exists\n } else if (parsed.Result) {\n resolve({ result: parsed.Result, output: stdout }); // Resolve if the \"Result\" key exists\n }\n } catch (error: any) {\n // resolve the stdout as it might be just a stdout\n resolve({ output: stdout });\n }\n } else {\n reject(new Error(`Child process exited with code ${code}`)); // Reject with an error if the child process exits with an error code\n }\n });\n });\n }\n\n /**\n * Convert named addresses from a Map into an array separated by a comma.\n *\n * @param namedAddresses - A Map where the key is a string representing the name and the value is an AccountAddress.\n * Ex. {'alice' => '0x123', 'bob' => '0x456'}\n * @returns An array of named addresses formatted as strings separated by a comma. Ex. \"alice=0x123,bob=0x456\"\n */\n // eslint-disable-next-line class-methods-use-this\n private prepareNamedAddresses(namedAddresses: Map<string, AccountAddress>): Array<string> {\n const totalNames = namedAddresses.size;\n const newArgs: Array<string> = [];\n\n if (totalNames === 0) {\n return newArgs;\n }\n\n newArgs.push(\"--named-addresses\");\n\n const names: Array<string> = [];\n namedAddresses.forEach((value, key) => {\n const toAppend = `${key}=${value.toString()}`;\n names.push(toAppend);\n });\n newArgs.push(names.join(\",\"));\n return newArgs;\n }\n\n /**\n * Parse named addresses from a Record type into a Map.\n *\n * This function transforms a collection of named addresses into a more accessible format by mapping each name to its\n * corresponding address.\n *\n * @param namedAddresses - A record containing named addresses where the key is the name and the value is the AccountAddress.\n * @returns A Map where each key is a name and each value is the corresponding address.\n */\n // eslint-disable-next-line class-methods-use-this\n private parseNamedAddresses(namedAddresses: Record<string, AccountAddress>): Map<string, AccountAddress> {\n const addressesMap = new Map();\n\n Object.keys(namedAddresses).forEach((key) => {\n const address = namedAddresses[key];\n addressesMap.set(key, address);\n });\n\n return addressesMap;\n }\n\n /**\n * Extracts the object address from the provided output string.\n *\n * @param output - The output string containing the object address.\n * @returns The extracted object address.\n * @throws Error if the object address cannot be extracted from the output.\n */\n // eslint-disable-next-line class-methods-use-this\n private extractAddressFromOutput(output: string): string {\n const match = output.match(\"Code was successfully deployed to object address (0x[0-9a-fA-F]+)\");\n if (match) {\n return match[1];\n }\n throw new Error(\"Failed to extract object address from output\");\n }\n}\n"]}
1
+ {"version":3,"sources":["/Users/maayansavir/work/aptos_repos/aptos-ts-sdk/dist/common/cli/index.js","../../../src/cli/localNode.ts","../../../src/cli/move.ts"],"names":["LocalNode","args","resolve","reject","kill","err","cliCommand","cliArgs","currentPlatform","platform","childProcess","spawn","data","str","operational","start","last","sleep","Move","network","profile","extraArguments","showStdout"],"mappings":"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","file":"/Users/maayansavir/work/aptos_repos/aptos-ts-sdk/dist/common/cli/index.js","sourcesContent":[null,"/* eslint-disable no-console */\n\nimport { ChildProcessWithoutNullStreams, spawn } from \"child_process\";\nimport kill from \"tree-kill\";\nimport { platform } from \"os\";\n\nimport { sleep } from \"../utils/helpers\";\n\n/**\n * Represents a local node for running a testnet environment.\n * This class provides methods to start, stop, and check the status of the local testnet process.\n * It manages the lifecycle of the node process and ensures that it is operational before executing tests.\n */\nexport class LocalNode {\n readonly MAXIMUM_WAIT_TIME_SEC = 75;\n\n readonly READINESS_ENDPOINT = \"http://127.0.0.1:8070/\";\n\n showStdout: boolean = true;\n\n process: ChildProcessWithoutNullStreams | null = null;\n\n constructor(args?: { showStdout?: boolean }) {\n this.showStdout = args?.showStdout ?? true;\n }\n\n /**\n * Kills the current process and all its descendant processes.\n *\n * @returns {Promise<void>} A promise that resolves to true if the process was successfully killed.\n * @throws {Error} If there is an error while attempting to kill the process.\n */\n async stop(): Promise<void> {\n await new Promise((resolve, reject) => {\n if (!this.process?.pid) return;\n\n /**\n * Terminates the process associated with the given process ID.\n *\n * @param pid - The process ID of the process to be terminated.\n * @param callback - A function that is called after the termination attempt is complete.\n * @param callback.err - An error object if the termination failed; otherwise, null.\n * @param callback.resolve - A boolean indicating whether the termination was successful.\n */\n kill(this.process.pid, (err) => {\n if (err) {\n reject(err);\n } else {\n resolve(true);\n }\n });\n });\n }\n\n /**\n * Runs a local testnet and waits for the process to be up.\n * If the local node process is already running, it returns without starting the process.\n *\n * @returns {Promise<void>} A promise that resolves when the process is up.\n */\n async run(): Promise<void> {\n const nodeIsUp = await this.checkIfProcessIsUp();\n if (nodeIsUp) {\n return;\n }\n this.start();\n await this.waitUntilProcessIsUp();\n }\n\n /**\n * Starts the local testnet by running the Aptos node with the specified command-line arguments.\n *\n * @returns {void}\n *\n * @throws {Error} If there is an issue starting the local testnet.\n */\n start(): void {\n const cliCommand = \"npx\";\n const cliArgs = [\"aptos\", \"node\", \"run-localnet\", \"--force-restart\", \"--assume-yes\", \"--with-indexer-api\"];\n\n const currentPlatform = platform();\n let childProcess;\n // Check if current OS is windows\n if (currentPlatform === \"win32\") {\n childProcess = spawn(cliCommand, cliArgs, { shell: true });\n } else {\n childProcess = spawn(cliCommand, cliArgs);\n }\n\n this.process = childProcess;\n\n childProcess.stderr?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output error log\n console.log(str);\n });\n\n childProcess.stdout?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n if (this.showStdout) {\n console.log(str);\n }\n });\n }\n\n /**\n * Waits for the local testnet process to be operational within a specified maximum wait time.\n * This function continuously checks if the process is up and will throw an error if it fails to start.\n *\n * @returns Promise<boolean> - Resolves to true if the process is up, otherwise throws an error.\n */\n async waitUntilProcessIsUp(): Promise<boolean> {\n let operational = await this.checkIfProcessIsUp();\n const start = Date.now() / 1000;\n let last = start;\n\n while (!operational && start + this.MAXIMUM_WAIT_TIME_SEC > last) {\n // eslint-disable-next-line no-await-in-loop\n await sleep(1000);\n // eslint-disable-next-line no-await-in-loop\n operational = await this.checkIfProcessIsUp();\n last = Date.now() / 1000;\n }\n\n // If we are here it means something blocks the process to start.\n // Might worth checking if another process is running on port 8080\n if (!operational) {\n throw new Error(\"Process failed to start\");\n }\n\n return true;\n }\n\n /**\n * Checks if the local testnet is up by querying the readiness endpoint.\n *\n * @returns Promise<boolean> - A promise that resolves to true if the testnet is up, otherwise false.\n */\n async checkIfProcessIsUp(): Promise<boolean> {\n try {\n // Query readiness endpoint\n const data = await fetch(this.READINESS_ENDPOINT);\n if (data.status === 200) {\n return true;\n }\n return false;\n } catch (err: any) {\n return false;\n }\n }\n}\n","import { spawn } from \"child_process\";\nimport { platform } from \"os\";\n\nimport { AccountAddress } from \"../core\";\nimport { Network } from \"../utils\";\n\n/**\n * Class representing a Move package management utility for the Aptos blockchain.\n * This class provides methods to initialize directories, compile packages, run tests, publish modules, create objects, upgrade\n * packages, build transaction payloads, and run scripts.\n */\nexport class Move {\n /**\n * Initialize the current directory for Aptos by configuring the necessary settings.\n * Configuration will be pushed into .aptos/config.yaml.\n *\n * @param args - The arguments for initialization.\n * @param args.network - Optional Network type argument to use for default settings; defaults to local.\n * @param args.profile - Optional Profile to use from the config file; defaults to 'default'. This will override associated\n * settings such as the REST URL, the Faucet URL, and the private key arguments.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async init(args: {\n network?: Network;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { network, profile, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"init\", `--network=${network ?? \"local\"}`, `--profile=${profile ?? \"default\"}`];\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Compile a Move package located at the specified directory path.\n * This function helps in preparing the Move package for deployment or further processing.\n *\n * @param args - The arguments for compiling the package.\n * @param args.packageDirectoryPath - Path to a Move package (the folder with a Move.toml file).\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async compile(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"move\", \"compile\", \"--package-dir\", packageDirectoryPath];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Run Move unit tests for a specified package.\n *\n * @param args - The arguments for running the tests.\n * @param args.packageDirectoryPath - The path to a Move package (the folder containing a Move.toml file).\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns The stdout output from running the tests.\n */\n async test(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"move\", \"test\", \"--package-dir\", packageDirectoryPath];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Publishes the modules to the publisher account on the Aptos blockchain.\n *\n * @param args - The arguments for publishing the modules.\n * @param args.packageDirectoryPath - The path to a move package (the folder with a Move.toml file).\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async publish(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"publish\",\n \"--package-dir\",\n packageDirectoryPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Create a new object and publish the Move package to it on the Aptos blockchain.\n *\n * @param args - The arguments for creating the object and publishing the package.\n * @param args.packageDirectoryPath - Path to a Move package (the folder with a Move.toml file).\n * @param args.addressName - Address name for the Move package.\n * @param args.namedAddresses - Named addresses for the Move binary.\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns The object address.\n *\n * A complete example in CLI:\n * aptos move create-object-and-publish-package \\\n * --package-dir path_to_directory_that_has_move.toml \\\n * --address-name launchpad_addr \\\n * --named-addresses \"launchpad_addr=0x123,initial_creator_addr=0x456\" \\\n * --profile my_profile \\\n * --assume-yes\n */\n async createObjectAndPublishPackage(args: {\n packageDirectoryPath: string;\n addressName: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ objectAddress: string }> {\n const { packageDirectoryPath, addressName, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"create-object-and-publish-package\",\n \"--package-dir\",\n packageDirectoryPath,\n \"--address-name\",\n addressName,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n const { output } = await this.runCommand(cliArgs, showStdout);\n return { objectAddress: this.extractAddressFromOutput(output) };\n }\n\n /**\n * Upgrade a Move package previously published to an object on the Aptos blockchain.\n * The caller must be the object owner to execute this function.\n *\n * @param args - The arguments for upgrading the object package.\n * @param args.packageDirectoryPath - Path to a Move package (the folder with a Move.toml file).\n * @param args.objectAddress - Address of the object that the Move package published to. Ex. 0x1000\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n * @returns stdout\n */\n async upgradeObjectPackage(args: {\n packageDirectoryPath: string;\n objectAddress: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, objectAddress, namedAddresses, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"upgrade-object-package\",\n \"--package-dir\",\n packageDirectoryPath,\n \"--object-address\",\n objectAddress,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Build a publication transaction payload and store it in a JSON output file.\n *\n * @param args - The arguments for building the publishing payload.\n * @param args.packageDirectoryPath - Path to a move package (the folder with a Move.toml file).\n * @param args.outputFile - Output file to write the publication transaction to.\n * @param args.namedAddresses - Named addresses for the move binary. Ex. { alice: 0x1234, bob: 0x5678 }\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"] *\n * @returns stdout\n */\n async buildPublishPayload(args: {\n packageDirectoryPath: string;\n outputFile: string;\n namedAddresses: Record<string, AccountAddress>;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { outputFile, packageDirectoryPath, namedAddresses, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"build-publish-payload\",\n \"--json-output-file\",\n outputFile,\n \"--package-dir\",\n packageDirectoryPath,\n ];\n\n const addressesMap = this.parseNamedAddresses(namedAddresses);\n\n cliArgs.push(...this.prepareNamedAddresses(addressesMap));\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Runs a Move script using the provided compiled script path and optional parameters. Ensure that the script is compiled\n * before executing this function.\n *\n * @param args - The arguments for running the script.\n * @param args.compiledScriptPath - Path to a compiled Move script bytecode file.\n * Ex. \"build/my_package/bytecode_scripts/my_move_script.mv\"\n * @param args.profile - Optional profile to use from the config file.\n * @param args.extraArguments - Optional extra arguments to include in the form of an array of strings.\n * Ex. [\"--assume-yes\",\"--gas-unit-price=10\"]\n *\n * @returns The standard output from running the script.\n */\n async runScript(args: {\n compiledScriptPath: string;\n profile?: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string }> {\n const { compiledScriptPath, profile, extraArguments, showStdout } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"run-script\",\n \"--compiled-script-path\",\n compiledScriptPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n async gasProfile(args: {\n network: string;\n transactionId: string;\n extraArguments?: Array<string>;\n showStdout?: boolean;\n }): Promise<{ output: string; result?: any }> {\n const { network, transactionId, extraArguments, showStdout } = args;\n const cliArgs = [\"aptos\", \"move\", \"replay\", \"--profile-gas\", \"--network\", network, \"--txn-id\", transactionId];\n\n if (extraArguments) {\n cliArgs.push(...extraArguments);\n }\n\n return this.runCommand(cliArgs, showStdout);\n }\n\n /**\n * Run a command with the specified arguments and return the output.\n *\n * @param args - An array of strings representing the command-line arguments to be passed to the command.\n * @param showStdout - Show the standard output generated by the command.\n * @returns The standard output generated by the command.\n */\n // eslint-disable-next-line class-methods-use-this\n private async runCommand(args: Array<string>, showStdout: boolean = true): Promise<{ result?: any; output: string }> {\n return new Promise((resolve, reject) => {\n const currentPlatform = platform();\n let childProcess;\n let stdout = \"\";\n // CLI final stdout is the Result/Error JSON string output\n // so we need to keep track of the last stdout\n let lastStdout = \"\";\n\n // Check if current OS is windows\n if (currentPlatform === \"win32\") {\n childProcess = spawn(\"npx\", args, { shell: true });\n } else {\n childProcess = spawn(\"npx\", args);\n }\n\n childProcess.stdout.on(\"data\", (data) => {\n lastStdout = data.toString();\n stdout += data.toString();\n });\n\n if (showStdout) {\n childProcess.stdout.pipe(process.stdout);\n childProcess.stderr.pipe(process.stderr);\n }\n process.stdin.pipe(childProcess.stdin);\n\n childProcess.on(\"close\", (code) => {\n if (code === 0) {\n try {\n // parse the last stdout as it might be the result\n const parsed = JSON.parse(lastStdout);\n if (parsed.Error) {\n reject(new Error(`Error: ${parsed.Error}`)); // Reject if the \"Error\" key exists\n } else if (parsed.Result) {\n resolve({ result: parsed.Result, output: stdout }); // Resolve if the \"Result\" key exists\n }\n } catch (error: any) {\n // resolve the stdout as it might be just a stdout\n resolve({ output: stdout });\n }\n } else {\n reject(new Error(`Child process exited with code ${code}`)); // Reject with an error if the child process exits with an error code\n }\n });\n });\n }\n\n /**\n * Convert named addresses from a Map into an array separated by a comma.\n *\n * @param namedAddresses - A Map where the key is a string representing the name and the value is an AccountAddress.\n * Ex. {'alice' => '0x123', 'bob' => '0x456'}\n * @returns An array of named addresses formatted as strings separated by a comma. Ex. \"alice=0x123,bob=0x456\"\n */\n // eslint-disable-next-line class-methods-use-this\n private prepareNamedAddresses(namedAddresses: Map<string, AccountAddress>): Array<string> {\n const totalNames = namedAddresses.size;\n const newArgs: Array<string> = [];\n\n if (totalNames === 0) {\n return newArgs;\n }\n\n newArgs.push(\"--named-addresses\");\n\n const names: Array<string> = [];\n namedAddresses.forEach((value, key) => {\n const toAppend = `${key}=${value.toString()}`;\n names.push(toAppend);\n });\n newArgs.push(names.join(\",\"));\n return newArgs;\n }\n\n /**\n * Parse named addresses from a Record type into a Map.\n *\n * This function transforms a collection of named addresses into a more accessible format by mapping each name to its\n * corresponding address.\n *\n * @param namedAddresses - A record containing named addresses where the key is the name and the value is the AccountAddress.\n * @returns A Map where each key is a name and each value is the corresponding address.\n */\n // eslint-disable-next-line class-methods-use-this\n private parseNamedAddresses(namedAddresses: Record<string, AccountAddress>): Map<string, AccountAddress> {\n const addressesMap = new Map();\n\n Object.keys(namedAddresses).forEach((key) => {\n const address = namedAddresses[key];\n addressesMap.set(key, address);\n });\n\n return addressesMap;\n }\n\n /**\n * Extracts the object address from the provided output string.\n *\n * @param output - The output string containing the object address.\n * @returns The extracted object address.\n * @throws Error if the object address cannot be extracted from the output.\n */\n // eslint-disable-next-line class-methods-use-this\n private extractAddressFromOutput(output: string): string {\n const match = output.match(\"Code was successfully deployed to object address (0x[0-9a-fA-F]+)\");\n if (match) {\n return match[1];\n }\n throw new Error(\"Failed to extract object address from output\");\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
- import { S as Serializable, T as TransactionArgument, H as HexInput, a as Serializer, D as Deserializer, E as EntryFunctionArgument, U as Uint8, b as Uint16, c as Uint32, A as AnyNumber, d as Deserializable, e as Hex, f as AuthenticationKeyScheme, g as AccountAddress, P as PrivateKeyVariants, h as AnyPublicKeyVariant, i as EphemeralPublicKeyVariant, N as Network, C as Client, j as ClientConfig, F as FullNodeConfig, I as IndexerConfig, k as FaucetConfig, l as AptosSettings, m as EphemeralCertificateVariant, Z as ZkpVariant, L as LedgerVersionArg, n as AccountAddressInput, M as MoveModuleId, o as ScriptFunctionArgument, p as MoveFunctionId, q as MoveStructId, r as MoveValue, s as MoveFunctionGenericTypeParam, t as SigningSchemeInput, u as SigningScheme, v as AccountData, w as PaginationArgs, x as MoveModuleBytecode, y as TransactionResponse, z as MoveResource, B as TokenStandardArg, O as OrderByArg, G as GetAccountOwnedTokensQueryResponse, J as GetAccountOwnedTokensFromCollectionResponse, K as GetAccountCollectionsWithOwnedTokenResponse, Q as GetAccountCoinsDataResponse, W as WhereArg, R as GetObjectDataQueryResponse, V as GetCollectionDataResponse, X as GetTokenDataResponse, Y as GetCurrentTokenOwnershipResponse, _ as GetOwnedTokensResponse, $ as GetTokenActivityResponse, a0 as GetEventsResponse, a1 as WaitForTransactionOptions, a2 as UserTransactionResponse, a3 as MoveFunction, a4 as GetFungibleAssetMetadataResponse, a5 as GetFungibleAssetActivitiesResponse, a6 as GetCurrentFungibleAssetBalancesResponse, a7 as LedgerInfo, a8 as Block, a9 as GetChainTopUserTransactionsResponse, aa as GraphqlQuery, ab as GetProcessorStatusResponse, ac as GetANSNameResponse, ad as GetNumberOfDelegatorsResponse, ae as GetDelegatedStakingActivitiesResponse, af as PendingTransactionResponse, ag as CommittedTransactionResponse, ah as GasEstimation, ai as TableItemRequest, aj as GetTableItemsDataResponse, ak as GetTableItemsMetadataResponse, al as ClientRequest, am as ClientResponse, an as AptosRequest, ao as AptosResponse, ap as MimeType } from './accountAddress-6RqI8Aam.js';
2
- export { aG as AccountAuthenticatorVariant, bp as AccountSignature, at as AddressInvalidReason, aH as AnySignatureVariant, aZ as BlockEndInfo, a_ as BlockEpilogueTransactionResponse, aW as BlockMetadataTransactionResponse, aM as ClientHeadersType, b6 as DecodedTableData, b7 as DeletedTableData, bM as DeriveScheme, bs as DirectWriteSet, b9 as EntryFunctionPayloadResponse, aI as EphemeralSignatureVariant, bu as Event, bt as EventGuid, bP as GenerateAccount, bN as GenerateAccountWithEd25519, bO as GenerateAccountWithSingleSignerSecp256k1Key, bc as GenesisPayload, aV as GenesisTransactionResponse, aw as HexInvalidReason, bH as MoveAbility, bB as MoveAddressType, bG as MoveFunctionVisibility, bJ as MoveModule, bC as MoveObjectType, bD as MoveOptionType, bd as MoveScriptBytecode, bK as MoveStruct, bI as MoveStructField, bE as MoveStructType, bF as MoveType, bz as MoveUint128Type, bw as MoveUint16Type, bA as MoveUint256Type, bx as MoveUint32Type, by as MoveUint64Type, bv as MoveUint8Type, bb as MultisigPayloadResponse, bV as NetworkToChainId, bS as NetworkToFaucetAPI, bQ as NetworkToIndexerAPI, bW as NetworkToNetworkName, bR as NetworkToNodeAPI, bT as NetworkToPepperAPI, bU as NetworkToProverAPI, ay as OrderBy, az as OrderByValue, au as ParsingError, av as ParsingResult, bL as RoleType, ba as ScriptPayloadResponse, aC as ScriptTransactionArgumentVariants, br as ScriptWriteSet, aX as StateCheckpointTransactionResponse, aA as TokenStandard, aF as TransactionAuthenticatorVariant, bk as TransactionEd25519Signature, bo as TransactionFeePayerSignature, bn as TransactionMultiAgentSignature, bm as TransactionMultiEd25519Signature, b8 as TransactionPayloadResponse, aD as TransactionPayloadVariants, aN as TransactionResponseType, bl as TransactionSecp256k1Signature, be as TransactionSignature, aE as TransactionVariants, aB as TypeTagVariants, aK as Uint128, aL as Uint256, aJ as Uint64, aY as ValidatorTransactionResponse, bq as WriteSet, a$ as WriteSetChange, b0 as WriteSetChangeDeleteModule, b1 as WriteSetChangeDeleteResource, b2 as WriteSetChangeDeleteTableItem, b3 as WriteSetChangeWriteModule, b4 as WriteSetChangeWriteResource, b5 as WriteSetChangeWriteTableItem, aq as ensureBoolean, ax as hexToAsciiString, aU as isBlockEpilogueTransactionResponse, aR as isBlockMetadataTransactionResponse, bf as isEd25519Signature, bi as isFeePayerSignature, aQ as isGenesisTransactionResponse, bh as isMultiAgentSignature, bj as isMultiEd25519Signature, aO as isPendingTransactionResponse, bg as isSecp256k1Signature, aS as isStateCheckpointTransactionResponse, aP as isUserTransactionResponse, aT as isValidatorTransactionResponse, ar as outOfRangeErrorMessage, as as validateNumberInRange } from './accountAddress-6RqI8Aam.js';
3
- import { CallArgument } from '@wgb5445/aptos-intent-npm';
4
- export { CallArgument } from '@wgb5445/aptos-intent-npm';
1
+ import { S as Serializable, T as TransactionArgument, H as HexInput, a as Serializer, D as Deserializer, E as EntryFunctionArgument, U as Uint8, b as Uint16, c as Uint32, A as AnyNumber, d as Deserializable, e as Hex, f as AuthenticationKeyScheme, g as AccountAddress, P as PrivateKeyVariants, h as AnyPublicKeyVariant, i as EphemeralPublicKeyVariant, N as Network, C as Client, j as ClientConfig, F as FullNodeConfig, I as IndexerConfig, k as FaucetConfig, l as AptosSettings, m as EphemeralCertificateVariant, Z as ZkpVariant, L as LedgerVersionArg, n as AccountAddressInput, M as MoveModuleId, o as ScriptFunctionArgument, p as MoveFunctionId, q as MoveStructId, r as MoveValue, s as MoveFunctionGenericTypeParam, t as SigningSchemeInput, u as SigningScheme, v as AccountData, w as PaginationArgs, x as MoveModuleBytecode, y as TransactionResponse, z as MoveResource, B as TokenStandardArg, O as OrderByArg, G as GetAccountOwnedTokensQueryResponse, J as GetAccountOwnedTokensFromCollectionResponse, K as GetAccountCollectionsWithOwnedTokenResponse, Q as GetAccountCoinsDataResponse, W as WhereArg, R as GetObjectDataQueryResponse, V as GetCollectionDataResponse, X as GetTokenDataResponse, Y as GetCurrentTokenOwnershipResponse, _ as GetOwnedTokensResponse, $ as GetTokenActivityResponse, a0 as GetEventsResponse, a1 as WaitForTransactionOptions, a2 as UserTransactionResponse, a3 as MoveFunction, a4 as GetFungibleAssetMetadataResponse, a5 as GetFungibleAssetActivitiesResponse, a6 as GetCurrentFungibleAssetBalancesResponse, a7 as LedgerInfo, a8 as Block, a9 as GetChainTopUserTransactionsResponse, aa as GraphqlQuery, ab as GetProcessorStatusResponse, ac as GetANSNameResponse, ad as GetNumberOfDelegatorsResponse, ae as GetDelegatedStakingActivitiesResponse, af as PendingTransactionResponse, ag as CommittedTransactionResponse, ah as GasEstimation, ai as TableItemRequest, aj as GetTableItemsDataResponse, ak as GetTableItemsMetadataResponse, al as ClientRequest, am as ClientResponse, an as AptosRequest, ao as AptosResponse, ap as MimeType } from './accountAddress-fJZJVSBc.js';
2
+ export { aG as AccountAuthenticatorVariant, bp as AccountSignature, at as AddressInvalidReason, aH as AnySignatureVariant, aZ as BlockEndInfo, a_ as BlockEpilogueTransactionResponse, aW as BlockMetadataTransactionResponse, aM as ClientHeadersType, b6 as DecodedTableData, b7 as DeletedTableData, bM as DeriveScheme, bs as DirectWriteSet, b9 as EntryFunctionPayloadResponse, aI as EphemeralSignatureVariant, bu as Event, bt as EventGuid, bP as GenerateAccount, bN as GenerateAccountWithEd25519, bO as GenerateAccountWithSingleSignerSecp256k1Key, bc as GenesisPayload, aV as GenesisTransactionResponse, aw as HexInvalidReason, bH as MoveAbility, bB as MoveAddressType, bG as MoveFunctionVisibility, bJ as MoveModule, bC as MoveObjectType, bD as MoveOptionType, bd as MoveScriptBytecode, bK as MoveStruct, bI as MoveStructField, bE as MoveStructType, bF as MoveType, bz as MoveUint128Type, bw as MoveUint16Type, bA as MoveUint256Type, bx as MoveUint32Type, by as MoveUint64Type, bv as MoveUint8Type, bb as MultisigPayloadResponse, bV as NetworkToChainId, bS as NetworkToFaucetAPI, bQ as NetworkToIndexerAPI, bW as NetworkToNetworkName, bR as NetworkToNodeAPI, bT as NetworkToPepperAPI, bU as NetworkToProverAPI, ay as OrderBy, az as OrderByValue, au as ParsingError, av as ParsingResult, bL as RoleType, ba as ScriptPayloadResponse, aC as ScriptTransactionArgumentVariants, br as ScriptWriteSet, aX as StateCheckpointTransactionResponse, aA as TokenStandard, aF as TransactionAuthenticatorVariant, bk as TransactionEd25519Signature, bo as TransactionFeePayerSignature, bn as TransactionMultiAgentSignature, bm as TransactionMultiEd25519Signature, b8 as TransactionPayloadResponse, aD as TransactionPayloadVariants, aN as TransactionResponseType, bl as TransactionSecp256k1Signature, be as TransactionSignature, aE as TransactionVariants, aB as TypeTagVariants, aK as Uint128, aL as Uint256, aJ as Uint64, aY as ValidatorTransactionResponse, bq as WriteSet, a$ as WriteSetChange, b0 as WriteSetChangeDeleteModule, b1 as WriteSetChangeDeleteResource, b2 as WriteSetChangeDeleteTableItem, b3 as WriteSetChangeWriteModule, b4 as WriteSetChangeWriteResource, b5 as WriteSetChangeWriteTableItem, aq as ensureBoolean, ax as hexToAsciiString, aU as isBlockEpilogueTransactionResponse, aR as isBlockMetadataTransactionResponse, bf as isEd25519Signature, bi as isFeePayerSignature, aQ as isGenesisTransactionResponse, bh as isMultiAgentSignature, bj as isMultiEd25519Signature, aO as isPendingTransactionResponse, bg as isSecp256k1Signature, aS as isStateCheckpointTransactionResponse, aP as isUserTransactionResponse, aT as isValidatorTransactionResponse, ar as outOfRangeErrorMessage, as as validateNumberInRange } from './accountAddress-fJZJVSBc.js';
3
+ import { CallArgument } from '@aptos-labs/script-composer-pack';
4
+ export { CallArgument } from '@aptos-labs/script-composer-pack';
5
5
  import EventEmitter from 'eventemitter3';
6
6
 
7
7
  type Maybe<T> = T | null;
@@ -2042,6 +2042,12 @@ declare enum ProcessorType {
2042
2042
  USER_TRANSACTION_PROCESSOR = "user_transaction_processor",
2043
2043
  OBJECT_PROCESSOR = "objects_processor"
2044
2044
  }
2045
+ /**
2046
+ * Regular expression pattern for Firebase Auth issuer URLs
2047
+ * Matches URLs in the format: https://securetoken.google.com/[project-id]
2048
+ * where project-id can contain letters, numbers, hyphens, and underscores
2049
+ */
2050
+ declare const FIREBASE_AUTH_ISS_PATTERN: RegExp;
2045
2051
 
2046
2052
  /**
2047
2053
  * Represents the configuration settings for an Aptos SDK client instance.
@@ -3069,6 +3075,15 @@ declare class AccountAuthenticatorMultiKey extends AccountAuthenticator {
3069
3075
  serialize(serializer: Serializer): void;
3070
3076
  static load(deserializer: Deserializer): AccountAuthenticatorMultiKey;
3071
3077
  }
3078
+ /**
3079
+ * AccountAuthenticatorNoAccountAuthenticator for no account authenticator
3080
+ * It represents the absence of a public key for transaction simulation.
3081
+ * It allows skipping the public/auth key check during the simulation.
3082
+ */
3083
+ declare class AccountAuthenticatorNoAccountAuthenticator extends AccountAuthenticator {
3084
+ serialize(serializer: Serializer): void;
3085
+ static load(deserializer: Deserializer): AccountAuthenticatorNoAccountAuthenticator;
3086
+ }
3072
3087
 
3073
3088
  /**
3074
3089
  * Creates an object address from creator address and seed
@@ -4406,12 +4421,13 @@ type InputSimulateTransactionData = {
4406
4421
  transaction: AnyRawTransaction;
4407
4422
  /**
4408
4423
  * For a single signer transaction
4424
+ * This is optional and can be undefined to skip the public/auth key check during the transaction simulation.
4409
4425
  */
4410
- signerPublicKey: PublicKey;
4426
+ signerPublicKey?: PublicKey;
4411
4427
  /**
4412
4428
  * For a fee payer or multi-agent transaction that requires additional signers in
4413
4429
  */
4414
- secondarySignersPublicKeys?: Array<PublicKey>;
4430
+ secondarySignersPublicKeys?: Array<PublicKey | undefined>;
4415
4431
  /**
4416
4432
  * For a fee payer transaction (aka Sponsored Transaction)
4417
4433
  */
@@ -7771,7 +7787,7 @@ declare function buildTransaction(args: InputGenerateMultiAgentRawTransactionArg
7771
7787
  * @returns A signed serialized transaction that can be simulated.
7772
7788
  */
7773
7789
  declare function generateSignedTransactionForSimulation(args: InputSimulateTransactionData): Uint8Array;
7774
- declare function getAuthenticatorForSimulation(publicKey: PublicKey): AccountAuthenticatorEd25519 | AccountAuthenticatorSingleKey | AccountAuthenticatorMultiKey;
7790
+ declare function getAuthenticatorForSimulation(publicKey?: PublicKey): AccountAuthenticatorEd25519 | AccountAuthenticatorSingleKey | AccountAuthenticatorMultiKey | AccountAuthenticatorNoAccountAuthenticator;
7775
7791
  /**
7776
7792
  * Generate a signed transaction ready for submission to the blockchain.
7777
7793
  * This function prepares the transaction by authenticating the sender and any additional signers based on the provided arguments.
@@ -9425,7 +9441,7 @@ declare class Simulate {
9425
9441
  * This function helps you understand the outcome of a transaction before executing it on the blockchain.
9426
9442
  *
9427
9443
  * @param args - The parameters for simulating the transaction.
9428
- * @param args.signerPublicKey - The public key of the signer for the transaction.
9444
+ * @param args.signerPublicKey - The public key of the signer for the transaction (optional).
9429
9445
  * @param args.transaction - The raw transaction data to simulate.
9430
9446
  * @param args.feePayerPublicKey - The public key of the fee payer (optional).
9431
9447
  * @param args.options - Additional options for simulating the transaction (optional).
@@ -9477,7 +9493,7 @@ declare class Simulate {
9477
9493
  * ```
9478
9494
  */
9479
9495
  simple(args: {
9480
- signerPublicKey: PublicKey;
9496
+ signerPublicKey?: PublicKey;
9481
9497
  transaction: AnyRawTransaction;
9482
9498
  feePayerPublicKey?: PublicKey;
9483
9499
  options?: InputSimulateTransactionOptions;
@@ -9487,11 +9503,12 @@ declare class Simulate {
9487
9503
  * This function helps in understanding the outcome of a transaction involving multiple signers before it is executed.
9488
9504
  *
9489
9505
  * @param args - The parameters for simulating the transaction.
9490
- * @param args.signerPublicKey - The public key of the primary signer.
9506
+ * @param args.signerPublicKey - The public key of the primary signer (optional).
9491
9507
  * @param args.transaction - The raw transaction to be simulated.
9492
- * @param args.secondarySignersPublicKeys - An array of public keys for secondary signers.
9493
- * @param args.feePayerPublicKey - (Optional) The public key of the fee payer.
9494
- * @param args.options - (Optional) Options for simulating the transaction.
9508
+ * @param args.secondarySignersPublicKeys - An array of public keys for secondary signers (optional).
9509
+ * Each element of the array can be optional, allowing the corresponding key check to be skipped.
9510
+ * @param args.feePayerPublicKey - The public key of the fee payer (optional).
9511
+ * @param args.options - Options for simulating the transaction (optional).
9495
9512
  *
9496
9513
  * @example
9497
9514
  * ```typescript
@@ -9549,9 +9566,9 @@ declare class Simulate {
9549
9566
  * ```
9550
9567
  */
9551
9568
  multiAgent(args: {
9552
- signerPublicKey: PublicKey;
9569
+ signerPublicKey?: PublicKey;
9553
9570
  transaction: AnyRawTransaction;
9554
- secondarySignersPublicKeys: Array<PublicKey>;
9571
+ secondarySignersPublicKeys?: Array<PublicKey | undefined>;
9555
9572
  feePayerPublicKey?: PublicKey;
9556
9573
  options?: InputSimulateTransactionOptions;
9557
9574
  }): Promise<Array<UserTransactionResponse>>;
@@ -11623,4 +11640,4 @@ declare class AptosApiError extends Error {
11623
11640
  constructor({ apiType, aptosRequest, aptosResponse }: AptosApiErrorOpts);
11624
11641
  }
11625
11642
 
11626
- export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_FA, APTOS_HARDENED_REGEX, AbstractKeylessAccount, Account$1 as Account, AccountAddress, AccountAddressInput, AccountAuthenticator, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorSingleKey, AccountData, AccountPublicKey, AccountSequenceNumber, AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, AptosRequest, AptosResponse, AptosScriptComposer, AptosSettings, AuthenticationKey, AuthenticationKeyScheme, Block, Bool, CKDPriv, ChainId, Client, ClientConfig, ClientRequest, ClientResponse, CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, type DerivedKeys, Deserializable, type DeserializableClass, Deserializer, EPK_HORIZON_SECS, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, EphemeralCertificate, EphemeralCertificateVariant, EphemeralKeyPair, EphemeralPublicKey, EphemeralPublicKeyVariant, EphemeralSignature, type ExecutionFinishEventData, type FailureEventData, FaucetConfig, FederatedKeylessAccount, FederatedKeylessPublicKey, FeePayerRawTransaction, FixedBytes, FullNodeConfig, type FunctionABI, GasEstimation, type GenerateAccountArgs, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, type GetRequestOptions, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, Groth16VerificationKey, Groth16Zkp, HARDENED_OFFSET, Hex, HexInput, Identifier, IndexerConfig, type InputBatchedFunctionData, type InputEntryFunctionData, type InputEntryFunctionDataWithABI, type InputEntryFunctionDataWithRemoteABI, type InputGenerateMultiAgentRawTransactionArgs, type InputGenerateMultiAgentRawTransactionData, type InputGenerateRawTransactionArgs, type InputGenerateSingleSignerRawTransactionArgs, type InputGenerateSingleSignerRawTransactionData, type InputGenerateTransactionData, type InputGenerateTransactionOptions, type InputGenerateTransactionPayloadData, type InputGenerateTransactionPayloadDataWithABI, type InputGenerateTransactionPayloadDataWithRemoteABI, type InputMultiSigData, type InputMultiSigDataWithABI, type InputMultiSigDataWithRemoteABI, type InputScriptData, type InputSimulateTransactionData, type InputSimulateTransactionOptions, type InputSubmitTransactionData, type InputViewFunctionData, type InputViewFunctionDataWithABI, type InputViewFunctionDataWithRemoteABI, type InputViewFunctionJsonData, KeyType, KeylessAccount, KeylessConfiguration, KeylessError, KeylessErrorCategory, KeylessErrorResolutionTip, KeylessErrorType, KeylessPublicKey, KeylessSignature, type KeylessSigner, LedgerInfo, LedgerVersionArg, MAX_AUD_VAL_BYTES, MAX_COMMITED_EPK_BYTES, MAX_EXTRA_FIELD_BYTES, MAX_ISS_VAL_BYTES, MAX_JWT_HEADER_B64_BYTES, MAX_UID_KEY_BYTES, MAX_UID_VAL_BYTES, MimeType, ModuleId, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionId, MoveJWK, MoveModuleBytecode, MoveModuleId, MoveOption, MoveResource, MoveString, MoveStructId, MoveValue, MoveVector, MultiAgentRawTransaction, MultiAgentTransaction, MultiEd25519PublicKey, MultiEd25519Signature, MultiKey, MultiKeyAccount, MultiKeySignature, MultiSig, MultiSigTransactionPayload, Network, OrderByArg, PaginationArgs, PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, PrivateKey, type PrivateKeyFromDerivationPathArgs, PrivateKeyVariants, ProcessorType, type ProofFetchCallback, type ProofFetchEvents, type ProofFetchFailure, type ProofFetchStatus, type ProofFetchSuccess, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RotationProofChallenge, Script, ScriptFunctionArgument, type ScriptFunctionArgumentTypes, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serialized, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, StructTag, type SuccessEventData, TableItemRequest, TokenStandardArg, TransactionAndProof, TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, TransactionPayloadScript, TransactionResponse, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, type TypeArgument, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVector, U128, U16, U256, U32, U64, U8, Uint16, Uint32, Uint8, UserTransactionResponse, type VerifyEd25519SignatureArgs, type VerifyMultiKeySignatureArgs, type VerifySignatureArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, type ViewFunctionJsonPayload, WaitForTransactionOptions, WhereArg, ZeroKnowledgeSig, ZkProof, ZkpVariant, aptosCoinStructTag, aptosRequest, base64UrlDecode, bigIntToBytesLE, buildTransaction, bytesToBigIntLE, checkOrConvertArgument, convertAmountFromHumanReadableToOnChain, convertAmountFromOnChainToHumanReadable, convertArgument, convertCallArgument, convertNumber, createObjectAddress, createResourceAddress, createTokenAddress, deriveKey, deriveTransactionType, deserializeFromScriptArgument, fetchEntryFunctionAbi, fetchFunctionAbi, fetchMoveFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, floorToWholeHour, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getErrorMessage, getFunctionParts, getIssAudAndUidVal, getKeylessConfig, getKeylessJWKs, hashStrToField, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBool, isCanonicalEd25519Signature, isEmptyOption, isEncodedEntryFunctionArgument, isEncodedStruct, isKeylessSigner, isLargeNumber, isNumber, isScriptDataInput, isString, isValidBIP44Path, isValidHardenedPath, mnemonicToSeed, normalizeBundle, nowInSeconds, objectStructTag, optionStructTag, padAndPackBytesWithLen, paginateWithCursor, parseEncodedStruct, parseJwtHeader, parseTypeTag, poseidonHash, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, sleep, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch };
11643
+ export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_FA, APTOS_HARDENED_REGEX, AbstractKeylessAccount, Account$1 as Account, AccountAddress, AccountAddressInput, AccountAuthenticator, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorNoAccountAuthenticator, AccountAuthenticatorSingleKey, AccountData, AccountPublicKey, AccountSequenceNumber, AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, AptosRequest, AptosResponse, AptosScriptComposer, AptosSettings, AuthenticationKey, AuthenticationKeyScheme, Block, Bool, CKDPriv, ChainId, Client, ClientConfig, ClientRequest, ClientResponse, CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, type DerivedKeys, Deserializable, type DeserializableClass, Deserializer, EPK_HORIZON_SECS, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, EphemeralCertificate, EphemeralCertificateVariant, EphemeralKeyPair, EphemeralPublicKey, EphemeralPublicKeyVariant, EphemeralSignature, type ExecutionFinishEventData, FIREBASE_AUTH_ISS_PATTERN, type FailureEventData, FaucetConfig, FederatedKeylessAccount, FederatedKeylessPublicKey, FeePayerRawTransaction, FixedBytes, FullNodeConfig, type FunctionABI, GasEstimation, type GenerateAccountArgs, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, type GetRequestOptions, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, Groth16VerificationKey, Groth16Zkp, HARDENED_OFFSET, Hex, HexInput, Identifier, IndexerConfig, type InputBatchedFunctionData, type InputEntryFunctionData, type InputEntryFunctionDataWithABI, type InputEntryFunctionDataWithRemoteABI, type InputGenerateMultiAgentRawTransactionArgs, type InputGenerateMultiAgentRawTransactionData, type InputGenerateRawTransactionArgs, type InputGenerateSingleSignerRawTransactionArgs, type InputGenerateSingleSignerRawTransactionData, type InputGenerateTransactionData, type InputGenerateTransactionOptions, type InputGenerateTransactionPayloadData, type InputGenerateTransactionPayloadDataWithABI, type InputGenerateTransactionPayloadDataWithRemoteABI, type InputMultiSigData, type InputMultiSigDataWithABI, type InputMultiSigDataWithRemoteABI, type InputScriptData, type InputSimulateTransactionData, type InputSimulateTransactionOptions, type InputSubmitTransactionData, type InputViewFunctionData, type InputViewFunctionDataWithABI, type InputViewFunctionDataWithRemoteABI, type InputViewFunctionJsonData, KeyType, KeylessAccount, KeylessConfiguration, KeylessError, KeylessErrorCategory, KeylessErrorResolutionTip, KeylessErrorType, KeylessPublicKey, KeylessSignature, type KeylessSigner, LedgerInfo, LedgerVersionArg, MAX_AUD_VAL_BYTES, MAX_COMMITED_EPK_BYTES, MAX_EXTRA_FIELD_BYTES, MAX_ISS_VAL_BYTES, MAX_JWT_HEADER_B64_BYTES, MAX_UID_KEY_BYTES, MAX_UID_VAL_BYTES, MimeType, ModuleId, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionId, MoveJWK, MoveModuleBytecode, MoveModuleId, MoveOption, MoveResource, MoveString, MoveStructId, MoveValue, MoveVector, MultiAgentRawTransaction, MultiAgentTransaction, MultiEd25519PublicKey, MultiEd25519Signature, MultiKey, MultiKeyAccount, MultiKeySignature, MultiSig, MultiSigTransactionPayload, Network, OrderByArg, PaginationArgs, PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, PrivateKey, type PrivateKeyFromDerivationPathArgs, PrivateKeyVariants, ProcessorType, type ProofFetchCallback, type ProofFetchEvents, type ProofFetchFailure, type ProofFetchStatus, type ProofFetchSuccess, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RotationProofChallenge, Script, ScriptFunctionArgument, type ScriptFunctionArgumentTypes, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serialized, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, StructTag, type SuccessEventData, TableItemRequest, TokenStandardArg, TransactionAndProof, TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, TransactionPayloadScript, TransactionResponse, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, type TypeArgument, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVector, U128, U16, U256, U32, U64, U8, Uint16, Uint32, Uint8, UserTransactionResponse, type VerifyEd25519SignatureArgs, type VerifyMultiKeySignatureArgs, type VerifySignatureArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, type ViewFunctionJsonPayload, WaitForTransactionOptions, WhereArg, ZeroKnowledgeSig, ZkProof, ZkpVariant, aptosCoinStructTag, aptosRequest, base64UrlDecode, bigIntToBytesLE, buildTransaction, bytesToBigIntLE, checkOrConvertArgument, convertAmountFromHumanReadableToOnChain, convertAmountFromOnChainToHumanReadable, convertArgument, convertCallArgument, convertNumber, createObjectAddress, createResourceAddress, createTokenAddress, deriveKey, deriveTransactionType, deserializeFromScriptArgument, fetchEntryFunctionAbi, fetchFunctionAbi, fetchMoveFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, floorToWholeHour, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getErrorMessage, getFunctionParts, getIssAudAndUidVal, getKeylessConfig, getKeylessJWKs, hashStrToField, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBool, isCanonicalEd25519Signature, isEmptyOption, isEncodedEntryFunctionArgument, isEncodedStruct, isKeylessSigner, isLargeNumber, isNumber, isScriptDataInput, isString, isValidBIP44Path, isValidHardenedPath, mnemonicToSeed, normalizeBundle, nowInSeconds, objectStructTag, optionStructTag, padAndPackBytesWithLen, paginateWithCursor, parseEncodedStruct, parseJwtHeader, parseTypeTag, poseidonHash, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, sleep, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch };