@aptos-labs/ts-sdk 6.0.0 → 6.1.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 (455) hide show
  1. package/dist/common/{account-Dpz_N9h-.d.ts → account-CSOaJ0SC.d.ts} +182 -19
  2. package/dist/common/chunk-3NBJLJ2Y.js +4 -0
  3. package/dist/common/chunk-3NBJLJ2Y.js.map +1 -0
  4. package/dist/common/cli/index.d.ts +1 -1
  5. package/dist/common/cli/index.js +1 -1
  6. package/dist/common/cli/index.js.map +1 -1
  7. package/dist/common/index.d.ts +69 -6
  8. package/dist/common/index.js +33 -44
  9. package/dist/common/index.js.map +1 -1
  10. package/dist/esm/{Ed25519Account-BW_kXHC2.d.mts → Ed25519Account-BCt2cu_M.d.mts} +2 -2
  11. package/dist/esm/account/AbstractKeylessAccount.d.mts +3 -3
  12. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  13. package/dist/esm/account/AbstractedAccount.d.mts +2 -2
  14. package/dist/esm/account/AbstractedAccount.mjs +1 -1
  15. package/dist/esm/account/Account.d.mts +2 -2
  16. package/dist/esm/account/Account.mjs +1 -1
  17. package/dist/esm/account/AccountUtils.d.mts +3 -3
  18. package/dist/esm/account/AccountUtils.mjs +1 -1
  19. package/dist/esm/account/DerivableAbstractedAccount.d.mts +2 -2
  20. package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
  21. package/dist/esm/account/Ed25519Account.d.mts +2 -2
  22. package/dist/esm/account/Ed25519Account.mjs +1 -1
  23. package/dist/esm/account/EphemeralKeyPair.d.mts +26 -2
  24. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  25. package/dist/esm/account/FederatedKeylessAccount.d.mts +3 -3
  26. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  27. package/dist/esm/account/KeylessAccount.d.mts +3 -3
  28. package/dist/esm/account/KeylessAccount.mjs +1 -1
  29. package/dist/esm/account/MultiEd25519Account.d.mts +2 -2
  30. package/dist/esm/account/MultiEd25519Account.mjs +1 -1
  31. package/dist/esm/account/MultiKeyAccount.d.mts +3 -3
  32. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  33. package/dist/esm/account/SingleKeyAccount.d.mts +2 -2
  34. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  35. package/dist/esm/account/index.d.mts +3 -3
  36. package/dist/esm/account/index.mjs +1 -1
  37. package/dist/esm/account/utils.d.mts +1 -1
  38. package/dist/esm/account/utils.mjs +1 -1
  39. package/dist/esm/{account-CcxnCdYZ.d.mts → account-Dg0ejXHy.d.mts} +172 -8
  40. package/dist/esm/api/account/abstraction.d.mts +1 -1
  41. package/dist/esm/api/account/abstraction.mjs +1 -1
  42. package/dist/esm/api/account.d.mts +2 -2
  43. package/dist/esm/api/account.mjs +1 -1
  44. package/dist/esm/api/ans.d.mts +1 -1
  45. package/dist/esm/api/ans.mjs +1 -1
  46. package/dist/esm/api/aptos.d.mts +3 -3
  47. package/dist/esm/api/aptos.mjs +1 -1
  48. package/dist/esm/api/aptosConfig.d.mts +1 -1
  49. package/dist/esm/api/aptosConfig.mjs +1 -1
  50. package/dist/esm/api/coin.d.mts +1 -1
  51. package/dist/esm/api/coin.mjs +1 -1
  52. package/dist/esm/api/digitalAsset.d.mts +2 -2
  53. package/dist/esm/api/digitalAsset.mjs +1 -1
  54. package/dist/esm/api/faucet.d.mts +1 -1
  55. package/dist/esm/api/faucet.mjs +1 -1
  56. package/dist/esm/api/fungibleAsset.d.mts +2 -2
  57. package/dist/esm/api/fungibleAsset.mjs +1 -1
  58. package/dist/esm/api/general.d.mts +1 -1
  59. package/dist/esm/api/general.mjs +1 -1
  60. package/dist/esm/api/index.d.mts +3 -3
  61. package/dist/esm/api/index.mjs +1 -1
  62. package/dist/esm/api/keyless.d.mts +3 -3
  63. package/dist/esm/api/keyless.mjs +1 -1
  64. package/dist/esm/api/object.d.mts +1 -1
  65. package/dist/esm/api/object.mjs +1 -1
  66. package/dist/esm/api/staking.d.mts +1 -1
  67. package/dist/esm/api/staking.mjs +1 -1
  68. package/dist/esm/api/table.d.mts +1 -1
  69. package/dist/esm/api/table.mjs +1 -1
  70. package/dist/esm/api/transaction.d.mts +2 -2
  71. package/dist/esm/api/transaction.mjs +1 -1
  72. package/dist/esm/api/transactionSubmission/build.d.mts +1 -1
  73. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  74. package/dist/esm/api/transactionSubmission/helpers.d.mts +1 -1
  75. package/dist/esm/api/transactionSubmission/helpers.mjs +1 -1
  76. package/dist/esm/api/transactionSubmission/management.d.mts +2 -2
  77. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  78. package/dist/esm/api/transactionSubmission/sign.d.mts +2 -2
  79. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  80. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  81. package/dist/esm/api/transactionSubmission/simulate.d.mts +1 -1
  82. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  83. package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
  84. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  85. package/dist/esm/api/utils.d.mts +1 -1
  86. package/dist/esm/api/utils.mjs +1 -1
  87. package/dist/esm/bcs/consts.d.mts +1 -1
  88. package/dist/esm/bcs/deserializer.d.mts +1 -1
  89. package/dist/esm/bcs/deserializer.mjs +1 -1
  90. package/dist/esm/bcs/index.d.mts +1 -1
  91. package/dist/esm/bcs/index.mjs +1 -1
  92. package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +1 -1
  93. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  94. package/dist/esm/bcs/serializable/fixedBytes.d.mts +1 -1
  95. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  96. package/dist/esm/bcs/serializable/movePrimitives.d.mts +1 -1
  97. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  98. package/dist/esm/bcs/serializable/moveStructs.d.mts +1 -1
  99. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  100. package/dist/esm/bcs/serializer.d.mts +1 -1
  101. package/dist/esm/bcs/serializer.mjs +1 -1
  102. package/dist/esm/chunk-32J7VMLV.mjs +2 -0
  103. package/dist/esm/chunk-32J7VMLV.mjs.map +1 -0
  104. package/dist/esm/chunk-3FDSKP56.mjs +2 -0
  105. package/dist/esm/chunk-3FDSKP56.mjs.map +1 -0
  106. package/dist/esm/{chunk-X674XJNJ.mjs → chunk-3Q3J4DTI.mjs} +2 -2
  107. package/dist/esm/chunk-7FG7RJDS.mjs +2 -0
  108. package/dist/esm/chunk-7FG7RJDS.mjs.map +1 -0
  109. package/dist/esm/chunk-BHVMFSAD.mjs +2 -0
  110. package/dist/esm/chunk-BHVMFSAD.mjs.map +1 -0
  111. package/dist/esm/chunk-CWI5B5KE.mjs +2 -0
  112. package/dist/esm/{chunk-QDJDZ3ON.mjs → chunk-DE4YVX3L.mjs} +2 -2
  113. package/dist/esm/chunk-DECWO3X5.mjs +2 -0
  114. package/dist/esm/chunk-DECWO3X5.mjs.map +1 -0
  115. package/dist/esm/{chunk-76SVQZDX.mjs → chunk-DRGODFFX.mjs} +2 -2
  116. package/dist/esm/{chunk-GOXRBEIJ.mjs → chunk-F45HI7LU.mjs} +1 -1
  117. package/dist/esm/chunk-F45HI7LU.mjs.map +1 -0
  118. package/dist/esm/{chunk-LS2HRAVW.mjs → chunk-G5OONGWS.mjs} +1 -12
  119. package/dist/esm/chunk-G5OONGWS.mjs.map +1 -0
  120. package/dist/esm/chunk-GP3CDQFI.mjs +2 -0
  121. package/dist/esm/chunk-GP3CDQFI.mjs.map +1 -0
  122. package/dist/esm/chunk-GWM3VCT4.mjs +4 -0
  123. package/dist/esm/chunk-GWM3VCT4.mjs.map +1 -0
  124. package/dist/esm/{chunk-C5UZZHA4.mjs → chunk-HHAUJ5E4.mjs} +2 -2
  125. package/dist/esm/chunk-ITZN23GU.mjs +2 -0
  126. package/dist/esm/{chunk-G3HAIETV.mjs → chunk-KLDERTLN.mjs} +2 -2
  127. package/dist/esm/chunk-KLDERTLN.mjs.map +1 -0
  128. package/dist/esm/chunk-M65PXVDO.mjs +2 -0
  129. package/dist/esm/chunk-M65PXVDO.mjs.map +1 -0
  130. package/dist/esm/chunk-ODNZJSOC.mjs +2 -0
  131. package/dist/esm/chunk-ODNZJSOC.mjs.map +1 -0
  132. package/dist/esm/{chunk-NTLOKAPD.mjs → chunk-PDNDARQY.mjs} +2 -2
  133. package/dist/esm/{chunk-RYOICF37.mjs → chunk-POKQD2RK.mjs} +2 -2
  134. package/dist/esm/chunk-Q5ESW36C.mjs +2 -0
  135. package/dist/esm/chunk-Q5ESW36C.mjs.map +1 -0
  136. package/dist/esm/chunk-QRD5NGNC.mjs +2 -0
  137. package/dist/esm/{chunk-RQN6LA7E.mjs.map → chunk-QRD5NGNC.mjs.map} +1 -1
  138. package/dist/esm/{chunk-43LWUUXS.mjs → chunk-QV37KEZY.mjs} +2 -2
  139. package/dist/esm/{chunk-PXJEKGEG.mjs → chunk-QYC3HOQX.mjs} +2 -2
  140. package/dist/esm/{chunk-CUXCVNES.mjs → chunk-RGXAFBFA.mjs} +2 -2
  141. package/dist/esm/{chunk-3P474TWM.mjs → chunk-RSUFVB4P.mjs} +2 -2
  142. package/dist/esm/chunk-SZBXWUBS.mjs +2 -0
  143. package/dist/esm/chunk-SZBXWUBS.mjs.map +1 -0
  144. package/dist/esm/{chunk-F3NI6N7R.mjs → chunk-TIMTVXFU.mjs} +2 -2
  145. package/dist/esm/chunk-TIMTVXFU.mjs.map +1 -0
  146. package/dist/esm/{chunk-QREVMGQZ.mjs → chunk-U5HTF4OK.mjs} +1 -1
  147. package/dist/esm/{chunk-QREVMGQZ.mjs.map → chunk-U5HTF4OK.mjs.map} +1 -1
  148. package/dist/esm/{chunk-6IWGTO2J.mjs → chunk-UNA3V4UB.mjs} +2 -2
  149. package/dist/esm/chunk-US6KOOYS.mjs +2 -0
  150. package/dist/esm/chunk-US6KOOYS.mjs.map +1 -0
  151. package/dist/esm/chunk-UXDYADZV.mjs +2 -0
  152. package/dist/esm/chunk-UXDYADZV.mjs.map +1 -0
  153. package/dist/esm/{chunk-5FNZUL2Y.mjs → chunk-UZMJ4DAO.mjs} +2 -2
  154. package/dist/esm/chunk-V5K2RRFT.mjs +2 -0
  155. package/dist/esm/chunk-V5K2RRFT.mjs.map +1 -0
  156. package/dist/esm/{chunk-35DKMW7Q.mjs → chunk-VW3Y5EOJ.mjs} +1 -1
  157. package/dist/esm/{chunk-35DKMW7Q.mjs.map → chunk-VW3Y5EOJ.mjs.map} +1 -1
  158. package/dist/esm/{chunk-MEG27LEV.mjs → chunk-VWLK43JM.mjs} +3 -3
  159. package/dist/esm/chunk-VWLK43JM.mjs.map +1 -0
  160. package/dist/esm/{chunk-DIFSO4N6.mjs → chunk-VWXVSRRQ.mjs} +2 -2
  161. package/dist/esm/{chunk-WZ6FL7CH.mjs → chunk-WRV7BWXE.mjs} +2 -2
  162. package/dist/esm/{chunk-56IXVVXX.mjs → chunk-YMZF4KMT.mjs} +2 -2
  163. package/dist/esm/{chunk-FW6UHAQV.mjs → chunk-YNNDFGVQ.mjs} +2 -2
  164. package/dist/esm/{chunk-FW6UHAQV.mjs.map → chunk-YNNDFGVQ.mjs.map} +1 -1
  165. package/dist/esm/{chunk-52PWWLJJ.mjs → chunk-YOT47DDX.mjs} +2 -2
  166. package/dist/esm/chunk-YOT47DDX.mjs.map +1 -0
  167. package/dist/esm/cli/index.d.mts +1 -1
  168. package/dist/esm/cli/index.mjs +1 -1
  169. package/dist/esm/cli/localNode.mjs +1 -1
  170. package/dist/esm/cli/move.d.mts +1 -1
  171. package/dist/esm/cli/move.mjs +1 -1
  172. package/dist/esm/client/core.d.mts +1 -1
  173. package/dist/esm/client/core.mjs +1 -1
  174. package/dist/esm/client/get.d.mts +1 -1
  175. package/dist/esm/client/get.mjs +1 -1
  176. package/dist/esm/client/index.d.mts +1 -1
  177. package/dist/esm/client/index.mjs +1 -1
  178. package/dist/esm/client/post.d.mts +1 -1
  179. package/dist/esm/client/post.mjs +1 -1
  180. package/dist/esm/core/account/index.d.mts +1 -1
  181. package/dist/esm/core/account/index.mjs +1 -1
  182. package/dist/esm/core/account/utils/address.d.mts +1 -1
  183. package/dist/esm/core/account/utils/address.mjs +1 -1
  184. package/dist/esm/core/account/utils/index.d.mts +1 -1
  185. package/dist/esm/core/account/utils/index.mjs +1 -1
  186. package/dist/esm/core/accountAddress.d.mts +1 -1
  187. package/dist/esm/core/accountAddress.mjs +1 -1
  188. package/dist/esm/core/authenticationKey.d.mts +1 -1
  189. package/dist/esm/core/authenticationKey.mjs +1 -1
  190. package/dist/esm/core/crypto/abstraction.d.mts +1 -1
  191. package/dist/esm/core/crypto/abstraction.mjs +1 -1
  192. package/dist/esm/core/crypto/deserializationUtils.d.mts +1 -1
  193. package/dist/esm/core/crypto/deserializationUtils.mjs +1 -1
  194. package/dist/esm/core/crypto/ed25519.d.mts +1 -1
  195. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  196. package/dist/esm/core/crypto/ephemeral.d.mts +1 -1
  197. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  198. package/dist/esm/core/crypto/federatedKeyless.d.mts +2 -2
  199. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  200. package/dist/esm/core/crypto/index.d.mts +2 -2
  201. package/dist/esm/core/crypto/index.mjs +1 -1
  202. package/dist/esm/core/crypto/keyless.d.mts +2 -2
  203. package/dist/esm/core/crypto/keyless.mjs +1 -1
  204. package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
  205. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  206. package/dist/esm/core/crypto/multiKey.d.mts +1 -1
  207. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  208. package/dist/esm/core/crypto/poseidon.mjs +1 -1
  209. package/dist/esm/core/crypto/privateKey.d.mts +1 -1
  210. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  211. package/dist/esm/core/crypto/proof.d.mts +1 -1
  212. package/dist/esm/core/crypto/proof.mjs +1 -1
  213. package/dist/esm/core/crypto/publicKey.d.mts +1 -1
  214. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  215. package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
  216. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  217. package/dist/esm/core/crypto/secp256r1.d.mts +1 -1
  218. package/dist/esm/core/crypto/secp256r1.mjs +1 -1
  219. package/dist/esm/core/crypto/signature.d.mts +1 -1
  220. package/dist/esm/core/crypto/signature.mjs +1 -1
  221. package/dist/esm/core/crypto/singleKey.d.mts +1 -1
  222. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  223. package/dist/esm/core/crypto/types.d.mts +1 -1
  224. package/dist/esm/core/crypto/utils.d.mts +1 -1
  225. package/dist/esm/core/crypto/utils.mjs +1 -1
  226. package/dist/esm/core/hex.d.mts +1 -1
  227. package/dist/esm/core/index.d.mts +2 -2
  228. package/dist/esm/core/index.mjs +1 -1
  229. package/dist/esm/errors/index.d.mts +1 -1
  230. package/dist/esm/errors/index.mjs +1 -1
  231. package/dist/esm/{federatedKeyless-BzaYmP03.d.mts → federatedKeyless-BYLu31Sa.d.mts} +13 -2
  232. package/dist/esm/index.d.mts +5 -5
  233. package/dist/esm/index.mjs +1 -1
  234. package/dist/esm/internal/abstraction.d.mts +1 -1
  235. package/dist/esm/internal/abstraction.mjs +1 -1
  236. package/dist/esm/internal/account.d.mts +3 -3
  237. package/dist/esm/internal/account.mjs +1 -1
  238. package/dist/esm/internal/ans.d.mts +2 -2
  239. package/dist/esm/internal/ans.mjs +1 -1
  240. package/dist/esm/internal/coin.d.mts +1 -1
  241. package/dist/esm/internal/coin.mjs +1 -1
  242. package/dist/esm/internal/digitalAsset.d.mts +3 -3
  243. package/dist/esm/internal/digitalAsset.mjs +1 -1
  244. package/dist/esm/internal/faucet.d.mts +1 -1
  245. package/dist/esm/internal/faucet.mjs +1 -1
  246. package/dist/esm/internal/fungibleAsset.d.mts +4 -4
  247. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  248. package/dist/esm/internal/general.d.mts +4 -2
  249. package/dist/esm/internal/general.mjs +1 -1
  250. package/dist/esm/internal/keyless.d.mts +3 -3
  251. package/dist/esm/internal/keyless.mjs +1 -1
  252. package/dist/esm/internal/object.d.mts +1 -1
  253. package/dist/esm/internal/object.mjs +1 -1
  254. package/dist/esm/internal/staking.d.mts +2 -2
  255. package/dist/esm/internal/staking.mjs +1 -1
  256. package/dist/esm/internal/table.d.mts +1 -1
  257. package/dist/esm/internal/table.mjs +1 -1
  258. package/dist/esm/internal/transaction.d.mts +1 -1
  259. package/dist/esm/internal/transaction.mjs +1 -1
  260. package/dist/esm/internal/transactionSubmission.d.mts +2 -2
  261. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  262. package/dist/esm/internal/utils/index.d.mts +1 -1
  263. package/dist/esm/internal/utils/index.mjs +1 -1
  264. package/dist/esm/internal/utils/utils.d.mts +1 -1
  265. package/dist/esm/internal/utils/utils.mjs +1 -1
  266. package/dist/esm/internal/view.d.mts +1 -1
  267. package/dist/esm/internal/view.mjs +1 -1
  268. package/dist/esm/transactions/authenticator/account.d.mts +1 -1
  269. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  270. package/dist/esm/transactions/authenticator/index.d.mts +1 -1
  271. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  272. package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
  273. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  274. package/dist/esm/transactions/index.d.mts +1 -1
  275. package/dist/esm/transactions/index.mjs +1 -1
  276. package/dist/esm/transactions/instances/chainId.d.mts +1 -1
  277. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  278. package/dist/esm/transactions/instances/identifier.d.mts +1 -1
  279. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  280. package/dist/esm/transactions/instances/index.d.mts +1 -1
  281. package/dist/esm/transactions/instances/index.mjs +1 -1
  282. package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
  283. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  284. package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +1 -1
  285. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  286. package/dist/esm/transactions/instances/rawTransaction.d.mts +1 -1
  287. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  288. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
  289. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  290. package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
  291. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  292. package/dist/esm/transactions/instances/simpleTransaction.d.mts +1 -1
  293. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  294. package/dist/esm/transactions/instances/transactionArgument.d.mts +1 -1
  295. package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
  296. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  297. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
  298. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  299. package/dist/esm/transactions/management/index.d.mts +2 -2
  300. package/dist/esm/transactions/management/index.mjs +1 -1
  301. package/dist/esm/transactions/management/transactionWorker.d.mts +12 -4
  302. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  303. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +1 -1
  304. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  305. package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
  306. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  307. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +2 -1
  308. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  309. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +1 -1
  310. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  311. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +1 -1
  312. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  313. package/dist/esm/transactions/typeTag/index.d.mts +1 -1
  314. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  315. package/dist/esm/transactions/typeTag/parser.d.mts +1 -1
  316. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  317. package/dist/esm/transactions/types.d.mts +1 -1
  318. package/dist/esm/types/generated/operations.d.mts +0 -11
  319. package/dist/esm/types/generated/queries.d.mts +1 -1
  320. package/dist/esm/types/generated/queries.mjs +1 -1
  321. package/dist/esm/types/index.d.mts +1 -1
  322. package/dist/esm/types/index.mjs +1 -1
  323. package/dist/esm/types/indexer.d.mts +1 -1
  324. package/dist/esm/types/types.d.mts +1 -1
  325. package/dist/esm/types/types.mjs +1 -1
  326. package/dist/esm/utils/const.d.mts +11 -1
  327. package/dist/esm/utils/const.mjs +1 -1
  328. package/dist/esm/utils/helpers.d.mts +21 -2
  329. package/dist/esm/utils/helpers.mjs +1 -1
  330. package/dist/esm/utils/index.d.mts +3 -3
  331. package/dist/esm/utils/index.mjs +1 -1
  332. package/dist/esm/utils/memoize.d.mts +23 -1
  333. package/dist/esm/utils/memoize.mjs +1 -1
  334. package/dist/esm/utils/normalizeBundle.d.mts +1 -1
  335. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  336. package/dist/esm/version.d.mts +1 -1
  337. package/dist/esm/version.mjs +1 -1
  338. package/package.json +38 -45
  339. package/src/account/AbstractKeylessAccount.ts +2 -3
  340. package/src/account/DerivableAbstractedAccount.ts +1 -3
  341. package/src/account/EphemeralKeyPair.ts +53 -1
  342. package/src/account/MultiEd25519Account.ts +0 -2
  343. package/src/account/MultiKeyAccount.ts +0 -2
  344. package/src/account/SingleKeyAccount.ts +0 -1
  345. package/src/api/account.ts +1 -2
  346. package/src/api/ans.ts +0 -1
  347. package/src/api/aptos.ts +3 -2
  348. package/src/api/aptosConfig.ts +13 -0
  349. package/src/api/transaction.ts +4 -4
  350. package/src/api/transactionSubmission/build.ts +1 -5
  351. package/src/api/transactionSubmission/helpers.ts +1 -1
  352. package/src/api/transactionSubmission/sign.ts +2 -2
  353. package/src/bcs/deserializer.ts +64 -17
  354. package/src/bcs/serializable/movePrimitives.ts +16 -28
  355. package/src/bcs/serializable/moveStructs.ts +4 -6
  356. package/src/bcs/serializer.ts +151 -12
  357. package/src/cli/localNode.ts +2 -3
  358. package/src/cli/move.ts +5 -5
  359. package/src/client/get.ts +8 -10
  360. package/src/core/accountAddress.ts +2 -3
  361. package/src/core/crypto/abstraction.ts +3 -3
  362. package/src/core/crypto/ed25519.ts +66 -1
  363. package/src/core/crypto/federatedKeyless.ts +1 -1
  364. package/src/core/crypto/keyless.ts +65 -13
  365. package/src/core/crypto/multiEd25519.ts +1 -3
  366. package/src/core/crypto/multiKey.ts +4 -7
  367. package/src/core/crypto/poseidon.ts +0 -1
  368. package/src/core/crypto/privateKey.ts +2 -4
  369. package/src/core/crypto/secp256k1.ts +68 -3
  370. package/src/core/crypto/secp256r1.ts +1 -1
  371. package/src/core/crypto/singleKey.ts +4 -0
  372. package/src/core/crypto/utils.ts +6 -3
  373. package/src/errors/index.ts +4 -5
  374. package/src/internal/account.ts +20 -29
  375. package/src/internal/ans.ts +5 -6
  376. package/src/internal/general.ts +24 -6
  377. package/src/internal/queries/getCollectionData.graphql +0 -11
  378. package/src/internal/transaction.ts +3 -5
  379. package/src/internal/transactionSubmission.ts +23 -0
  380. package/src/transactions/authenticator/account.ts +0 -3
  381. package/src/transactions/authenticator/transaction.ts +0 -2
  382. package/src/transactions/instances/multiAgentTransaction.ts +0 -2
  383. package/src/transactions/instances/rawTransaction.ts +0 -2
  384. package/src/transactions/instances/signedTransaction.ts +0 -2
  385. package/src/transactions/instances/simpleTransaction.ts +0 -2
  386. package/src/transactions/instances/transactionPayload.ts +7 -6
  387. package/src/transactions/management/accountSequenceNumber.ts +0 -2
  388. package/src/transactions/management/transactionWorker.ts +40 -10
  389. package/src/transactions/transactionBuilder/remoteAbi.ts +21 -6
  390. package/src/transactions/transactionBuilder/transactionBuilder.ts +13 -9
  391. package/src/transactions/typeTag/index.ts +1 -1
  392. package/src/transactions/typeTag/parser.ts +1 -2
  393. package/src/types/generated/operations.ts +0 -11
  394. package/src/types/generated/queries.ts +0 -11
  395. package/src/types/types.ts +26 -0
  396. package/src/utils/const.ts +11 -0
  397. package/src/utils/helpers.ts +45 -5
  398. package/src/utils/memoize.ts +177 -11
  399. package/src/version.ts +1 -1
  400. package/dist/common/chunk-4RHBBU7C.js +0 -4
  401. package/dist/common/chunk-4RHBBU7C.js.map +0 -1
  402. package/dist/esm/chunk-2DPQMXUG.mjs +0 -4
  403. package/dist/esm/chunk-2DPQMXUG.mjs.map +0 -1
  404. package/dist/esm/chunk-2LCPW76G.mjs +0 -2
  405. package/dist/esm/chunk-2LCPW76G.mjs.map +0 -1
  406. package/dist/esm/chunk-2PASUPUO.mjs +0 -2
  407. package/dist/esm/chunk-2PASUPUO.mjs.map +0 -1
  408. package/dist/esm/chunk-52PWWLJJ.mjs.map +0 -1
  409. package/dist/esm/chunk-54C2P534.mjs +0 -2
  410. package/dist/esm/chunk-54C2P534.mjs.map +0 -1
  411. package/dist/esm/chunk-BGZDJ5SM.mjs +0 -2
  412. package/dist/esm/chunk-BGZDJ5SM.mjs.map +0 -1
  413. package/dist/esm/chunk-F3NI6N7R.mjs.map +0 -1
  414. package/dist/esm/chunk-G3HAIETV.mjs.map +0 -1
  415. package/dist/esm/chunk-GOXRBEIJ.mjs.map +0 -1
  416. package/dist/esm/chunk-I42Z32Q2.mjs +0 -2
  417. package/dist/esm/chunk-I42Z32Q2.mjs.map +0 -1
  418. package/dist/esm/chunk-JN65XG2P.mjs +0 -2
  419. package/dist/esm/chunk-JN65XG2P.mjs.map +0 -1
  420. package/dist/esm/chunk-KUF4DKN5.mjs +0 -2
  421. package/dist/esm/chunk-LD3I4CYO.mjs +0 -2
  422. package/dist/esm/chunk-LS2HRAVW.mjs.map +0 -1
  423. package/dist/esm/chunk-MEG27LEV.mjs.map +0 -1
  424. package/dist/esm/chunk-NCKJ7X57.mjs +0 -2
  425. package/dist/esm/chunk-NCKJ7X57.mjs.map +0 -1
  426. package/dist/esm/chunk-NK3Y3PV3.mjs +0 -2
  427. package/dist/esm/chunk-NK3Y3PV3.mjs.map +0 -1
  428. package/dist/esm/chunk-OLILO7VD.mjs +0 -2
  429. package/dist/esm/chunk-OLILO7VD.mjs.map +0 -1
  430. package/dist/esm/chunk-PYVKCTUN.mjs +0 -2
  431. package/dist/esm/chunk-PYVKCTUN.mjs.map +0 -1
  432. package/dist/esm/chunk-QEHKRR3I.mjs +0 -2
  433. package/dist/esm/chunk-QEHKRR3I.mjs.map +0 -1
  434. package/dist/esm/chunk-RQN6LA7E.mjs +0 -2
  435. package/dist/esm/chunk-Y426VCPM.mjs +0 -2
  436. package/dist/esm/chunk-Y426VCPM.mjs.map +0 -1
  437. package/dist/esm/chunk-YOZBVVKL.mjs +0 -2
  438. package/dist/esm/chunk-YOZBVVKL.mjs.map +0 -1
  439. /package/dist/esm/{chunk-X674XJNJ.mjs.map → chunk-3Q3J4DTI.mjs.map} +0 -0
  440. /package/dist/esm/{chunk-KUF4DKN5.mjs.map → chunk-CWI5B5KE.mjs.map} +0 -0
  441. /package/dist/esm/{chunk-QDJDZ3ON.mjs.map → chunk-DE4YVX3L.mjs.map} +0 -0
  442. /package/dist/esm/{chunk-76SVQZDX.mjs.map → chunk-DRGODFFX.mjs.map} +0 -0
  443. /package/dist/esm/{chunk-C5UZZHA4.mjs.map → chunk-HHAUJ5E4.mjs.map} +0 -0
  444. /package/dist/esm/{chunk-LD3I4CYO.mjs.map → chunk-ITZN23GU.mjs.map} +0 -0
  445. /package/dist/esm/{chunk-NTLOKAPD.mjs.map → chunk-PDNDARQY.mjs.map} +0 -0
  446. /package/dist/esm/{chunk-RYOICF37.mjs.map → chunk-POKQD2RK.mjs.map} +0 -0
  447. /package/dist/esm/{chunk-43LWUUXS.mjs.map → chunk-QV37KEZY.mjs.map} +0 -0
  448. /package/dist/esm/{chunk-PXJEKGEG.mjs.map → chunk-QYC3HOQX.mjs.map} +0 -0
  449. /package/dist/esm/{chunk-CUXCVNES.mjs.map → chunk-RGXAFBFA.mjs.map} +0 -0
  450. /package/dist/esm/{chunk-3P474TWM.mjs.map → chunk-RSUFVB4P.mjs.map} +0 -0
  451. /package/dist/esm/{chunk-6IWGTO2J.mjs.map → chunk-UNA3V4UB.mjs.map} +0 -0
  452. /package/dist/esm/{chunk-5FNZUL2Y.mjs.map → chunk-UZMJ4DAO.mjs.map} +0 -0
  453. /package/dist/esm/{chunk-DIFSO4N6.mjs.map → chunk-VWXVSRRQ.mjs.map} +0 -0
  454. /package/dist/esm/{chunk-WZ6FL7CH.mjs.map → chunk-WRV7BWXE.mjs.map} +0 -0
  455. /package/dist/esm/{chunk-56IXVVXX.mjs.map → chunk-YMZF4KMT.mjs.map} +0 -0
@@ -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 _chunk4RHBBU7Cjs = require('../chunk-4RHBBU7C.js');var _child_process = require('child_process');var _treekill = require('tree-kill'); var _treekill2 = _interopRequireDefault(_treekill);var _os = require('os');var u=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.extraArgs=[];this.showStdout=_nullishCoalesce(_optionalChain([s, 'optionalAccess', _ => _.showStdout]), () => (!0)),this.extraArgs=_nullishCoalesce(_optionalChain([s, 'optionalAccess', _2 => _2.extraArgs]), () => ([]))}async stop(){await new Promise((s,e)=>{_optionalChain([this, 'access', _3 => _3.process, 'optionalAccess', _4 => _4.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 e=["aptos","node","run-localnet","--force-restart","--assume-yes","--with-indexer-api",...this.extraArgs],r=_os.platform.call(void 0, ),o={env:{...process.env,ENABLE_KEYLESS_DEFAULT:"1"},...r==="win32"&&{shell:!0}};this.process=_child_process.spawn.call(void 0, "npx",e,o),_optionalChain([this, 'access', _5 => _5.process, 'access', _6 => _6.stdout, 'optionalAccess', _7 => _7.on, 'call', _8 => _8("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 _chunk4RHBBU7Cjs.ua.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 l=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 gasProfile(s){let{network:e,transactionId:r,extraArguments:o,showStdout:a}=s,t=["aptos","move","replay","--profile-gas","--network",e,"--txn-id",r];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 = u; exports.Move = l;
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 _chunk3NBJLJ2Yjs = require('../chunk-3NBJLJ2Y.js');var _child_process = require('child_process');var _treekill = require('tree-kill'); var _treekill2 = _interopRequireDefault(_treekill);var _os = require('os');var u=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.extraArgs=[];this.showStdout=_nullishCoalesce(_optionalChain([s, 'optionalAccess', _ => _.showStdout]), () => (!0)),this.extraArgs=_nullishCoalesce(_optionalChain([s, 'optionalAccess', _2 => _2.extraArgs]), () => ([]))}async stop(){await new Promise((s,e)=>{_optionalChain([this, 'access', _3 => _3.process, 'optionalAccess', _4 => _4.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 e=["aptos","node","run-localnet","--force-restart","--assume-yes","--with-indexer-api",...this.extraArgs],r=_os.platform.call(void 0, ),o={env:{...process.env,ENABLE_KEYLESS_DEFAULT:"1"},...r==="win32"&&{shell:!0}};this.process=_child_process.spawn.call(void 0, "npx",e,o),_optionalChain([this, 'access', _5 => _5.process, 'access', _6 => _6.stdout, 'optionalAccess', _7 => _7.on, 'call', _8 => _8("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 _chunk3NBJLJ2Yjs.wa.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 l=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 gasProfile(s){let{network:e,transactionId:r,extraArguments:o,showStdout:a}=s,t=["aptos","move","replay","--profile-gas","--network",e,"--txn-id",r];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 = u; exports.Move = l;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/kent/aptos-ts-sdk/dist/common/cli/index.js","../../../src/cli/localNode.ts","../../../src/cli/move.ts"],"names":["LocalNode","args","resolve","reject","kill","err","cliArgs","currentPlatform","platform","spawnConfig","spawn","data","str","operational","start","last","sleep","Move","network","profile","extraArguments","showStdout"],"mappings":"AAAA,w0BAAyC,8CCEa,yFACrC,wBACQ,IAWZA,CAAAA,CAAN,KAAgB,CAWrB,WAAA,CAAYC,CAAAA,CAAuD,CAVnE,IAAA,CAAS,qBAAA,CAAwB,EAAA,CAEjC,IAAA,CAAS,kBAAA,CAAqB,wBAAA,CAE9B,IAAA,CAAA,UAAA,CAAsB,CAAA,CAAA,CAEtB,IAAA,CAAA,OAAA,CAAiD,IAAA,CAEjD,IAAA,CAAA,SAAA,CAAsB,CAAC,CAAA,CAGrB,IAAA,CAAK,UAAA,kCAAaA,CAAAA,2BAAM,YAAA,SAAc,CAAA,GAAA,CACtC,IAAA,CAAK,SAAA,kCAAYA,CAAAA,6BAAM,WAAA,SAAa,CAAC,GACvC,CAUA,MAAM,IAAA,CAAA,CAAsB,CAC1B,MAAM,IAAI,OAAA,CAAQ,CAACC,CAAAA,CAASC,CAAAA,CAAAA,EAAW,iBAChC,IAAA,qBAAK,OAAA,6BAAS,KAAA,EAYnBC,gCAAAA,IAAK,CAAK,OAAA,CAAQ,GAAA,CAAMC,CAAAA,EAAQ,CAC1BA,CAAAA,CACFF,CAAAA,CAAOE,CAAG,CAAA,CAEVH,CAAAA,CAAQ,CAAA,CAAI,CAEhB,CAAC,CACH,CAAC,CACH,CAUA,MAAM,GAAA,CAAA,CAAqB,CACR,MAAM,IAAA,CAAK,kBAAA,CAAmB,CAAA,EAAA,CAI/C,IAAA,CAAK,KAAA,CAAM,CAAA,CACX,MAAM,IAAA,CAAK,oBAAA,CAAqB,CAAA,CAClC,CAWA,KAAA,CAAA,CAAc,CAEZ,IAAMI,CAAAA,CAAU,CACd,OAAA,CACA,MAAA,CACA,cAAA,CACA,iBAAA,CACA,cAAA,CACA,oBAAA,CACA,GAAG,IAAA,CAAK,SACV,CAAA,CAEMC,CAAAA,CAAkBC,0BAAAA,CAAS,CAC3BC,CAAAA,CAAc,CAClB,GAAA,CAAK,CAAE,GAAG,OAAA,CAAQ,GAAA,CAAK,sBAAA,CAAwB,GAAI,CAAA,CACnD,GAAIF,CAAAA,GAAoB,OAAA,EAAW,CAAE,KAAA,CAAO,CAAA,CAAK,CACnD,CAAA,CAEA,IAAA,CAAK,OAAA,CAAUG,kCAAAA,KAAM,CAAYJ,CAAAA,CAASG,CAAW,CAAA,iBAErD,IAAA,qBAAK,OAAA,qBAAQ,MAAA,6BAAQ,EAAA,mBAAG,MAAA,CAASE,CAAAA,EAAc,CAC7C,IAAMC,CAAAA,CAAMD,CAAAA,CAAK,QAAA,CAAS,CAAA,CAEtB,IAAA,CAAK,UAAA,EACP,OAAA,CAAQ,GAAA,CAAIC,CAAG,CAEnB,CAAC,GACH,CAUA,MAAM,oBAAA,CAAA,CAAyC,CAC7C,IAAIC,CAAAA,CAAc,MAAM,IAAA,CAAK,kBAAA,CAAmB,CAAA,CAC1CC,CAAAA,CAAQ,IAAA,CAAK,GAAA,CAAI,CAAA,CAAI,GAAA,CACvBC,CAAAA,CAAOD,CAAAA,CAEX,GAAA,CAAA,CAAO,CAACD,CAAAA,EAAeC,CAAAA,CAAQ,IAAA,CAAK,qBAAA,CAAwBC,CAAAA,CAAAA,CAE1D,MAAMC,iCAAAA,GAAU,CAAA,CAEhBH,CAAAA,CAAc,MAAM,IAAA,CAAK,kBAAA,CAAmB,CAAA,CAC5CE,CAAAA,CAAO,IAAA,CAAK,GAAA,CAAI,CAAA,CAAI,GAAA,CAKtB,EAAA,CAAI,CAACF,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,yBAAyB,CAAA,CAG3C,MAAO,CAAA,CACT,CASA,MAAM,kBAAA,CAAA,CAAuC,CAC3C,GAAI,CAGF,MAAA,CADa,MAAM,KAAA,CAAM,IAAA,CAAK,kBAAkB,CAAA,CAAA,CACvC,MAAA,GAAW,GAItB,CAAA,UAAmB,CACjB,MAAO,CAAA,CACT,CACF,CACF,CAAA,CCvKA,IAaaI,CAAAA,CAAN,KAAW,CAehB,MAAM,IAAA,CAAKhB,CAAAA,CAKqB,CAC9B,GAAM,CAAE,OAAA,CAAAiB,CAAAA,CAAS,OAAA,CAAAC,CAAAA,CAAS,cAAA,CAAAC,CAAAA,CAAgB,UAAA,CAAAC,CAAW,CAAA,CAAIpB,CAAAA,CACnDK,CAAAA,CAAU,CAAC,OAAA,CAAS,MAAA,CAAQ,CAAA,UAAA,mBAAaY,CAAAA,SAAW,SAAO,CAAA,CAAA","file":"/Users/kent/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 localnet environment.\n * This class provides methods to start, stop, and check the status of the localnet process.\n * It manages the lifecycle of the node process and ensures that it is operational before executing tests.\n * @group Implementation\n * @category CLI\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 extraArgs: string[] = [];\n\n constructor(args?: { showStdout?: boolean; extraArgs?: string[] }) {\n this.showStdout = args?.showStdout ?? true;\n this.extraArgs = args?.extraArgs ?? [];\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 localnet 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 * @group Implementation\n * @category CLI\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 localnet 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 localnet.\n * @group Implementation\n * @category CLI\n */\n start(): void {\n const cliCommand = \"npx\";\n const cliArgs = [\n \"aptos\",\n \"node\",\n \"run-localnet\",\n \"--force-restart\",\n \"--assume-yes\",\n \"--with-indexer-api\",\n ...this.extraArgs,\n ];\n\n const currentPlatform = platform();\n const spawnConfig = {\n env: { ...process.env, ENABLE_KEYLESS_DEFAULT: \"1\" },\n ...(currentPlatform === \"win32\" && { shell: true }),\n };\n\n this.process = spawn(cliCommand, cliArgs, spawnConfig);\n\n this.process.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 localnet 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 * @group Implementation\n * @category CLI\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 localnet is up by querying the readiness endpoint.\n *\n * @returns Promise<boolean> - A promise that resolves to true if the localnet is up, otherwise false.\n * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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/greg/git/aptos-ts-sdk/dist/common/cli/index.js","../../../src/cli/localNode.ts","../../../src/cli/move.ts"],"names":["LocalNode","args","resolve","reject","kill","err","cliArgs","currentPlatform","platform","spawnConfig","spawn","data","str","operational","start","last","sleep","Move","network","profile","extraArguments","showStdout"],"mappings":"AAAA,w0BAAyC,8CCEa,yFACrC,wBACQ,IAWZA,CAAAA,CAAN,KAAgB,CAWrB,WAAA,CAAYC,CAAAA,CAAuD,CAVnE,IAAA,CAAS,qBAAA,CAAwB,EAAA,CAEjC,IAAA,CAAS,kBAAA,CAAqB,wBAAA,CAE9B,IAAA,CAAA,UAAA,CAAsB,CAAA,CAAA,CAEtB,IAAA,CAAA,OAAA,CAAiD,IAAA,CAEjD,IAAA,CAAA,SAAA,CAAsB,CAAC,CAAA,CAGrB,IAAA,CAAK,UAAA,kCAAaA,CAAAA,2BAAM,YAAA,SAAc,CAAA,GAAA,CACtC,IAAA,CAAK,SAAA,kCAAYA,CAAAA,6BAAM,WAAA,SAAa,CAAC,GACvC,CAUA,MAAM,IAAA,CAAA,CAAsB,CAC1B,MAAM,IAAI,OAAA,CAAQ,CAACC,CAAAA,CAASC,CAAAA,CAAAA,EAAW,iBAChC,IAAA,qBAAK,OAAA,6BAAS,KAAA,EAYnBC,gCAAAA,IAAK,CAAK,OAAA,CAAQ,GAAA,CAAMC,CAAAA,EAAQ,CAC1BA,CAAAA,CACFF,CAAAA,CAAOE,CAAG,CAAA,CAEVH,CAAAA,CAAQ,CAAA,CAAI,CAEhB,CAAC,CACH,CAAC,CACH,CAUA,MAAM,GAAA,CAAA,CAAqB,CACR,MAAM,IAAA,CAAK,kBAAA,CAAmB,CAAA,EAAA,CAI/C,IAAA,CAAK,KAAA,CAAM,CAAA,CACX,MAAM,IAAA,CAAK,oBAAA,CAAqB,CAAA,CAClC,CAWA,KAAA,CAAA,CAAc,CAEZ,IAAMI,CAAAA,CAAU,CACd,OAAA,CACA,MAAA,CACA,cAAA,CACA,iBAAA,CACA,cAAA,CACA,oBAAA,CACA,GAAG,IAAA,CAAK,SACV,CAAA,CAEMC,CAAAA,CAAkBC,0BAAAA,CAAS,CAC3BC,CAAAA,CAAc,CAClB,GAAA,CAAK,CAAE,GAAG,OAAA,CAAQ,GAAA,CAAK,sBAAA,CAAwB,GAAI,CAAA,CACnD,GAAIF,CAAAA,GAAoB,OAAA,EAAW,CAAE,KAAA,CAAO,CAAA,CAAK,CACnD,CAAA,CAEA,IAAA,CAAK,OAAA,CAAUG,kCAAAA,KAAM,CAAYJ,CAAAA,CAASG,CAAW,CAAA,iBAErD,IAAA,qBAAK,OAAA,qBAAQ,MAAA,6BAAQ,EAAA,mBAAG,MAAA,CAASE,CAAAA,EAAc,CAC7C,IAAMC,CAAAA,CAAMD,CAAAA,CAAK,QAAA,CAAS,CAAA,CAEtB,IAAA,CAAK,UAAA,EACP,OAAA,CAAQ,GAAA,CAAIC,CAAG,CAEnB,CAAC,GACH,CAUA,MAAM,oBAAA,CAAA,CAAyC,CAC7C,IAAIC,CAAAA,CAAc,MAAM,IAAA,CAAK,kBAAA,CAAmB,CAAA,CAC1CC,CAAAA,CAAQ,IAAA,CAAK,GAAA,CAAI,CAAA,CAAI,GAAA,CACvBC,CAAAA,CAAOD,CAAAA,CAEX,GAAA,CAAA,CAAO,CAACD,CAAAA,EAAeC,CAAAA,CAAQ,IAAA,CAAK,qBAAA,CAAwBC,CAAAA,CAAAA,CAC1D,MAAMC,iCAAAA,GAAU,CAAA,CAEhBH,CAAAA,CAAc,MAAM,IAAA,CAAK,kBAAA,CAAmB,CAAA,CAC5CE,CAAAA,CAAO,IAAA,CAAK,GAAA,CAAI,CAAA,CAAI,GAAA,CAKtB,EAAA,CAAI,CAACF,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,yBAAyB,CAAA,CAG3C,MAAO,CAAA,CACT,CASA,MAAM,kBAAA,CAAA,CAAuC,CAC3C,GAAI,CAGF,MAAA,CADa,MAAM,KAAA,CAAM,IAAA,CAAK,kBAAkB,CAAA,CAAA,CACvC,MAAA,GAAW,GAItB,CAAA,UAAQ,CACN,MAAO,CAAA,CACT,CACF,CACF,CAAA,CCtKA,IAaaI,CAAAA,CAAN,KAAW,CAehB,MAAM,IAAA,CAAKhB,CAAAA,CAKqB,CAC9B,GAAM,CAAE,OAAA,CAAAiB,CAAAA,CAAS,OAAA,CAAAC,CAAAA,CAAS,cAAA,CAAAC,CAAAA,CAAgB,UAAA,CAAAC,CAAW,CAAA,CAAIpB,CAAAA,CACnDK,CAAAA,CAAU,CAAC,OAAA,CAAS,MAAA,CAAQ,CAAA,UAAA,mBAAaY,CAAAA,SAAW,SAAO,CAAA,CAAA","file":"/Users/greg/git/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 localnet environment.\n * This class provides methods to start, stop, and check the status of the localnet process.\n * It manages the lifecycle of the node process and ensures that it is operational before executing tests.\n * @group Implementation\n * @category CLI\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 extraArgs: string[] = [];\n\n constructor(args?: { showStdout?: boolean; extraArgs?: string[] }) {\n this.showStdout = args?.showStdout ?? true;\n this.extraArgs = args?.extraArgs ?? [];\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 localnet 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 * @group Implementation\n * @category CLI\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 localnet 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 localnet.\n * @group Implementation\n * @category CLI\n */\n start(): void {\n const cliCommand = \"npx\";\n const cliArgs = [\n \"aptos\",\n \"node\",\n \"run-localnet\",\n \"--force-restart\",\n \"--assume-yes\",\n \"--with-indexer-api\",\n ...this.extraArgs,\n ];\n\n const currentPlatform = platform();\n const spawnConfig = {\n env: { ...process.env, ENABLE_KEYLESS_DEFAULT: \"1\" },\n ...(currentPlatform === \"win32\" && { shell: true }),\n };\n\n this.process = spawn(cliCommand, cliArgs, spawnConfig);\n\n this.process.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 localnet 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 * @group Implementation\n * @category CLI\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 await sleep(1000);\n\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 localnet is up by querying the readiness endpoint.\n *\n * @returns Promise<boolean> - A promise that resolves to true if the localnet is up, otherwise false.\n * @group Implementation\n * @category CLI\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 {\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\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 * @group Implementation\n * @category CLI\n */\n\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 {\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 * @group Implementation\n * @category CLI\n */\n\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 * @group Implementation\n * @category CLI\n */\n\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 * @group Implementation\n * @category CLI\n */\n\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,5 +1,5 @@
1
- import { A as AccountAddress, a as AccountPublicKey, b as AuthenticationKey, V as VerifySignatureArgs, c as VerifySignatureAsyncArgs, S as Serializer, d as Signature, H as HexInput, D as Deserializer, P as PublicKey, E as EphemeralPublicKeyVariant, e as AptosConfig, f as Serializable, g as EphemeralCertificateVariant, Z as ZkpVariant, L as LedgerVersionArg, h as AccountAddressInput, i as PrivateKey, j as Hex, k as Ed25519PublicKey, l as AnyPublicKey, M as MultiKey, m as MultiEd25519PublicKey, n as Ed25519Signature, o as MultiEd25519Signature, p as AccountAuthenticator, q as MoveString, r as MoveVector, U as U8, s as U64, t as AnyNumber, R as RawTransaction, u as SimpleEntryFunctionArgumentTypes, v as EntryFunctionArgumentTypes, B as Bool, F as FixedBytes, w as U16, x as U32, y as U128, z as U256, I as I8, C as I16, G as I32, J as I64, K as I128, N as I256, O as InputGenerateTransactionPayloadDataWithRemoteABI, Q as InputGenerateTransactionPayloadData, T as InputScriptData, W as MoveFunction, X as TransactionPayloadScript, Y as InputEntryFunctionDataWithRemoteABI, _ as TransactionPayloadEntryFunction, $ as InputMultiSigDataWithRemoteABI, a0 as TransactionPayloadMultiSig, a1 as InputEntryFunctionDataWithABI, a2 as InputMultiSigDataWithABI, a3 as InputViewFunctionDataWithRemoteABI, a4 as EntryFunction, a5 as InputViewFunctionDataWithABI, a6 as AnyTransactionPayloadInstance, a7 as InputGenerateTransactionOptions, a8 as TransactionInnerPayload, a9 as InputGenerateSingleSignerRawTransactionArgs, aa as SimpleTransaction, ab as InputGenerateMultiAgentRawTransactionArgs, ac as MultiAgentTransaction, ad as InputSimulateTransactionData, ae as AccountAuthenticatorNoAccountAuthenticator, af as AccountAuthenticatorEd25519, ag as AccountAuthenticatorSingleKey, ah as AccountAuthenticatorMultiKey, ai as InputSubmitTransactionData, aj as TypeArgument, ak as TypeTag, al as MoveModule, am as FunctionABI, an as EntryFunctionABI, ao as ViewFunctionABI, ap as AnyRawTransaction, aq as AnyRawTransactionInstance, ar as AccountData, as as MoveModuleBytecode, at as CursorPaginationArgs, au as PaginationArgs, av as TransactionResponse, aw as MoveResource, ax as MoveStructId, ay as TokenStandardArg, az as OrderByArg, aA as GetAccountOwnedTokensQueryResponse, aB as GetAccountOwnedTokensFromCollectionResponse, aC as GetAccountCollectionsWithOwnedTokenResponse, aD as GetAccountCoinsDataResponse, aE as WhereArg, aF as GetObjectDataQueryResponse, aG as PrivateKeyInput, aH as GetCollectionDataResponse, aI as GetTokenDataResponse, aJ as GetCurrentTokenOwnershipResponse, aK as GetOwnedTokensResponse, aL as GetTokenActivityResponse, aM as WaitForTransactionOptions, aN as UserTransactionResponse, aO as GetFungibleAssetMetadataResponse, aP as GetFungibleAssetActivitiesResponse, aQ as GetCurrentFungibleAssetBalancesResponse, aR as LedgerInfo, aS as Block, aT as MoveValue, aU as InputViewFunctionData, aV as InputViewFunctionJsonData, aW as GetChainTopUserTransactionsResponse, aX as GraphqlQuery, aY as ProcessorType, aZ as GetProcessorStatusResponse, a_ as InputEntryFunctionData, a$ as GetNumberOfDelegatorsResponse, b0 as GetDelegatedStakingActivitiesResponse, b1 as InputSimulateTransactionOptions, b2 as InputTransactionPluginData, b3 as PendingTransactionResponse, b4 as CommittedTransactionResponse, b5 as GasEstimation, b6 as Ed25519PrivateKey, b7 as TableItemRequest, b8 as GetTableItemsDataResponse, b9 as GetTableItemsMetadataResponse, ba as SigningScheme, bb as SigningSchemeInput, bc as AnySignature, bd as GetANSNameResponse, be as EntryFunctionArgument, bf as MultiKeySignature, bg as AccountAuthenticatorMultiEd25519, bh as AccountAuthenticatorAbstraction, bi as MoveFunctionId, bj as ClientRequest, bk as Client, bl as ClientResponse, bm as AptosRequest, bn as AptosApiType, bo as AptosResponse, bp as MimeType, bq as ClientConfig } from './account-Dpz_N9h-.js';
2
- export { eD as ACCOUNT_ABSTRACTION_SIGNING_DATA_SALT, ez as APTOS_COIN, eA as APTOS_FA, bB as AbstractMultiKey, bH as AccountAbstractionMessage, cL as AccountAuthenticatorVariant, dR as AccountSignature, bx as AddressInvalidReason, cN as AnyPublicKeyVariant, cP as AnySignatureVariant, d1 as AptosSettings, ej as AuthenticationKeyScheme, dm as BlockEndInfo, dn as BlockEpilogueTransactionResponse, dj as BlockMetadataTransactionResponse, bI as ChainId, d6 as ClientHeadersType, ew as DEFAULT_MAX_GAS_AMOUNT, ex as DEFAULT_TXN_EXP_SEC_FROM_NOW, ey as DEFAULT_TXN_TIMEOUT_SEC, dw as DecodedTableData, dx as DeletedTableData, ek as DeriveScheme, br as Deserializable, dU as DirectWriteSet, dz as EntryFunctionPayloadResponse, cQ as EphemeralSignatureVariant, dW as Event, dV as EventGuid, eE as FIREBASE_AUTH_ISS_PATTERN, d4 as FaucetConfig, bN as FeePayerRawTransaction, d2 as FullNodeConfig, en as GenerateAccount, el as GenerateAccountWithEd25519, em as GenerateAccountWithSingleSignerSecp256k1Key, dC as GenesisPayload, di as GenesisTransactionResponse, cy as GetAccountAddressesForAuthKeyResponse, cz as GetEventsResponse, bF as HexInvalidReason, bJ as Identifier, d3 as IndexerConfig, cw as InputGenerateMultiAgentRawTransactionData, cq as InputGenerateOrderlessTransactionOptions, cu as InputGenerateRawTransactionArgs, cp as InputGenerateSequenceNumberTransactionOptions, cv as InputGenerateSingleSignerRawTransactionData, cx as InputGenerateTransactionData, cr as InputGenerateTransactionPayloadDataWithABI, cs as InputMultiSigData, c$ as Int128, cY as Int16, d0 as Int256, cZ as Int32, c_ as Int64, cX as Int8, bK as ModuleId, ee as MoveAbility, e7 as MoveAddressType, ef as MoveFunctionGenericTypeParam, ed as MoveFunctionVisibility, e5 as MoveInt128Type, e2 as MoveInt16Type, e6 as MoveInt256Type, e3 as MoveInt32Type, e4 as MoveInt64Type, e1 as MoveInt8Type, ec as MoveModuleId, e8 as MoveObjectType, bw as MoveOption, e9 as MoveOptionType, dD as MoveScriptBytecode, eh as MoveStruct, eg as MoveStructField, ea as MoveStructType, eb as MoveType, d$ as MoveUint128Type, dY as MoveUint16Type, e0 as MoveUint256Type, dZ as MoveUint32Type, d_ as MoveUint64Type, dX as MoveUint8Type, bM as MultiAgentRawTransaction, bT as MultiSig, bU as MultiSigTransactionPayload, dB as MultisigPayloadResponse, et as Network, eu as NetworkToChainId, eq as NetworkToFaucetAPI, eo as NetworkToIndexerAPI, ev as NetworkToNetworkName, ep as NetworkToNodeAPI, er as NetworkToPepperAPI, es as NetworkToProverAPI, cA as OrderBy, cB as OrderByValue, by as ParsingError, bz as ParsingResult, d7 as PluginConfig, d8 as PluginSettings, cM as PrivateKeyVariants, eB as RAW_TRANSACTION_SALT, eC as RAW_TRANSACTION_WITH_DATA_SALT, bL as RawTransactionWithData, ei as RoleType, bS as Script, bP as ScriptFunctionArgument, co as ScriptFunctionArgumentTypes, dA as ScriptPayloadResponse, cE as ScriptTransactionArgumentVariants, dT as ScriptWriteSet, bD as Secp256k1PrivateKey, bC as Secp256k1PublicKey, bE as Secp256k1Signature, bv as Serialized, dk as StateCheckpointTransactionResponse, cj as StructTag, cC as TokenStandard, bO as TransactionArgument, cK as TransactionAuthenticatorVariant, dL as TransactionEd25519Signature, bW as TransactionExecutable, bZ as TransactionExecutableEmpty, bY as TransactionExecutableEntryFunction, bX as TransactionExecutableScript, cH as TransactionExecutableVariants, b_ as TransactionExtraConfig, b$ as TransactionExtraConfigV1, cI as TransactionExtraConfigVariants, dQ as TransactionFeePayerSignature, d5 as TransactionGenerationConfig, bV as TransactionInnerPayloadV1, cG as TransactionInnerPayloadVariants, dP as TransactionMultiAgentSignature, dO as TransactionMultiEd25519Signature, bR as TransactionPayload, dy as TransactionPayloadResponse, cF as TransactionPayloadVariants, da as TransactionResponseType, dM as TransactionSecp256k1Signature, dE as TransactionSignature, dN as TransactionSingleSenderSignature, d9 as TransactionSubmitter, cJ as TransactionVariants, cd as TypeTagAddress, c0 as TypeTagBool, cg as TypeTagGeneric, ca as TypeTagI128, c4 as TypeTagI16, cc as TypeTagI256, c6 as TypeTagI32, c8 as TypeTagI64, c2 as TypeTagI8, cf as TypeTagReference, ce as TypeTagSigner, ci as TypeTagStruct, c9 as TypeTagU128, c3 as TypeTagU16, cb as TypeTagU256, c5 as TypeTagU32, c7 as TypeTagU64, c1 as TypeTagU8, cD as TypeTagVariants, ch as TypeTagVector, cV as Uint128, cS as Uint16, cW as Uint256, cT as Uint32, cU as Uint64, cR as Uint8, dl as ValidatorTransactionResponse, ct as ViewFunctionJsonPayload, dS as WriteSet, dp as WriteSetChange, dq as WriteSetChangeDeleteModule, dr as WriteSetChangeDeleteResource, ds as WriteSetChangeDeleteTableItem, dt as WriteSetChangeWriteModule, du as WriteSetChangeWriteResource, dv as WriteSetChangeWriteTableItem, cO as anyPublicKeyVariantToString, ck as aptosCoinStructTag, bQ as deserializeFromScriptArgument, bs as ensureBoolean, bG as hexToAsciiString, dh as isBlockEpilogueTransactionResponse, de as isBlockMetadataTransactionResponse, bA as isCanonicalEd25519Signature, dF as isEd25519Signature, dI as isFeePayerSignature, dd as isGenesisTransactionResponse, dH as isMultiAgentSignature, dJ as isMultiEd25519Signature, db as isPendingTransactionResponse, dG as isSecp256k1Signature, dK as isSingleSenderSignature, df as isStateCheckpointTransactionResponse, dc as isUserTransactionResponse, dg as isValidatorTransactionResponse, cn as objectStructTag, cm as optionStructTag, bt as outOfRangeErrorMessage, cl as stringStructTag, bu as validateNumberInRange } from './account-Dpz_N9h-.js';
1
+ import { A as AccountAddress, a as AccountPublicKey, b as AuthenticationKey, V as VerifySignatureArgs, c as VerifySignatureAsyncArgs, S as Serializer, d as Signature, H as HexInput, D as Deserializer, P as PublicKey, E as EphemeralPublicKeyVariant, e as AptosConfig, f as Serializable, g as EphemeralCertificateVariant, Z as ZkpVariant, L as LedgerVersionArg, h as AccountAddressInput, i as PrivateKey, j as Hex, k as Ed25519PublicKey, l as AnyPublicKey, M as MultiKey, m as MultiEd25519PublicKey, n as Ed25519Signature, o as MultiEd25519Signature, p as AccountAuthenticator, q as MoveString, r as MoveVector, U as U8, s as U64, t as AnyNumber, R as RawTransaction, u as SimpleEntryFunctionArgumentTypes, v as MoveFunction, w as EntryFunctionArgumentTypes, B as Bool, F as FixedBytes, I as I128, x as I16, y as I256, z as I32, C as I64, G as I8, J as U128, K as U16, N as U256, O as U32, Q as InputGenerateTransactionPayloadDataWithRemoteABI, T as InputGenerateTransactionPayloadData, W as InputScriptData, X as InputGenerateSingleSignerRawTransactionArgs, Y as SimpleTransaction, _ as InputGenerateMultiAgentRawTransactionArgs, $ as MultiAgentTransaction, a0 as AnyTransactionPayloadInstance, a1 as TransactionInnerPayload, a2 as InputGenerateTransactionOptions, a3 as InputSubmitTransactionData, a4 as InputSimulateTransactionData, a5 as TransactionPayloadScript, a6 as InputEntryFunctionDataWithRemoteABI, a7 as TransactionPayloadEntryFunction, a8 as InputMultiSigDataWithRemoteABI, a9 as TransactionPayloadMultiSig, aa as InputEntryFunctionDataWithABI, ab as InputMultiSigDataWithABI, ac as InputViewFunctionDataWithRemoteABI, ad as EntryFunction, ae as InputViewFunctionDataWithABI, af as AccountAuthenticatorNoAccountAuthenticator, ag as AccountAuthenticatorEd25519, ah as AccountAuthenticatorSingleKey, ai as AccountAuthenticatorMultiKey, aj as TypeTag, ak as MoveModule, al as FunctionABI, am as EntryFunctionABI, an as ViewFunctionABI, ao as TypeArgument, ap as AnyRawTransaction, aq as AnyRawTransactionInstance, ar as AccountData, as as MoveModuleBytecode, at as CursorPaginationArgs, au as PaginationArgs, av as TransactionResponse, aw as MoveResource, ax as MoveStructId, ay as TokenStandardArg, az as OrderByArg, aA as GetAccountOwnedTokensQueryResponse, aB as GetAccountOwnedTokensFromCollectionResponse, aC as GetAccountCollectionsWithOwnedTokenResponse, aD as GetAccountCoinsDataResponse, aE as WhereArg, aF as GetObjectDataQueryResponse, aG as PrivateKeyInput, aH as GetCollectionDataResponse, aI as GetTokenDataResponse, aJ as GetCurrentTokenOwnershipResponse, aK as GetOwnedTokensResponse, aL as GetTokenActivityResponse, aM as WaitForTransactionOptions, aN as UserTransactionResponse, aO as GetFungibleAssetMetadataResponse, aP as GetFungibleAssetActivitiesResponse, aQ as GetCurrentFungibleAssetBalancesResponse, aR as LedgerInfo, aS as Block, aT as MoveValue, aU as InputViewFunctionData, aV as InputViewFunctionJsonData, aW as GetChainTopUserTransactionsResponse, aX as GraphqlQuery, aY as ProcessorType, aZ as GetProcessorStatusResponse, a_ as InputEntryFunctionData, a$ as GetNumberOfDelegatorsResponse, b0 as GetDelegatedStakingActivitiesResponse, b1 as InputSimulateTransactionOptions, b2 as InputTransactionPluginData, b3 as PendingTransactionResponse, b4 as CommittedTransactionResponse, b5 as GasEstimation, b6 as Ed25519PrivateKey, b7 as TableItemRequest, b8 as GetTableItemsDataResponse, b9 as GetTableItemsMetadataResponse, ba as SigningScheme, bb as SigningSchemeInput, bc as AnySignature, bd as GetANSNameResponse, be as EntryFunctionArgument, bf as MultiKeySignature, bg as AccountAuthenticatorMultiEd25519, bh as AccountAuthenticatorAbstraction, bi as MoveFunctionId, bj as AptosRequest, bk as AptosApiType, bl as AptosResponse, bm as ClientRequest, bn as Client, bo as ClientResponse, bp as MimeType, bq as ClientConfig } from './account-CSOaJ0SC.js';
2
+ export { br as ACCOUNT_ABSTRACTION_SIGNING_DATA_SALT, bs as APTOS_COIN, bt as APTOS_FA, bu as AbstractMultiKey, bv as AccountAbstractionMessage, bw as AccountAuthenticatorVariant, bx as AccountSignature, by as AddressInvalidReason, bz as AnyPublicKeyVariant, bA as AnySignatureVariant, bB as AptosSettings, bC as AuthenticationKeyScheme, bD as BlockEndInfo, bE as BlockEpilogueTransactionResponse, bF as BlockMetadataTransactionResponse, bG as ChainId, bH as ClientHeadersType, bI as DEFAULT_MAX_GAS_AMOUNT, bJ as DEFAULT_TXN_EXP_SEC_FROM_NOW, bK as DEFAULT_TXN_TIMEOUT_SEC, bL as DecodedTableData, bM as DeletedTableData, bN as DeriveScheme, bO as Deserializable, bP as DirectWriteSet, bQ as EntryFunctionPayloadResponse, bR as EphemeralSignatureVariant, bS as Event, bT as EventGuid, bU as FIREBASE_AUTH_ISS_PATTERN, bV as FaucetConfig, bW as FeePayerRawTransaction, bX as FullNodeConfig, bY as GenerateAccount, bZ as GenerateAccountWithEd25519, b_ as GenerateAccountWithSingleSignerSecp256k1Key, b$ as GenesisPayload, c0 as GenesisTransactionResponse, c1 as GetAccountAddressesForAuthKeyResponse, c2 as GetEventsResponse, c3 as HexInvalidReason, c4 as Identifier, c5 as IndexerConfig, c6 as InputGenerateMultiAgentRawTransactionData, c7 as InputGenerateOrderlessTransactionOptions, c8 as InputGenerateRawTransactionArgs, c9 as InputGenerateSequenceNumberTransactionOptions, ca as InputGenerateSingleSignerRawTransactionData, cb as InputGenerateTransactionData, cc as InputGenerateTransactionPayloadDataWithABI, cd as InputMultiSigData, ce as Int128, cf as Int16, cg as Int256, ch as Int32, ci as Int64, cj as Int8, ck as MIN_MAX_GAS_AMOUNT, cl as ModuleId, cm as MoveAbility, cn as MoveAddressType, co as MoveFunctionGenericTypeParam, cp as MoveFunctionVisibility, cq as MoveInt128Type, cr as MoveInt16Type, cs as MoveInt256Type, ct as MoveInt32Type, cu as MoveInt64Type, cv as MoveInt8Type, cw as MoveModuleId, cx as MoveObjectType, cy as MoveOption, cz as MoveOptionType, cA as MoveScriptBytecode, cB as MoveStruct, cC as MoveStructField, cD as MoveStructType, cE as MoveType, cF as MoveUint128Type, cG as MoveUint16Type, cH as MoveUint256Type, cI as MoveUint32Type, cJ as MoveUint64Type, cK as MoveUint8Type, cL as MultiAgentRawTransaction, cM as MultiSig, cN as MultiSigTransactionPayload, cO as MultisigPayloadResponse, cP as Network, cQ as NetworkToChainId, cR as NetworkToFaucetAPI, cS as NetworkToIndexerAPI, cT as NetworkToNetworkName, cU as NetworkToNodeAPI, cV as NetworkToPepperAPI, cW as NetworkToProverAPI, cX as OrderBy, cY as OrderByValue, cZ as ParsingError, c_ as ParsingResult, c$ as PluginConfig, d0 as PluginSettings, d1 as PrivateKeyVariants, d2 as RAW_TRANSACTION_SALT, d3 as RAW_TRANSACTION_WITH_DATA_SALT, d4 as RawTransactionWithData, d5 as RoleType, d6 as Script, d7 as ScriptFunctionArgument, d8 as ScriptFunctionArgumentTypes, d9 as ScriptPayloadResponse, da as ScriptTransactionArgumentVariants, db as ScriptWriteSet, dc as Secp256k1PrivateKey, dd as Secp256k1PublicKey, de as Secp256k1Signature, df as Serialized, dg as StateCheckpointTransactionResponse, dh as StructTag, di as TokenStandard, dj as TransactionArgument, dk as TransactionAuthenticatorVariant, dl as TransactionEd25519Signature, dm as TransactionExecutable, dn as TransactionExecutableEmpty, dp as TransactionExecutableEntryFunction, dq as TransactionExecutableScript, dr as TransactionExecutableVariants, ds as TransactionExtraConfig, dt as TransactionExtraConfigV1, du as TransactionExtraConfigVariants, dv as TransactionFeePayerSignature, dw as TransactionGenerationConfig, dx as TransactionInnerPayloadV1, dy as TransactionInnerPayloadVariants, dz as TransactionMultiAgentSignature, dA as TransactionMultiEd25519Signature, dB as TransactionPayload, dC as TransactionPayloadResponse, dD as TransactionPayloadVariants, dE as TransactionResponseType, dF as TransactionSecp256k1Signature, dG as TransactionSignature, dH as TransactionSingleSenderSignature, dI as TransactionSubmitter, dJ as TransactionVariants, dK as TypeTagAddress, dL as TypeTagBool, dM as TypeTagGeneric, dN as TypeTagI128, dO as TypeTagI16, dP as TypeTagI256, dQ as TypeTagI32, dR as TypeTagI64, dS as TypeTagI8, dT as TypeTagReference, dU as TypeTagSigner, dV as TypeTagStruct, dW as TypeTagU128, dX as TypeTagU16, dY as TypeTagU256, dZ as TypeTagU32, d_ as TypeTagU64, d$ as TypeTagU8, e0 as TypeTagVariants, e1 as TypeTagVector, e2 as Uint128, e3 as Uint16, e4 as Uint256, e5 as Uint32, e6 as Uint64, e7 as Uint8, e8 as ValidatorTransactionResponse, e9 as ViewFunctionJsonPayload, ea as WriteSet, eb as WriteSetChange, ec as WriteSetChangeDeleteModule, ed as WriteSetChangeDeleteResource, ee as WriteSetChangeDeleteTableItem, ef as WriteSetChangeWriteModule, eg as WriteSetChangeWriteResource, eh as WriteSetChangeWriteTableItem, ei as anyPublicKeyVariantToString, ej as aptosCoinStructTag, ek as deserializeFromScriptArgument, el as ensureBoolean, em as hexToAsciiString, en as isBlockEpilogueTransactionResponse, eo as isBlockMetadataTransactionResponse, ep as isCanonicalEd25519Signature, eq as isEd25519Signature, er as isFeePayerSignature, es as isGenesisTransactionResponse, et as isMultiAgentSignature, eu as isMultiEd25519Signature, ev as isPendingTransactionResponse, ew as isSecp256k1Signature, ex as isSingleSenderSignature, ey as isStateCheckpointTransactionResponse, ez as isUserTransactionResponse, eA as isValidatorTransactionResponse, eB as objectStructTag, eC as optionStructTag, eD as outOfRangeErrorMessage, eE as stringStructTag, eF as validateNumberInRange } from './account-CSOaJ0SC.js';
3
3
  import { ProjPointType } from '@noble/curves/abstract/weierstrass';
4
4
  import { Fp2 } from '@noble/curves/abstract/tower';
5
5
  import EventEmitter from 'eventemitter3';
@@ -1283,10 +1283,20 @@ declare function getIssAudAndUidVal(args: {
1283
1283
  aud: string;
1284
1284
  uidVal: string;
1285
1285
  };
1286
+ /**
1287
+ * Fetches JWKs from the blockchain with optional caching.
1288
+ *
1289
+ * @param args.aptosConfig - The Aptos configuration object.
1290
+ * @param args.jwkAddr - Optional. The address to fetch JWKs from (for federated keyless).
1291
+ * @param args.options - Optional. Ledger version options.
1292
+ * @param args.useCache - Optional. Whether to use cached JWKs. Defaults to true.
1293
+ * @returns A map of issuer to JWK arrays.
1294
+ */
1286
1295
  declare function getKeylessJWKs(args: {
1287
1296
  aptosConfig: AptosConfig;
1288
1297
  jwkAddr?: AccountAddressInput;
1289
1298
  options?: LedgerVersionArg;
1299
+ useCache?: boolean;
1290
1300
  }): Promise<Map<string, MoveJWK[]>>;
1291
1301
  declare class MoveJWK extends Serializable {
1292
1302
  kid: string;
@@ -1313,6 +1323,7 @@ interface JwtHeader {
1313
1323
  * Safely parses the JWT header.
1314
1324
  * @param jwtHeader The JWT header string
1315
1325
  * @returns Parsed JWT header as an object.
1326
+ * @throws KeylessError if the header is invalid or missing required fields
1316
1327
  */
1317
1328
  declare function parseJwtHeader(jwtHeader: string): JwtHeader;
1318
1329
 
@@ -2499,6 +2510,7 @@ declare function generateUserTransactionHash(args: InputSubmitTransactionData):
2499
2510
  declare function standardizeTypeTags(typeArguments?: Array<TypeArgument>): Array<TypeTag>;
2500
2511
  /**
2501
2512
  * Fetches the ABI of a specified module from the on-chain module ABI.
2513
+ * Results are cached for 5 minutes to reduce redundant network calls.
2502
2514
  *
2503
2515
  * @param moduleAddress - The address of the module from which to fetch the ABI.
2504
2516
  * @param moduleName - The name of the module containing the ABI.
@@ -7024,17 +7036,25 @@ declare class TransactionWorker extends EventEmitter<TransactionWorkerEvents> {
7024
7036
  */
7025
7037
  outstandingTransactions: AsyncQueue<[Promise<PendingTransactionResponse>, bigint]>;
7026
7038
  /**
7027
- * transactions that have been submitted to chain
7039
+ * transactions that have been submitted to chain.
7040
+ * Limited to MAX_TRANSACTION_HISTORY_SIZE entries to prevent unbounded memory growth.
7028
7041
  * @group Implementation
7029
7042
  * @category Transactions
7030
7043
  */
7031
7044
  sentTransactions: Array<[string, bigint, any]>;
7032
7045
  /**
7033
- * transactions that have been committed to chain
7046
+ * transactions that have been committed to chain.
7047
+ * Limited to MAX_TRANSACTION_HISTORY_SIZE entries to prevent unbounded memory growth.
7034
7048
  * @group Implementation
7035
7049
  * @category Transactions
7036
7050
  */
7037
7051
  executedTransactions: Array<[string, bigint, any]>;
7052
+ /**
7053
+ * Adds a transaction to the history array while enforcing the maximum size limit.
7054
+ * Removes the oldest entries when the limit is exceeded.
7055
+ * @private
7056
+ */
7057
+ private addToTransactionHistory;
7038
7058
  /**
7039
7059
  * Initializes a new instance of the class, providing a framework for receiving payloads to be processed.
7040
7060
  *
@@ -8149,6 +8169,11 @@ declare class EphemeralKeyPair extends Serializable {
8149
8169
  * @category Account (On-Chain Model)
8150
8170
  */
8151
8171
  private publicKey;
8172
+ /**
8173
+ * Whether the ephemeral key pair has been cleared from memory.
8174
+ * @private
8175
+ */
8176
+ private cleared;
8152
8177
  /**
8153
8178
  * Creates an instance of the class with a specified private key, optional expiry date, and optional blinder.
8154
8179
  * This constructor initializes the public key, sets the expiry date to a default value if not provided,
@@ -8180,6 +8205,25 @@ declare class EphemeralKeyPair extends Serializable {
8180
8205
  * @category Account (On-Chain Model)
8181
8206
  */
8182
8207
  isExpired(): boolean;
8208
+ /**
8209
+ * Clears the ephemeral private key from memory by overwriting it with random bytes.
8210
+ * After calling this method, the ephemeral key pair can no longer be used for signing.
8211
+ *
8212
+ * Note: Due to JavaScript's memory management, this cannot guarantee complete removal of
8213
+ * sensitive data from memory, but it significantly reduces the window of exposure.
8214
+ *
8215
+ * @group Implementation
8216
+ * @category Account (On-Chain Model)
8217
+ */
8218
+ clear(): void;
8219
+ /**
8220
+ * Returns whether the ephemeral key pair has been cleared from memory.
8221
+ *
8222
+ * @returns true if the key pair has been cleared, false otherwise
8223
+ * @group Implementation
8224
+ * @category Account (On-Chain Model)
8225
+ */
8226
+ isCleared(): boolean;
8183
8227
  /**
8184
8228
  * Serializes the object's properties into a format suitable for transmission or storage.
8185
8229
  * This function is essential for preparing the object data for serialization processes.
@@ -8228,7 +8272,7 @@ declare class EphemeralKeyPair extends Serializable {
8228
8272
  *
8229
8273
  * @param data - The data to be signed, provided in HexInput format.
8230
8274
  * @returns EphemeralSignature - The resulting ephemeral signature.
8231
- * @throws Error - Throws an error if the EphemeralKeyPair has expired.
8275
+ * @throws Error - Throws an error if the EphemeralKeyPair has expired or been cleared from memory.
8232
8276
  * @group Implementation
8233
8277
  * @category Account (On-Chain Model)
8234
8278
  */
@@ -10255,6 +10299,25 @@ type DeserializableClass<T extends Serializable> = {
10255
10299
  */
10256
10300
  declare function normalizeBundle<T extends Serializable>(cls: DeserializableClass<T>, value: T): T;
10257
10301
 
10302
+ /**
10303
+ * Checks if the current runtime environment is Bun.
10304
+ * This is useful for detecting Bun-specific compatibility issues.
10305
+ *
10306
+ * @returns true if running in Bun, false otherwise.
10307
+ * @group Implementation
10308
+ * @category Utils
10309
+ */
10310
+ declare function isBun(): boolean;
10311
+ /**
10312
+ * Logs a warning message to the console only in development environments.
10313
+ * This function helps reduce information leakage in production while maintaining
10314
+ * helpful warnings during development.
10315
+ *
10316
+ * @param message - The warning message to log.
10317
+ * @group Implementation
10318
+ * @category Utils
10319
+ */
10320
+ declare function warnIfDevelopment(message: string): void;
10258
10321
  /**
10259
10322
  * Sleep for the specified amount of time in milliseconds.
10260
10323
  * This function can be used to introduce delays in asynchronous operations.
@@ -10844,4 +10907,4 @@ declare class AptosApiError extends Error {
10844
10907
  constructor({ apiType, aptosRequest, aptosResponse }: AptosApiErrorOpts);
10845
10908
  }
10846
10909
 
10847
- export { APTOS_BIP44_REGEX, APTOS_HARDENED_REGEX, AbstractKeylessAccount, AbstractPublicKey, AbstractSignature, AbstractedAccount, Account, AccountAddress, AccountAddressInput, AccountAuthenticator, AccountAuthenticatorAbstraction, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorNoAccountAuthenticator, AccountAuthenticatorSingleKey, AccountData, AccountPublicKey, AccountSequenceNumber, AccountUtils, type AnsName, type AnsTokenStandard, AnyNumber, AnyPublicKey, AnyRawTransaction, AnyRawTransactionInstance, AnySignature, AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, AptosRequest, AptosResponse, AuthenticationKey, type BaseAccountPublicKey, Block, Bool, CKDPriv, Client, ClientConfig, ClientRequest, ClientResponse, CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, CursorPaginationArgs, DerivableAbstractedAccount, type DerivedKeys, type DeserializableClass, Deserializer, EPK_HORIZON_SECS, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, EntryFunctionABI, EntryFunctionArgument, EntryFunctionArgumentTypes, EntryFunctionBytes, EphemeralCertificate, EphemeralCertificateVariant, EphemeralKeyPair, EphemeralPublicKey, EphemeralPublicKeyVariant, EphemeralSignature, type ExecutionFinishEventData, ExpirationStatus, type FailureEventData, FederatedKeylessAccount, FederatedKeylessPublicKey, FixedBytes, FunctionABI, GasEstimation, type GenerateAccountArgs, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, type GetRequestOptions, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, Groth16ProofAndStatement, Groth16VerificationKey, Groth16Zkp, HARDENED_OFFSET, Hex, HexInput, I128, I16, I256, I32, I64, I8, InputEntryFunctionData, InputEntryFunctionDataWithABI, InputEntryFunctionDataWithRemoteABI, InputGenerateMultiAgentRawTransactionArgs, InputGenerateSingleSignerRawTransactionArgs, InputGenerateTransactionOptions, InputGenerateTransactionPayloadData, InputGenerateTransactionPayloadDataWithRemoteABI, InputMultiSigDataWithABI, InputMultiSigDataWithRemoteABI, InputScriptData, InputSimulateTransactionData, InputSimulateTransactionOptions, InputSubmitTransactionData, InputTransactionPluginData, InputViewFunctionData, InputViewFunctionDataWithABI, InputViewFunctionDataWithRemoteABI, 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, MoveFunction, MoveFunctionId, MoveJWK, MoveModule, MoveModuleBytecode, MoveResource, MoveString, MoveStructId, MoveValue, MoveVector, MultiAgentTransaction, MultiEd25519Account, MultiEd25519PublicKey, MultiEd25519Signature, type MultiEd25519SignerConstructorArgs, MultiKey, MultiKeyAccount, MultiKeySignature, OrderByArg, PaginationArgs, PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, PrivateKey, type PrivateKeyFromDerivationPathArgs, PrivateKeyInput, ProcessorType, type ProofFetchCallback, type ProofFetchEvents, type ProofFetchFailure, type ProofFetchStatus, type ProofFetchSuccess, PublicKey, type RawANSName, RawTransaction, RotationProofChallenge, Secp256r1PrivateKey, Secp256r1PublicKey, Secp256r1Signature, Serializable, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySigner, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, type SingleKeySignerOrLegacyEd25519Account, SubdomainExpirationPolicy, type SuccessEventData, TableItemRequest, TokenStandardArg, TransactionAndProof, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionInnerPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, TransactionPayloadScript, TransactionResponse, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, TypeArgument, TypeTag, TypeTagParserError, TypeTagParserErrorType, U128, U16, U256, U32, U64, U8, UserTransactionResponse, type VerifyEd25519SignatureArgs, type VerifyMultiEd25519SignatureArgs, type VerifyMultiKeySignatureArgs, VerifySignatureArgs, VerifySignatureAsyncArgs, type VerifySingleKeySignatureArgs, ViewFunctionABI, WaitForTransactionOptions, WebAuthnSignature, WhereArg, ZeroKnowledgeSig, ZkProof, ZkpVariant, aptosRequest, base64UrlDecode, base64UrlToBytes, bigIntToBytesLE, buildTransaction, bytesToBigIntLE, checkOrConvertArgument, convertAmountFromHumanReadableToOnChain, convertAmountFromOnChainToHumanReadable, convertArgument, convertNumber, convertPayloadToInnerPayload, createObjectAddress, createResourceAddress, createTokenAddress, createUserDerivedObjectAddress, deriveKey, deriveTransactionType, deserializePublicKey, deserializeSignature, fetchEntryFunctionAbi, fetchFunctionAbi, fetchJWK, fetchModuleAbi, fetchMoveFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, floorToWholeHour, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getErrorMessage, getFunctionParts, getIssAudAndUidVal, getKeylessConfig, getKeylessJWKs, getPageWithObfuscatedCursor, hashStrToField, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsI128, isBcsI16, isBcsI256, isBcsI32, isBcsI64, isBcsI8, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBool, isEmptyOption, isEncodedEntryFunctionArgument, isEncodedStruct, isKeylessSigner, isLargeNumber, isNumber, isScriptDataInput, isSingleKeySigner, isString, isValidBIP44Path, isValidFunctionInfo, isValidHardenedPath, mnemonicToSeed, normalizeBundle, nowInSeconds, padAndPackBytesWithLen, paginateWithCursor, paginateWithObfuscatedCursor, pairedFaMetadataAddress, parseEncodedStruct, parseJwtHeader, parseTypeTag, poseidonHash, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, sleep, splitPath, standardizeTypeTags, throwTypeMismatch, truncateAddress, verifyKeylessSignature, verifyKeylessSignatureWithJwkAndConfig };
10910
+ export { APTOS_BIP44_REGEX, APTOS_HARDENED_REGEX, AbstractKeylessAccount, AbstractPublicKey, AbstractSignature, AbstractedAccount, Account, AccountAddress, AccountAddressInput, AccountAuthenticator, AccountAuthenticatorAbstraction, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorNoAccountAuthenticator, AccountAuthenticatorSingleKey, AccountData, AccountPublicKey, AccountSequenceNumber, AccountUtils, type AnsName, type AnsTokenStandard, AnyNumber, AnyPublicKey, AnyRawTransaction, AnyRawTransactionInstance, AnySignature, AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, AptosRequest, AptosResponse, AuthenticationKey, type BaseAccountPublicKey, Block, Bool, CKDPriv, Client, ClientConfig, ClientRequest, ClientResponse, CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, CursorPaginationArgs, DerivableAbstractedAccount, type DerivedKeys, type DeserializableClass, Deserializer, EPK_HORIZON_SECS, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, EntryFunctionABI, EntryFunctionArgument, EntryFunctionArgumentTypes, EntryFunctionBytes, EphemeralCertificate, EphemeralCertificateVariant, EphemeralKeyPair, EphemeralPublicKey, EphemeralPublicKeyVariant, EphemeralSignature, type ExecutionFinishEventData, ExpirationStatus, type FailureEventData, FederatedKeylessAccount, FederatedKeylessPublicKey, FixedBytes, FunctionABI, GasEstimation, type GenerateAccountArgs, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, type GetRequestOptions, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, Groth16ProofAndStatement, Groth16VerificationKey, Groth16Zkp, HARDENED_OFFSET, Hex, HexInput, I128, I16, I256, I32, I64, I8, InputEntryFunctionData, InputEntryFunctionDataWithABI, InputEntryFunctionDataWithRemoteABI, InputGenerateMultiAgentRawTransactionArgs, InputGenerateSingleSignerRawTransactionArgs, InputGenerateTransactionOptions, InputGenerateTransactionPayloadData, InputGenerateTransactionPayloadDataWithRemoteABI, InputMultiSigDataWithABI, InputMultiSigDataWithRemoteABI, InputScriptData, InputSimulateTransactionData, InputSimulateTransactionOptions, InputSubmitTransactionData, InputTransactionPluginData, InputViewFunctionData, InputViewFunctionDataWithABI, InputViewFunctionDataWithRemoteABI, 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, MoveFunction, MoveFunctionId, MoveJWK, MoveModule, MoveModuleBytecode, MoveResource, MoveString, MoveStructId, MoveValue, MoveVector, MultiAgentTransaction, MultiEd25519Account, MultiEd25519PublicKey, MultiEd25519Signature, type MultiEd25519SignerConstructorArgs, MultiKey, MultiKeyAccount, MultiKeySignature, OrderByArg, PaginationArgs, PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, PrivateKey, type PrivateKeyFromDerivationPathArgs, PrivateKeyInput, ProcessorType, type ProofFetchCallback, type ProofFetchEvents, type ProofFetchFailure, type ProofFetchStatus, type ProofFetchSuccess, PublicKey, type RawANSName, RawTransaction, RotationProofChallenge, Secp256r1PrivateKey, Secp256r1PublicKey, Secp256r1Signature, Serializable, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySigner, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, type SingleKeySignerOrLegacyEd25519Account, SubdomainExpirationPolicy, type SuccessEventData, TableItemRequest, TokenStandardArg, TransactionAndProof, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionInnerPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, TransactionPayloadScript, TransactionResponse, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, TypeArgument, TypeTag, TypeTagParserError, TypeTagParserErrorType, U128, U16, U256, U32, U64, U8, UserTransactionResponse, type VerifyEd25519SignatureArgs, type VerifyMultiEd25519SignatureArgs, type VerifyMultiKeySignatureArgs, VerifySignatureArgs, VerifySignatureAsyncArgs, type VerifySingleKeySignatureArgs, ViewFunctionABI, WaitForTransactionOptions, WebAuthnSignature, WhereArg, ZeroKnowledgeSig, ZkProof, ZkpVariant, aptosRequest, base64UrlDecode, base64UrlToBytes, bigIntToBytesLE, buildTransaction, bytesToBigIntLE, checkOrConvertArgument, convertAmountFromHumanReadableToOnChain, convertAmountFromOnChainToHumanReadable, convertArgument, convertNumber, convertPayloadToInnerPayload, createObjectAddress, createResourceAddress, createTokenAddress, createUserDerivedObjectAddress, deriveKey, deriveTransactionType, deserializePublicKey, deserializeSignature, fetchEntryFunctionAbi, fetchFunctionAbi, fetchJWK, fetchModuleAbi, fetchMoveFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, floorToWholeHour, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getErrorMessage, getFunctionParts, getIssAudAndUidVal, getKeylessConfig, getKeylessJWKs, getPageWithObfuscatedCursor, hashStrToField, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsI128, isBcsI16, isBcsI256, isBcsI32, isBcsI64, isBcsI8, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBool, isBun, isEmptyOption, isEncodedEntryFunctionArgument, isEncodedStruct, isKeylessSigner, isLargeNumber, isNumber, isScriptDataInput, isSingleKeySigner, isString, isValidBIP44Path, isValidFunctionInfo, isValidHardenedPath, mnemonicToSeed, normalizeBundle, nowInSeconds, padAndPackBytesWithLen, paginateWithCursor, paginateWithObfuscatedCursor, pairedFaMetadataAddress, parseEncodedStruct, parseJwtHeader, parseTypeTag, poseidonHash, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, sleep, splitPath, standardizeTypeTags, throwTypeMismatch, truncateAddress, verifyKeylessSignature, verifyKeylessSignatureWithJwkAndConfig, warnIfDevelopment };