@aptos-labs/ts-sdk 1.22.1 → 1.23.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 (314) hide show
  1. package/dist/common/{accountAddress-NYtf3uZq.d.ts → accountAddress-D9blTwwp.d.ts} +57 -15
  2. package/dist/common/cli/index.d.ts +22 -8
  3. package/dist/common/cli/index.js +1 -1
  4. package/dist/common/cli/index.js.map +1 -1
  5. package/dist/common/index.d.ts +58 -9
  6. package/dist/common/index.js +28 -26
  7. package/dist/common/index.js.map +1 -1
  8. package/dist/esm/account/Account.mjs +1 -1
  9. package/dist/esm/account/Ed25519Account.mjs +1 -1
  10. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  11. package/dist/esm/account/KeylessAccount.d.mts +13 -2
  12. package/dist/esm/account/KeylessAccount.mjs +1 -1
  13. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  14. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  15. package/dist/esm/account/index.mjs +1 -1
  16. package/dist/esm/api/account.d.mts +4 -1
  17. package/dist/esm/api/account.mjs +1 -1
  18. package/dist/esm/api/ans.mjs +1 -1
  19. package/dist/esm/api/aptos.mjs +1 -1
  20. package/dist/esm/api/aptosConfig.mjs +1 -1
  21. package/dist/esm/api/coin.mjs +1 -1
  22. package/dist/esm/api/digitalAsset.mjs +1 -1
  23. package/dist/esm/api/event.mjs +1 -1
  24. package/dist/esm/api/faucet.mjs +1 -1
  25. package/dist/esm/api/fungibleAsset.mjs +1 -1
  26. package/dist/esm/api/general.mjs +1 -1
  27. package/dist/esm/api/index.mjs +1 -1
  28. package/dist/esm/api/keyless.mjs +1 -1
  29. package/dist/esm/api/object.mjs +1 -1
  30. package/dist/esm/api/staking.mjs +1 -1
  31. package/dist/esm/api/table.mjs +1 -1
  32. package/dist/esm/api/transaction.mjs +1 -1
  33. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  34. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  35. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  36. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  37. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  38. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  39. package/dist/esm/api/utils.mjs +1 -1
  40. package/dist/esm/bcs/index.mjs +1 -1
  41. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  42. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  43. package/dist/esm/{chunk-Z4CGG42L.mjs → chunk-243IMA3Y.mjs} +2 -2
  44. package/dist/esm/chunk-2BJ23DXY.mjs +2 -0
  45. package/dist/esm/chunk-2BJ23DXY.mjs.map +1 -0
  46. package/dist/esm/chunk-2M45ESQN.mjs +2 -0
  47. package/dist/esm/{chunk-4KYQ7N3N.mjs.map → chunk-2M45ESQN.mjs.map} +1 -1
  48. package/dist/esm/{chunk-H6CS3BD7.mjs → chunk-2SGICMXB.mjs} +2 -2
  49. package/dist/esm/{chunk-3DCHEXE3.mjs → chunk-3CB53WTP.mjs} +2 -2
  50. package/dist/esm/{chunk-IPGKZUSA.mjs → chunk-3JFX3XDA.mjs} +2 -2
  51. package/dist/esm/{chunk-P43CXEO4.mjs → chunk-4FMAPHUM.mjs} +2 -2
  52. package/dist/esm/{chunk-UYF7AQLE.mjs → chunk-4R7FL2G2.mjs} +2 -2
  53. package/dist/esm/{chunk-S6H5Q2IK.mjs → chunk-4ZDOOSRJ.mjs} +2 -2
  54. package/dist/esm/{chunk-4GNJJZ4R.mjs → chunk-5OR2POPO.mjs} +2 -2
  55. package/dist/esm/{chunk-F6REP536.mjs → chunk-6WAXFWLH.mjs} +2 -2
  56. package/dist/esm/{chunk-W26LO3CR.mjs → chunk-72QKG5N2.mjs} +2 -2
  57. package/dist/esm/{chunk-VEGT6ZPK.mjs → chunk-7F7AIMGB.mjs} +2 -2
  58. package/dist/esm/{chunk-VQPLSJEI.mjs → chunk-B4ROOQE3.mjs} +2 -2
  59. package/dist/esm/chunk-B4ROOQE3.mjs.map +1 -0
  60. package/dist/esm/{chunk-4ARX2MGY.mjs → chunk-BDD6OBUV.mjs} +2 -2
  61. package/dist/esm/{chunk-7X6HZUXX.mjs → chunk-BEXHZ5XT.mjs} +2 -2
  62. package/dist/esm/{chunk-TY4IEDJD.mjs → chunk-BFRFAX5I.mjs} +2 -2
  63. package/dist/esm/{chunk-KDIPFPMS.mjs → chunk-BQ7OOQRE.mjs} +2 -2
  64. package/dist/esm/{chunk-6TRGVQLA.mjs → chunk-BQIT7TKM.mjs} +2 -2
  65. package/dist/esm/{chunk-3NPBKAPF.mjs → chunk-D6DCZULX.mjs} +2 -2
  66. package/dist/esm/chunk-D6QSRB4J.mjs +2 -0
  67. package/dist/esm/chunk-D6QSRB4J.mjs.map +1 -0
  68. package/dist/esm/{chunk-O7XEE7QT.mjs → chunk-DAEUQBVZ.mjs} +2 -2
  69. package/dist/esm/chunk-E7FWVXGX.mjs +1 -0
  70. package/dist/esm/{chunk-7WFKAS7T.mjs → chunk-EMFVGL2Y.mjs} +2 -2
  71. package/dist/esm/{chunk-VN2CRWOI.mjs → chunk-ES5Z33UX.mjs} +2 -2
  72. package/dist/esm/{chunk-S7G6VBUB.mjs → chunk-F435LQUS.mjs} +2 -2
  73. package/dist/esm/{chunk-JB5R6RGF.mjs → chunk-FAFN34ZH.mjs} +2 -2
  74. package/dist/esm/{chunk-NAGFCYG6.mjs → chunk-FE6CYBDF.mjs} +2 -2
  75. package/dist/esm/{chunk-6DDSU7HN.mjs → chunk-FRUEQTCC.mjs} +2 -2
  76. package/dist/esm/{chunk-SQQ2424E.mjs → chunk-FSTRZMCK.mjs} +2 -2
  77. package/dist/esm/{chunk-OPGMT27G.mjs → chunk-FZ3HMVKE.mjs} +2 -2
  78. package/dist/esm/{chunk-RFA7BIDN.mjs → chunk-GBZOWPC6.mjs} +2 -2
  79. package/dist/esm/{chunk-PVEPP4HR.mjs → chunk-GP3RTNYN.mjs} +2 -2
  80. package/dist/esm/chunk-IR6L77JS.mjs +2 -0
  81. package/dist/esm/chunk-IR6L77JS.mjs.map +1 -0
  82. package/dist/esm/{chunk-Y2H7FG2P.mjs → chunk-IUAAMX5V.mjs} +2 -2
  83. package/dist/esm/{chunk-I2T6BJOA.mjs → chunk-IZ7OGJBY.mjs} +2 -2
  84. package/dist/esm/{chunk-IPTCWBFV.mjs → chunk-J26STL4T.mjs} +2 -2
  85. package/dist/esm/{chunk-3VUSIKCF.mjs → chunk-J4KAYDPB.mjs} +2 -2
  86. package/dist/esm/chunk-J6NLU6QX.mjs +2 -0
  87. package/dist/esm/chunk-J6NLU6QX.mjs.map +1 -0
  88. package/dist/esm/{chunk-NLJVP5RP.mjs → chunk-K7OBPPSF.mjs} +2 -2
  89. package/dist/esm/{chunk-7RVYF5OP.mjs → chunk-L7FA4ISG.mjs} +2 -2
  90. package/dist/esm/{chunk-7HS4UJGE.mjs → chunk-MA7TL5VN.mjs} +2 -2
  91. package/dist/esm/{chunk-IN2L5ZAT.mjs → chunk-ME2PENQD.mjs} +2 -2
  92. package/dist/esm/{chunk-463B3NF7.mjs → chunk-MG3T24A3.mjs} +2 -2
  93. package/dist/esm/{chunk-T4NXIMZL.mjs → chunk-NC3KKAAK.mjs} +2 -2
  94. package/dist/esm/chunk-NECL5FCQ.mjs +1 -0
  95. package/dist/esm/chunk-NECL5FCQ.mjs.map +1 -0
  96. package/dist/esm/{chunk-T7YRD4PM.mjs → chunk-NJ2IXXY2.mjs} +2 -2
  97. package/dist/esm/{chunk-43IKKJ2Y.mjs → chunk-OBKVMO7I.mjs} +2 -2
  98. package/dist/esm/{chunk-SK2HTEP7.mjs → chunk-ODYVU346.mjs} +2 -2
  99. package/dist/esm/{chunk-UJYWEIQ2.mjs → chunk-OID45FCB.mjs} +2 -2
  100. package/dist/esm/{chunk-GWH34VNI.mjs → chunk-OUAQKVIC.mjs} +2 -2
  101. package/dist/esm/{chunk-C2IJG37E.mjs → chunk-PDOQLTXA.mjs} +2 -2
  102. package/dist/esm/chunk-PF54PEHF.mjs +2 -0
  103. package/dist/esm/chunk-PF54PEHF.mjs.map +1 -0
  104. package/dist/esm/{chunk-GCPWPGCS.mjs → chunk-PIUICROW.mjs} +2 -2
  105. package/dist/esm/{chunk-TWRYY6DD.mjs → chunk-QLKTSSVC.mjs} +2 -2
  106. package/dist/esm/chunk-QUMSKIYX.mjs +2 -0
  107. package/dist/esm/{chunk-CUSKA6RZ.mjs.map → chunk-QUMSKIYX.mjs.map} +1 -1
  108. package/dist/esm/{chunk-LBU3LV7I.mjs → chunk-RBIJJSGB.mjs} +2 -2
  109. package/dist/esm/{chunk-7CMCN6LB.mjs → chunk-RZKLIZ2D.mjs} +2 -2
  110. package/dist/esm/chunk-T52HPGL5.mjs +2 -0
  111. package/dist/esm/chunk-T52HPGL5.mjs.map +1 -0
  112. package/dist/esm/{chunk-OVG4SGPI.mjs → chunk-T7MGIHWV.mjs} +2 -2
  113. package/dist/esm/{chunk-LTMOMXPN.mjs → chunk-T7WBGP37.mjs} +2 -2
  114. package/dist/esm/{chunk-LTMOMXPN.mjs.map → chunk-T7WBGP37.mjs.map} +1 -1
  115. package/dist/esm/chunk-TDGQGILY.mjs +2 -0
  116. package/dist/esm/chunk-TDGQGILY.mjs.map +1 -0
  117. package/dist/esm/{chunk-CPCS5KIA.mjs → chunk-UY4EIN3P.mjs} +2 -2
  118. package/dist/esm/{chunk-H6QWMF3Q.mjs → chunk-V3NKDUY5.mjs} +2 -2
  119. package/dist/esm/{chunk-L6RINMT6.mjs → chunk-VA4HKHNV.mjs} +2 -2
  120. package/dist/esm/{chunk-YMFEA2TJ.mjs → chunk-VHNX2NUR.mjs} +3 -1
  121. package/dist/esm/chunk-VHNX2NUR.mjs.map +1 -0
  122. package/dist/esm/{chunk-77NXCSLY.mjs → chunk-WPYVWZQS.mjs} +2 -2
  123. package/dist/esm/{chunk-BF46IXHH.mjs → chunk-WSE653RS.mjs} +2 -2
  124. package/dist/esm/chunk-WSE653RS.mjs.map +1 -0
  125. package/dist/esm/{chunk-TCEOTADF.mjs → chunk-X2QSDREG.mjs} +2 -2
  126. package/dist/esm/{chunk-J5KAD2RM.mjs → chunk-Y5AY3QBY.mjs} +2 -2
  127. package/dist/esm/chunk-Y5VJSCVY.mjs +2 -0
  128. package/dist/esm/chunk-Y5VJSCVY.mjs.map +1 -0
  129. package/dist/esm/{chunk-J5YHMYHB.mjs → chunk-YEISKUKC.mjs} +2 -2
  130. package/dist/esm/{chunk-ZL4JYTID.mjs → chunk-ZE2TCKUL.mjs} +2 -2
  131. package/dist/esm/{chunk-LBKYNX5K.mjs → chunk-ZHNCJSXO.mjs} +2 -2
  132. package/dist/esm/{chunk-V5COHBA4.mjs → chunk-ZKCSQAGW.mjs} +2 -2
  133. package/dist/esm/{chunk-YDXU6ALO.mjs → chunk-ZMFVKUFD.mjs} +2 -2
  134. package/dist/esm/cli/index.mjs +1 -1
  135. package/dist/esm/cli/move.d.mts +21 -7
  136. package/dist/esm/cli/move.mjs +1 -1
  137. package/dist/esm/client/core.d.mts +2 -2
  138. package/dist/esm/client/core.mjs +1 -1
  139. package/dist/esm/client/get.mjs +1 -1
  140. package/dist/esm/client/index.mjs +1 -1
  141. package/dist/esm/client/post.mjs +1 -1
  142. package/dist/esm/client/types.d.mts +8 -1
  143. package/dist/esm/client/types.mjs +1 -1
  144. package/dist/esm/core/account/index.mjs +1 -1
  145. package/dist/esm/core/account/utils/address.mjs +1 -1
  146. package/dist/esm/core/account/utils/index.mjs +1 -1
  147. package/dist/esm/core/accountAddress.d.mts +1 -0
  148. package/dist/esm/core/accountAddress.mjs +1 -1
  149. package/dist/esm/core/authenticationKey.mjs +1 -1
  150. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  151. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  152. package/dist/esm/core/crypto/index.d.mts +3 -3
  153. package/dist/esm/core/crypto/index.mjs +1 -1
  154. package/dist/esm/core/crypto/keyless.mjs +1 -1
  155. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  156. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  157. package/dist/esm/core/crypto/proof.mjs +1 -1
  158. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  159. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  160. package/dist/esm/core/crypto/signature.mjs +1 -1
  161. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  162. package/dist/esm/core/index.d.mts +1 -0
  163. package/dist/esm/core/index.mjs +1 -1
  164. package/dist/esm/index.d.mts +2 -1
  165. package/dist/esm/index.mjs +1 -1
  166. package/dist/esm/internal/account.d.mts +2 -1
  167. package/dist/esm/internal/account.mjs +1 -1
  168. package/dist/esm/internal/ans.d.mts +17 -1
  169. package/dist/esm/internal/ans.mjs +1 -1
  170. package/dist/esm/internal/coin.mjs +1 -1
  171. package/dist/esm/internal/digitalAsset.mjs +1 -1
  172. package/dist/esm/internal/event.mjs +1 -1
  173. package/dist/esm/internal/faucet.mjs +1 -1
  174. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  175. package/dist/esm/internal/general.mjs +1 -1
  176. package/dist/esm/internal/keyless.mjs +1 -1
  177. package/dist/esm/internal/object.mjs +1 -1
  178. package/dist/esm/internal/staking.mjs +1 -1
  179. package/dist/esm/internal/table.mjs +1 -1
  180. package/dist/esm/internal/transaction.mjs +1 -1
  181. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  182. package/dist/esm/internal/view.mjs +1 -1
  183. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  184. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  185. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  186. package/dist/esm/transactions/index.mjs +1 -1
  187. package/dist/esm/transactions/instances/index.mjs +1 -1
  188. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  189. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  190. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  191. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  192. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  193. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  194. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  195. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  196. package/dist/esm/transactions/management/index.mjs +1 -1
  197. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  198. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  199. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  200. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  201. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  202. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  203. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  204. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  205. package/dist/esm/types/generated/operations.d.mts +16 -12
  206. package/dist/esm/types/generated/queries.d.mts +2 -2
  207. package/dist/esm/types/generated/queries.mjs +1 -1
  208. package/dist/esm/types/generated/types.d.mts +365 -761
  209. package/dist/esm/types/generated/types.mjs +1 -1
  210. package/dist/esm/types/generated/types.mjs.map +1 -1
  211. package/dist/esm/types/index.d.mts +42 -3
  212. package/dist/esm/types/index.mjs +1 -1
  213. package/dist/esm/utils/index.mjs +1 -1
  214. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  215. package/dist/esm/version.d.mts +1 -1
  216. package/dist/esm/version.mjs +1 -1
  217. package/package.json +2 -1
  218. package/src/account/KeylessAccount.ts +20 -4
  219. package/src/api/account.ts +4 -1
  220. package/src/client/core.ts +25 -52
  221. package/src/client/types.ts +60 -7
  222. package/src/core/accountAddress.ts +2 -0
  223. package/src/core/crypto/ephemeral.ts +1 -1
  224. package/src/internal/account.ts +35 -4
  225. package/src/internal/ans.ts +36 -4
  226. package/src/internal/queries/ansTokenFragment.graphql +2 -0
  227. package/src/types/generated/operations.ts +16 -12
  228. package/src/types/generated/queries.ts +2 -0
  229. package/src/types/generated/types.ts +387 -835
  230. package/src/types/index.ts +48 -1
  231. package/src/version.ts +1 -1
  232. package/dist/esm/chunk-4KYQ7N3N.mjs +0 -2
  233. package/dist/esm/chunk-5M235PLS.mjs +0 -2
  234. package/dist/esm/chunk-5M235PLS.mjs.map +0 -1
  235. package/dist/esm/chunk-67BD7B6N.mjs +0 -2
  236. package/dist/esm/chunk-67BD7B6N.mjs.map +0 -1
  237. package/dist/esm/chunk-BF46IXHH.mjs.map +0 -1
  238. package/dist/esm/chunk-CUSKA6RZ.mjs +0 -2
  239. package/dist/esm/chunk-GHYE26Q5.mjs +0 -2
  240. package/dist/esm/chunk-GHYE26Q5.mjs.map +0 -1
  241. package/dist/esm/chunk-PY23BQ2H.mjs +0 -2
  242. package/dist/esm/chunk-PY23BQ2H.mjs.map +0 -1
  243. package/dist/esm/chunk-Q6LFIZ3L.mjs +0 -2
  244. package/dist/esm/chunk-Q6LFIZ3L.mjs.map +0 -1
  245. package/dist/esm/chunk-Q7ZP25NJ.mjs +0 -2
  246. package/dist/esm/chunk-Q7ZP25NJ.mjs.map +0 -1
  247. package/dist/esm/chunk-RFSO3JRG.mjs +0 -1
  248. package/dist/esm/chunk-TZOKV22Z.mjs +0 -2
  249. package/dist/esm/chunk-TZOKV22Z.mjs.map +0 -1
  250. package/dist/esm/chunk-VQPLSJEI.mjs.map +0 -1
  251. package/dist/esm/chunk-XVWNPR4T.mjs +0 -2
  252. package/dist/esm/chunk-XVWNPR4T.mjs.map +0 -1
  253. package/dist/esm/chunk-YMFEA2TJ.mjs.map +0 -1
  254. /package/dist/esm/{chunk-Z4CGG42L.mjs.map → chunk-243IMA3Y.mjs.map} +0 -0
  255. /package/dist/esm/{chunk-H6CS3BD7.mjs.map → chunk-2SGICMXB.mjs.map} +0 -0
  256. /package/dist/esm/{chunk-3DCHEXE3.mjs.map → chunk-3CB53WTP.mjs.map} +0 -0
  257. /package/dist/esm/{chunk-IPGKZUSA.mjs.map → chunk-3JFX3XDA.mjs.map} +0 -0
  258. /package/dist/esm/{chunk-P43CXEO4.mjs.map → chunk-4FMAPHUM.mjs.map} +0 -0
  259. /package/dist/esm/{chunk-UYF7AQLE.mjs.map → chunk-4R7FL2G2.mjs.map} +0 -0
  260. /package/dist/esm/{chunk-S6H5Q2IK.mjs.map → chunk-4ZDOOSRJ.mjs.map} +0 -0
  261. /package/dist/esm/{chunk-4GNJJZ4R.mjs.map → chunk-5OR2POPO.mjs.map} +0 -0
  262. /package/dist/esm/{chunk-F6REP536.mjs.map → chunk-6WAXFWLH.mjs.map} +0 -0
  263. /package/dist/esm/{chunk-W26LO3CR.mjs.map → chunk-72QKG5N2.mjs.map} +0 -0
  264. /package/dist/esm/{chunk-VEGT6ZPK.mjs.map → chunk-7F7AIMGB.mjs.map} +0 -0
  265. /package/dist/esm/{chunk-4ARX2MGY.mjs.map → chunk-BDD6OBUV.mjs.map} +0 -0
  266. /package/dist/esm/{chunk-7X6HZUXX.mjs.map → chunk-BEXHZ5XT.mjs.map} +0 -0
  267. /package/dist/esm/{chunk-TY4IEDJD.mjs.map → chunk-BFRFAX5I.mjs.map} +0 -0
  268. /package/dist/esm/{chunk-KDIPFPMS.mjs.map → chunk-BQ7OOQRE.mjs.map} +0 -0
  269. /package/dist/esm/{chunk-6TRGVQLA.mjs.map → chunk-BQIT7TKM.mjs.map} +0 -0
  270. /package/dist/esm/{chunk-3NPBKAPF.mjs.map → chunk-D6DCZULX.mjs.map} +0 -0
  271. /package/dist/esm/{chunk-O7XEE7QT.mjs.map → chunk-DAEUQBVZ.mjs.map} +0 -0
  272. /package/dist/esm/{chunk-RFSO3JRG.mjs.map → chunk-E7FWVXGX.mjs.map} +0 -0
  273. /package/dist/esm/{chunk-7WFKAS7T.mjs.map → chunk-EMFVGL2Y.mjs.map} +0 -0
  274. /package/dist/esm/{chunk-VN2CRWOI.mjs.map → chunk-ES5Z33UX.mjs.map} +0 -0
  275. /package/dist/esm/{chunk-S7G6VBUB.mjs.map → chunk-F435LQUS.mjs.map} +0 -0
  276. /package/dist/esm/{chunk-JB5R6RGF.mjs.map → chunk-FAFN34ZH.mjs.map} +0 -0
  277. /package/dist/esm/{chunk-NAGFCYG6.mjs.map → chunk-FE6CYBDF.mjs.map} +0 -0
  278. /package/dist/esm/{chunk-6DDSU7HN.mjs.map → chunk-FRUEQTCC.mjs.map} +0 -0
  279. /package/dist/esm/{chunk-SQQ2424E.mjs.map → chunk-FSTRZMCK.mjs.map} +0 -0
  280. /package/dist/esm/{chunk-OPGMT27G.mjs.map → chunk-FZ3HMVKE.mjs.map} +0 -0
  281. /package/dist/esm/{chunk-RFA7BIDN.mjs.map → chunk-GBZOWPC6.mjs.map} +0 -0
  282. /package/dist/esm/{chunk-PVEPP4HR.mjs.map → chunk-GP3RTNYN.mjs.map} +0 -0
  283. /package/dist/esm/{chunk-Y2H7FG2P.mjs.map → chunk-IUAAMX5V.mjs.map} +0 -0
  284. /package/dist/esm/{chunk-I2T6BJOA.mjs.map → chunk-IZ7OGJBY.mjs.map} +0 -0
  285. /package/dist/esm/{chunk-IPTCWBFV.mjs.map → chunk-J26STL4T.mjs.map} +0 -0
  286. /package/dist/esm/{chunk-3VUSIKCF.mjs.map → chunk-J4KAYDPB.mjs.map} +0 -0
  287. /package/dist/esm/{chunk-NLJVP5RP.mjs.map → chunk-K7OBPPSF.mjs.map} +0 -0
  288. /package/dist/esm/{chunk-7RVYF5OP.mjs.map → chunk-L7FA4ISG.mjs.map} +0 -0
  289. /package/dist/esm/{chunk-7HS4UJGE.mjs.map → chunk-MA7TL5VN.mjs.map} +0 -0
  290. /package/dist/esm/{chunk-IN2L5ZAT.mjs.map → chunk-ME2PENQD.mjs.map} +0 -0
  291. /package/dist/esm/{chunk-463B3NF7.mjs.map → chunk-MG3T24A3.mjs.map} +0 -0
  292. /package/dist/esm/{chunk-T4NXIMZL.mjs.map → chunk-NC3KKAAK.mjs.map} +0 -0
  293. /package/dist/esm/{chunk-T7YRD4PM.mjs.map → chunk-NJ2IXXY2.mjs.map} +0 -0
  294. /package/dist/esm/{chunk-43IKKJ2Y.mjs.map → chunk-OBKVMO7I.mjs.map} +0 -0
  295. /package/dist/esm/{chunk-SK2HTEP7.mjs.map → chunk-ODYVU346.mjs.map} +0 -0
  296. /package/dist/esm/{chunk-UJYWEIQ2.mjs.map → chunk-OID45FCB.mjs.map} +0 -0
  297. /package/dist/esm/{chunk-GWH34VNI.mjs.map → chunk-OUAQKVIC.mjs.map} +0 -0
  298. /package/dist/esm/{chunk-C2IJG37E.mjs.map → chunk-PDOQLTXA.mjs.map} +0 -0
  299. /package/dist/esm/{chunk-GCPWPGCS.mjs.map → chunk-PIUICROW.mjs.map} +0 -0
  300. /package/dist/esm/{chunk-TWRYY6DD.mjs.map → chunk-QLKTSSVC.mjs.map} +0 -0
  301. /package/dist/esm/{chunk-LBU3LV7I.mjs.map → chunk-RBIJJSGB.mjs.map} +0 -0
  302. /package/dist/esm/{chunk-7CMCN6LB.mjs.map → chunk-RZKLIZ2D.mjs.map} +0 -0
  303. /package/dist/esm/{chunk-OVG4SGPI.mjs.map → chunk-T7MGIHWV.mjs.map} +0 -0
  304. /package/dist/esm/{chunk-CPCS5KIA.mjs.map → chunk-UY4EIN3P.mjs.map} +0 -0
  305. /package/dist/esm/{chunk-H6QWMF3Q.mjs.map → chunk-V3NKDUY5.mjs.map} +0 -0
  306. /package/dist/esm/{chunk-L6RINMT6.mjs.map → chunk-VA4HKHNV.mjs.map} +0 -0
  307. /package/dist/esm/{chunk-77NXCSLY.mjs.map → chunk-WPYVWZQS.mjs.map} +0 -0
  308. /package/dist/esm/{chunk-TCEOTADF.mjs.map → chunk-X2QSDREG.mjs.map} +0 -0
  309. /package/dist/esm/{chunk-J5KAD2RM.mjs.map → chunk-Y5AY3QBY.mjs.map} +0 -0
  310. /package/dist/esm/{chunk-J5YHMYHB.mjs.map → chunk-YEISKUKC.mjs.map} +0 -0
  311. /package/dist/esm/{chunk-ZL4JYTID.mjs.map → chunk-ZE2TCKUL.mjs.map} +0 -0
  312. /package/dist/esm/{chunk-LBKYNX5K.mjs.map → chunk-ZHNCJSXO.mjs.map} +0 -0
  313. /package/dist/esm/{chunk-V5COHBA4.mjs.map → chunk-ZKCSQAGW.mjs.map} +0 -0
  314. /package/dist/esm/{chunk-YDXU6ALO.mjs.map → chunk-ZMFVKUFD.mjs.map} +0 -0
@@ -15,15 +15,15 @@ declare const NetworkToNetworkName: Record<string, Network>;
15
15
 
16
16
  type GetAccountCoinsDataQuery = {
17
17
  current_fungible_asset_balances: Array<{
18
- amount: any;
19
- asset_type: string;
18
+ amount?: any | null;
19
+ asset_type?: string | null;
20
20
  is_frozen: boolean;
21
- is_primary: boolean;
22
- last_transaction_timestamp: any;
23
- last_transaction_version: any;
21
+ is_primary?: boolean | null;
22
+ last_transaction_timestamp?: any | null;
23
+ last_transaction_version?: any | null;
24
24
  owner_address: string;
25
25
  storage_id: string;
26
- token_standard: string;
26
+ token_standard?: string | null;
27
27
  metadata?: {
28
28
  token_standard: string;
29
29
  symbol: string;
@@ -200,15 +200,15 @@ type GetCollectionDataQuery = {
200
200
  };
201
201
  type GetCurrentFungibleAssetBalancesQuery = {
202
202
  current_fungible_asset_balances: Array<{
203
- amount: any;
204
- asset_type: string;
203
+ amount?: any | null;
204
+ asset_type?: string | null;
205
205
  is_frozen: boolean;
206
- is_primary: boolean;
207
- last_transaction_timestamp: any;
208
- last_transaction_version: any;
206
+ is_primary?: boolean | null;
207
+ last_transaction_timestamp?: any | null;
208
+ last_transaction_version?: any | null;
209
209
  owner_address: string;
210
210
  storage_id: string;
211
- token_standard: string;
211
+ token_standard?: string | null;
212
212
  }>;
213
213
  };
214
214
  type GetDelegatedStakingActivitiesQuery = {
@@ -281,6 +281,8 @@ type GetNamesQuery = {
281
281
  token_standard?: string | null;
282
282
  is_primary?: boolean | null;
283
283
  owner_address?: string | null;
284
+ subdomain_expiration_policy?: any | null;
285
+ domain_expiration_timestamp?: any | null;
284
286
  }>;
285
287
  };
286
288
  type GetNumberOfDelegatorsQuery = {
@@ -781,16 +783,18 @@ declare enum TransactionResponseType {
781
783
  Genesis = "genesis_transaction",
782
784
  BlockMetadata = "block_metadata_transaction",
783
785
  StateCheckpoint = "state_checkpoint_transaction",
784
- Validator = "validator_transaction"
786
+ Validator = "validator_transaction",
787
+ BlockEpilogue = "block_epilogue_transaction"
785
788
  }
786
789
  type TransactionResponse = PendingTransactionResponse | CommittedTransactionResponse;
787
- type CommittedTransactionResponse = UserTransactionResponse | GenesisTransactionResponse | BlockMetadataTransactionResponse | StateCheckpointTransactionResponse | ValidatorTransactionResponse;
790
+ type CommittedTransactionResponse = UserTransactionResponse | GenesisTransactionResponse | BlockMetadataTransactionResponse | StateCheckpointTransactionResponse | ValidatorTransactionResponse | BlockEpilogueTransactionResponse;
788
791
  declare function isPendingTransactionResponse(response: TransactionResponse): response is PendingTransactionResponse;
789
792
  declare function isUserTransactionResponse(response: TransactionResponse): response is UserTransactionResponse;
790
793
  declare function isGenesisTransactionResponse(response: TransactionResponse): response is GenesisTransactionResponse;
791
794
  declare function isBlockMetadataTransactionResponse(response: TransactionResponse): response is BlockMetadataTransactionResponse;
792
795
  declare function isStateCheckpointTransactionResponse(response: TransactionResponse): response is StateCheckpointTransactionResponse;
793
796
  declare function isValidatorTransactionResponse(response: TransactionResponse): response is ValidatorTransactionResponse;
797
+ declare function isBlockEpilogueTransactionResponse(response: TransactionResponse): response is BlockEpilogueTransactionResponse;
794
798
  type PendingTransactionResponse = {
795
799
  type: TransactionResponseType.Pending;
796
800
  hash: string;
@@ -952,6 +956,43 @@ type ValidatorTransactionResponse = {
952
956
  events: Array<Event>;
953
957
  timestamp: string;
954
958
  };
959
+ /**
960
+ * BlockEndInfo describes the gas state of the block
961
+ */
962
+ type BlockEndInfo = {
963
+ block_gas_limit_reached: boolean;
964
+ block_output_limit_reached: boolean;
965
+ block_effective_block_gas_units: number;
966
+ block_approx_output_size: number;
967
+ };
968
+ /**
969
+ * BlockEpilogueTransactionResponse is a transaction that is executed at the end of a block keeping track of data from
970
+ * the whole block
971
+ */
972
+ type BlockEpilogueTransactionResponse = {
973
+ type: TransactionResponseType.BlockEpilogue;
974
+ version: string;
975
+ hash: string;
976
+ state_change_hash: string;
977
+ event_root_hash: string;
978
+ state_checkpoint_hash: string | null;
979
+ gas_used: string;
980
+ /**
981
+ * Whether the transaction was successful
982
+ */
983
+ success: boolean;
984
+ /**
985
+ * The VM status of the transaction, can tell useful information in a failure
986
+ */
987
+ vm_status: string;
988
+ accumulator_root_hash: string;
989
+ /**
990
+ * Final state of resources changed by the transaction
991
+ */
992
+ changes: Array<WriteSetChange>;
993
+ timestamp: string;
994
+ block_end_info: BlockEndInfo | null;
995
+ };
955
996
  /**
956
997
  * WRITESET CHANGE TYPES
957
998
  */
@@ -2039,6 +2080,7 @@ declare class AccountAddress extends Serializable implements TransactionArgument
2039
2080
  static TWO: AccountAddress;
2040
2081
  static THREE: AccountAddress;
2041
2082
  static FOUR: AccountAddress;
2083
+ static A: AccountAddress;
2042
2084
  /**
2043
2085
  * Creates an instance of AccountAddress from a Uint8Array.
2044
2086
  *
@@ -2224,4 +2266,4 @@ declare class AccountAddress extends Serializable implements TransactionArgument
2224
2266
  equals(other: AccountAddress): boolean;
2225
2267
  }
2226
2268
 
2227
- export { type GetEventsResponse as $, type AnyNumber as A, type GetAccountOwnedTokensFromCollectionResponse as B, type Client as C, Deserializer as D, type EntryFunctionArgument as E, type FullNodeConfig as F, type GetAccountOwnedTokensQueryResponse as G, type HexInput as H, type IndexerConfig as I, type GetAccountCollectionsWithOwnedTokenResponse as J, type GetAccountCoinsDataResponse as K, type LedgerVersionArg as L, type MoveModuleId as M, Network as N, type OrderByArg as O, type PaginationArgs as P, type GetObjectDataQueryResponse as Q, type GetCollectionDataResponse as R, Serializable as S, type TransactionArgument as T, type Uint8 as U, type GetTokenDataResponse as V, type WhereArg as W, type GetCurrentTokenOwnershipResponse as X, type GetOwnedTokensResponse as Y, ZkpVariant as Z, type GetTokenActivityResponse as _, Serializer as a, type TransactionPayloadResponse as a$, type WaitForTransactionOptions as a0, type UserTransactionResponse as a1, type MoveFunction as a2, type GetFungibleAssetMetadataResponse as a3, type GetFungibleAssetActivitiesResponse as a4, type GetCurrentFungibleAssetBalancesResponse as a5, type LedgerInfo as a6, type Block as a7, type GetChainTopUserTransactionsResponse as a8, type GraphqlQuery as a9, AccountAuthenticatorVariant as aA, AnySignatureVariant as aB, EphemeralSignatureVariant as aC, type Uint64 as aD, type Uint128 as aE, type Uint256 as aF, type ClientHeadersType as aG, TransactionResponseType as aH, isPendingTransactionResponse as aI, isUserTransactionResponse as aJ, isGenesisTransactionResponse as aK, isBlockMetadataTransactionResponse as aL, isStateCheckpointTransactionResponse as aM, isValidatorTransactionResponse as aN, type GenesisTransactionResponse as aO, type BlockMetadataTransactionResponse as aP, type StateCheckpointTransactionResponse as aQ, type ValidatorTransactionResponse as aR, type WriteSetChange as aS, type WriteSetChangeDeleteModule as aT, type WriteSetChangeDeleteResource as aU, type WriteSetChangeDeleteTableItem as aV, type WriteSetChangeWriteModule as aW, type WriteSetChangeWriteResource as aX, type WriteSetChangeWriteTableItem as aY, type DecodedTableData as aZ, type DeletedTableData as a_, type GetProcessorStatusResponse as aa, type GetANSNameResponse as ab, type GetNumberOfDelegatorsResponse as ac, type GetDelegatedStakingActivitiesResponse as ad, type PendingTransactionResponse as ae, type CommittedTransactionResponse as af, type GasEstimation as ag, type TableItemRequest as ah, type GetTableItemsDataResponse as ai, type GetTableItemsMetadataResponse as aj, type AptosRequest as ak, type ClientRequest as al, type ClientResponse as am, MimeType as an, ensureBoolean as ao, outOfRangeErrorMessage as ap, validateNumberInRange as aq, AddressInvalidReason as ar, ParsingError as as, type ParsingResult as at, HexInvalidReason as au, TypeTagVariants as av, ScriptTransactionArgumentVariants as aw, TransactionPayloadVariants as ax, TransactionVariants as ay, TransactionAuthenticatorVariant as az, type Uint16 as b, type EntryFunctionPayloadResponse as b0, type ScriptPayloadResponse as b1, type MultisigPayloadResponse as b2, type GenesisPayload as b3, type MoveScriptBytecode as b4, type TransactionSignature as b5, isEd25519Signature as b6, isSecp256k1Signature as b7, isMultiAgentSignature as b8, isFeePayerSignature as b9, type MoveModule as bA, type MoveStruct as bB, RoleType as bC, DeriveScheme as bD, type GenerateAccountWithEd25519 as bE, type GenerateAccountWithSingleSignerSecp256k1Key as bF, type GenerateAccount as bG, type OrderBy as bH, type OrderByValue as bI, type TokenStandard as bJ, NetworkToIndexerAPI as bK, NetworkToNodeAPI as bL, NetworkToFaucetAPI as bM, NetworkToPepperAPI as bN, NetworkToProverAPI as bO, NetworkToChainId as bP, NetworkToNetworkName as bQ, isMultiEd25519Signature as ba, type TransactionEd25519Signature as bb, type TransactionSecp256k1Signature as bc, type TransactionMultiEd25519Signature as bd, type TransactionMultiAgentSignature as be, type TransactionFeePayerSignature as bf, type AccountSignature as bg, type WriteSet as bh, type ScriptWriteSet as bi, type DirectWriteSet as bj, type EventGuid as bk, type Event as bl, type MoveUint8Type as bm, type MoveUint16Type as bn, type MoveUint32Type as bo, type MoveUint64Type as bp, type MoveUint128Type as bq, type MoveUint256Type as br, type MoveAddressType as bs, type MoveObjectType as bt, type MoveOptionType as bu, type MoveStructType as bv, type MoveType as bw, MoveFunctionVisibility as bx, MoveAbility as by, type MoveStructField as bz, type Uint32 as c, type Deserializable as d, Hex as e, type AuthenticationKeyScheme as f, AccountAddress as g, AnyPublicKeyVariant as h, EphemeralPublicKeyVariant as i, type ClientConfig as j, type FaucetConfig as k, type AptosSettings as l, EphemeralCertificateVariant as m, type ScriptFunctionArgument as n, type MoveFunctionId as o, type AccountAddressInput as p, type MoveStructId as q, type MoveValue as r, type MoveFunctionGenericTypeParam as s, SigningSchemeInput as t, SigningScheme as u, type AccountData as v, type MoveModuleBytecode as w, type TransactionResponse as x, type MoveResource as y, type TokenStandardArg as z };
2269
+ export { type GetEventsResponse as $, type AnyNumber as A, type GetAccountOwnedTokensFromCollectionResponse as B, type Client as C, Deserializer as D, type EntryFunctionArgument as E, type FullNodeConfig as F, type GetAccountOwnedTokensQueryResponse as G, type HexInput as H, type IndexerConfig as I, type GetAccountCollectionsWithOwnedTokenResponse as J, type GetAccountCoinsDataResponse as K, type LedgerVersionArg as L, type MoveModuleId as M, Network as N, type OrderByArg as O, type PaginationArgs as P, type GetObjectDataQueryResponse as Q, type GetCollectionDataResponse as R, Serializable as S, type TransactionArgument as T, type Uint8 as U, type GetTokenDataResponse as V, type WhereArg as W, type GetCurrentTokenOwnershipResponse as X, type GetOwnedTokensResponse as Y, ZkpVariant as Z, type GetTokenActivityResponse as _, Serializer as a, type WriteSetChangeWriteTableItem as a$, type WaitForTransactionOptions as a0, type UserTransactionResponse as a1, type MoveFunction as a2, type GetFungibleAssetMetadataResponse as a3, type GetFungibleAssetActivitiesResponse as a4, type GetCurrentFungibleAssetBalancesResponse as a5, type LedgerInfo as a6, type Block as a7, type GetChainTopUserTransactionsResponse as a8, type GraphqlQuery as a9, AccountAuthenticatorVariant as aA, AnySignatureVariant as aB, EphemeralSignatureVariant as aC, type Uint64 as aD, type Uint128 as aE, type Uint256 as aF, type ClientHeadersType as aG, TransactionResponseType as aH, isPendingTransactionResponse as aI, isUserTransactionResponse as aJ, isGenesisTransactionResponse as aK, isBlockMetadataTransactionResponse as aL, isStateCheckpointTransactionResponse as aM, isValidatorTransactionResponse as aN, isBlockEpilogueTransactionResponse as aO, type GenesisTransactionResponse as aP, type BlockMetadataTransactionResponse as aQ, type StateCheckpointTransactionResponse as aR, type ValidatorTransactionResponse as aS, type BlockEndInfo as aT, type BlockEpilogueTransactionResponse as aU, type WriteSetChange as aV, type WriteSetChangeDeleteModule as aW, type WriteSetChangeDeleteResource as aX, type WriteSetChangeDeleteTableItem as aY, type WriteSetChangeWriteModule as aZ, type WriteSetChangeWriteResource as a_, type GetProcessorStatusResponse as aa, type GetANSNameResponse as ab, type GetNumberOfDelegatorsResponse as ac, type GetDelegatedStakingActivitiesResponse as ad, type PendingTransactionResponse as ae, type CommittedTransactionResponse as af, type GasEstimation as ag, type TableItemRequest as ah, type GetTableItemsDataResponse as ai, type GetTableItemsMetadataResponse as aj, type AptosRequest as ak, type ClientRequest as al, type ClientResponse as am, MimeType as an, ensureBoolean as ao, outOfRangeErrorMessage as ap, validateNumberInRange as aq, AddressInvalidReason as ar, ParsingError as as, type ParsingResult as at, HexInvalidReason as au, TypeTagVariants as av, ScriptTransactionArgumentVariants as aw, TransactionPayloadVariants as ax, TransactionVariants as ay, TransactionAuthenticatorVariant as az, type Uint16 as b, type DecodedTableData as b0, type DeletedTableData as b1, type TransactionPayloadResponse as b2, type EntryFunctionPayloadResponse as b3, type ScriptPayloadResponse as b4, type MultisigPayloadResponse as b5, type GenesisPayload as b6, type MoveScriptBytecode as b7, type TransactionSignature as b8, isEd25519Signature as b9, MoveFunctionVisibility as bA, MoveAbility as bB, type MoveStructField as bC, type MoveModule as bD, type MoveStruct as bE, RoleType as bF, DeriveScheme as bG, type GenerateAccountWithEd25519 as bH, type GenerateAccountWithSingleSignerSecp256k1Key as bI, type GenerateAccount as bJ, type OrderBy as bK, type OrderByValue as bL, type TokenStandard as bM, NetworkToIndexerAPI as bN, NetworkToNodeAPI as bO, NetworkToFaucetAPI as bP, NetworkToPepperAPI as bQ, NetworkToProverAPI as bR, NetworkToChainId as bS, NetworkToNetworkName as bT, isSecp256k1Signature as ba, isMultiAgentSignature as bb, isFeePayerSignature as bc, isMultiEd25519Signature as bd, type TransactionEd25519Signature as be, type TransactionSecp256k1Signature as bf, type TransactionMultiEd25519Signature as bg, type TransactionMultiAgentSignature as bh, type TransactionFeePayerSignature as bi, type AccountSignature as bj, type WriteSet as bk, type ScriptWriteSet as bl, type DirectWriteSet as bm, type EventGuid as bn, type Event as bo, type MoveUint8Type as bp, type MoveUint16Type as bq, type MoveUint32Type as br, type MoveUint64Type as bs, type MoveUint128Type as bt, type MoveUint256Type as bu, type MoveAddressType as bv, type MoveObjectType as bw, type MoveOptionType as bx, type MoveStructType as by, type MoveType as bz, type Uint32 as c, type Deserializable as d, Hex as e, type AuthenticationKeyScheme as f, AccountAddress as g, AnyPublicKeyVariant as h, EphemeralPublicKeyVariant as i, type ClientConfig as j, type FaucetConfig as k, type AptosSettings as l, EphemeralCertificateVariant as m, type ScriptFunctionArgument as n, type MoveFunctionId as o, type AccountAddressInput as p, type MoveStructId as q, type MoveValue as r, type MoveFunctionGenericTypeParam as s, SigningSchemeInput as t, SigningScheme as u, type AccountData as v, type MoveModuleBytecode as w, type TransactionResponse as x, type MoveResource as y, type TokenStandardArg as z };
@@ -1,5 +1,5 @@
1
1
  import { ChildProcessWithoutNullStreams } from 'child_process';
2
- import { N as Network, g as AccountAddress } from '../accountAddress-NYtf3uZq.js';
2
+ import { N as Network, g as AccountAddress } from '../accountAddress-D9blTwwp.js';
3
3
 
4
4
  declare class LocalNode {
5
5
  readonly MAXIMUM_WAIT_TIME_SEC = 75;
@@ -49,7 +49,9 @@ declare class Move {
49
49
  init(args: {
50
50
  network?: Network;
51
51
  profile?: string;
52
- }): Promise<string>;
52
+ }): Promise<{
53
+ output: string;
54
+ }>;
53
55
  /**
54
56
  * Function to compile a package
55
57
  *
@@ -65,7 +67,9 @@ declare class Move {
65
67
  compile(args: {
66
68
  packageDirectoryPath: string;
67
69
  namedAddresses: Record<string, AccountAddress>;
68
- }): Promise<string>;
70
+ }): Promise<{
71
+ output: string;
72
+ }>;
69
73
  /**
70
74
  * Function to run Move unit tests for a package
71
75
  *
@@ -81,7 +85,9 @@ declare class Move {
81
85
  test(args: {
82
86
  packageDirectoryPath: string;
83
87
  namedAddresses: Record<string, AccountAddress>;
84
- }): Promise<string>;
88
+ }): Promise<{
89
+ output: string;
90
+ }>;
85
91
  /**
86
92
  * Function to publish the modules to the publisher account on the Aptos blockchain
87
93
  *
@@ -99,7 +105,9 @@ declare class Move {
99
105
  packageDirectoryPath: string;
100
106
  namedAddresses: Record<string, AccountAddress>;
101
107
  profile?: string;
102
- }): Promise<string>;
108
+ }): Promise<{
109
+ output: string;
110
+ }>;
103
111
  /**
104
112
  * Function to create a new object and publish the Move package to it on the Aptos blockchain
105
113
  *
@@ -128,7 +136,9 @@ declare class Move {
128
136
  addressName: string;
129
137
  namedAddresses: Record<string, AccountAddress>;
130
138
  profile?: string;
131
- }): Promise<string>;
139
+ }): Promise<{
140
+ objectAddress: string;
141
+ }>;
132
142
  /**
133
143
  * Function to upgrade a Move package previously published to an object on the Aptos blockchain
134
144
  * Caller must be the object owner to call this function
@@ -151,7 +161,9 @@ declare class Move {
151
161
  objectAddress: string;
152
162
  namedAddresses: Record<string, AccountAddress>;
153
163
  profile?: string;
154
- }): Promise<string>;
164
+ }): Promise<{
165
+ output: string;
166
+ }>;
155
167
  /**
156
168
  * Function to run a Move script, please run compile before running this
157
169
  *
@@ -166,7 +178,9 @@ declare class Move {
166
178
  runScript(args: {
167
179
  compiledScriptPath: string;
168
180
  profile?: string;
169
- }): Promise<string>;
181
+ }): Promise<{
182
+ output: string;
183
+ }>;
170
184
  /**
171
185
  * Run a move command
172
186
  *
@@ -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 _chunkBHKSQXUZjs = require('../chunk-BHKSQXUZ.js');var _child_process = require('child_process');var _treekill = require('tree-kill'); var _treekill2 = _interopRequireDefault(_treekill);var _os = require('os');var c=class{constructor(){this.MAXIMUM_WAIT_TIME_SEC=75;this.READINESS_ENDPOINT="http://127.0.0.1:8070/";this.process=null}stop(){_optionalChain([this, 'access', _ => _.process, 'optionalAccess', _2 => _2.pid])&&_treekill2.default.call(void 0, this.process.pid)}async run(){await this.checkIfProcessIsUp()||(this.start(),await this.waitUntilProcessIsUp())}start(){let s="npx",e=["aptos","node","run-local-testnet","--force-restart","--assume-yes","--with-indexer-api"],r=_os.platform.call(void 0, ),t;r==="win32"?t=_child_process.spawn.call(void 0, s,e,{shell:!0}):t=_child_process.spawn.call(void 0, s,e),this.process=t,_optionalChain([t, 'access', _3 => _3.stderr, 'optionalAccess', _4 => _4.on, 'call', _5 => _5("data",a=>{let o=a.toString();console.log(o)})]),_optionalChain([t, 'access', _6 => _6.stdout, 'optionalAccess', _7 => _7.on, 'call', _8 => _8("data",a=>{let o=a.toString();console.log(o)})])}async waitUntilProcessIsUp(){let s=await this.checkIfProcessIsUp(),e=Date.now()/1e3,r=e;for(;!s&&e+this.MAXIMUM_WAIT_TIME_SEC>r;)await _chunkBHKSQXUZjs.b.call(void 0, 1e3),s=await this.checkIfProcessIsUp(),r=Date.now()/1e3;if(!s)throw new Error("Process failed to start");return!0}async checkIfProcessIsUp(){try{return(await fetch(this.READINESS_ENDPOINT)).status===200}catch (e2){return!1}}};var l=class{async init(s){let{network:e,profile:r}=s,t=["aptos","init",`--network=${_nullishCoalesce(e, () => ("local"))}`,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return this.runCommand(t)}async compile(s){let{packageDirectoryPath:e,namedAddresses:r}=s,t=["aptos","move","compile","--package-dir",e],a=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(a)),this.runCommand(t)}async test(s){let{packageDirectoryPath:e,namedAddresses:r}=s,t=["aptos","move","test","--package-dir",e],a=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(a)),this.runCommand(t)}async publish(s){let{packageDirectoryPath:e,namedAddresses:r,profile:t}=s,a=["aptos","move","publish","--package-dir",e,`--profile=${_nullishCoalesce(t, () => ("default"))}`],o=this.parseNamedAddresses(r);return a.push(...this.prepareNamedAddresses(o)),this.runCommand(a)}async createObjectAndPublishPackage(s){let{packageDirectoryPath:e,addressName:r,namedAddresses:t,profile:a}=s,o=["aptos","move","create-object-and-publish-package","--package-dir",e,"--address-name",r,`--profile=${_nullishCoalesce(a, () => ("default"))}`],n=this.parseNamedAddresses(t);return o.push(...this.prepareNamedAddresses(n)),this.runCommand(o).then(u=>this.extractAddressFromOutput(u))}async upgradeObjectPackage(s){let{packageDirectoryPath:e,objectAddress:r,namedAddresses:t,profile:a}=s,o=["aptos","move","upgrade-object-package","--package-dir",e,"--object-address",r,`--profile=${_nullishCoalesce(a, () => ("default"))}`],n=this.parseNamedAddresses(t);return o.push(...this.prepareNamedAddresses(n)),this.runCommand(o)}async runScript(s){let{compiledScriptPath:e,profile:r}=s,t=["aptos","move","run-script","--compiled-script-path",e,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return this.runCommand(t)}async runCommand(s){return new Promise((e,r)=>{let t=_os.platform.call(void 0, ),a,o="";t==="win32"?a=_child_process.spawn.call(void 0, "npx",s,{shell:!0}):a=_child_process.spawn.call(void 0, "npx",s),a.stdout.on("data",n=>{o+=n.toString()}),a.stdout.pipe(process.stdout),a.stderr.pipe(process.stderr),process.stdin.pipe(a.stdin),a.on("close",n=>{n===0?e(o):r(new Error(`Child process exited with code ${n}`))})})}prepareNamedAddresses(s){let e=s.size,r=[];if(e===0)return r;r.push("--named-addresses");let t=[];return s.forEach((a,o)=>{let n=`${o}=${a.toString()}`;t.push(n)}),r.push(t.join(",")),r}parseNamedAddresses(s){let e=new Map;return Object.keys(s).forEach(r=>{let t=s[r];e.set(r,t)}),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 = c; 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 _chunkBHKSQXUZjs = require('../chunk-BHKSQXUZ.js');var _child_process = require('child_process');var _treekill = require('tree-kill'); var _treekill2 = _interopRequireDefault(_treekill);var _os = require('os');var c=class{constructor(){this.MAXIMUM_WAIT_TIME_SEC=75;this.READINESS_ENDPOINT="http://127.0.0.1:8070/";this.process=null}stop(){_optionalChain([this, 'access', _ => _.process, 'optionalAccess', _2 => _2.pid])&&_treekill2.default.call(void 0, this.process.pid)}async run(){await this.checkIfProcessIsUp()||(this.start(),await this.waitUntilProcessIsUp())}start(){let s="npx",e=["aptos","node","run-local-testnet","--force-restart","--assume-yes","--with-indexer-api"],r=_os.platform.call(void 0, ),t;r==="win32"?t=_child_process.spawn.call(void 0, s,e,{shell:!0}):t=_child_process.spawn.call(void 0, s,e),this.process=t,_optionalChain([t, 'access', _3 => _3.stderr, 'optionalAccess', _4 => _4.on, 'call', _5 => _5("data",o=>{let a=o.toString();console.log(a)})]),_optionalChain([t, 'access', _6 => _6.stdout, 'optionalAccess', _7 => _7.on, 'call', _8 => _8("data",o=>{let a=o.toString();console.log(a)})])}async waitUntilProcessIsUp(){let s=await this.checkIfProcessIsUp(),e=Date.now()/1e3,r=e;for(;!s&&e+this.MAXIMUM_WAIT_TIME_SEC>r;)await _chunkBHKSQXUZjs.b.call(void 0, 1e3),s=await this.checkIfProcessIsUp(),r=Date.now()/1e3;if(!s)throw new Error("Process failed to start");return!0}async checkIfProcessIsUp(){try{return(await fetch(this.READINESS_ENDPOINT)).status===200}catch (e2){return!1}}};var u=class{async init(s){let{network:e,profile:r}=s,t=["aptos","init",`--network=${_nullishCoalesce(e, () => ("local"))}`,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return this.runCommand(t)}async compile(s){let{packageDirectoryPath:e,namedAddresses:r}=s,t=["aptos","move","compile","--package-dir",e],o=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(o)),this.runCommand(t)}async test(s){let{packageDirectoryPath:e,namedAddresses:r}=s,t=["aptos","move","test","--package-dir",e],o=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(o)),this.runCommand(t)}async publish(s){let{packageDirectoryPath:e,namedAddresses:r,profile:t}=s,o=["aptos","move","publish","--package-dir",e,`--profile=${_nullishCoalesce(t, () => ("default"))}`],a=this.parseNamedAddresses(r);return o.push(...this.prepareNamedAddresses(a)),this.runCommand(o)}async createObjectAndPublishPackage(s){let{packageDirectoryPath:e,addressName:r,namedAddresses:t,profile:o}=s,a=["aptos","move","create-object-and-publish-package","--package-dir",e,"--address-name",r,`--profile=${_nullishCoalesce(o, () => ("default"))}`],n=this.parseNamedAddresses(t);a.push(...this.prepareNamedAddresses(n));let m=await this.runCommand(a);return{objectAddress:this.extractAddressFromOutput(m.output)}}async upgradeObjectPackage(s){let{packageDirectoryPath:e,objectAddress:r,namedAddresses:t,profile:o}=s,a=["aptos","move","upgrade-object-package","--package-dir",e,"--object-address",r,`--profile=${_nullishCoalesce(o, () => ("default"))}`],n=this.parseNamedAddresses(t);return a.push(...this.prepareNamedAddresses(n)),this.runCommand(a)}async runScript(s){let{compiledScriptPath:e,profile:r}=s,t=["aptos","move","run-script","--compiled-script-path",e,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return this.runCommand(t)}async runCommand(s){return new Promise((e,r)=>{let t=_os.platform.call(void 0, ),o,a="";t==="win32"?o=_child_process.spawn.call(void 0, "npx",s,{shell:!0}):o=_child_process.spawn.call(void 0, "npx",s),o.stdout.on("data",n=>{a+=n.toString()}),o.stdout.pipe(process.stdout),o.stderr.pipe(process.stderr),process.stdin.pipe(o.stdin),o.on("close",n=>{n===0?e({output:a}):r(new Error(`Child process exited with code ${n}`))})})}prepareNamedAddresses(s){let e=s.size,r=[];if(e===0)return r;r.push("--named-addresses");let t=[];return s.forEach((o,a)=>{let n=`${a}=${o.toString()}`;t.push(n)}),r.push(t.join(",")),r}parseNamedAddresses(s){let e=new Map;return Object.keys(s).forEach(r=>{let t=s[r];e.set(r,t)}),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 = c; exports.Move = u;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/cli/localNode.ts","../../../src/cli/move.ts"],"names":["spawn","kill","platform","LocalNode","cliCommand","cliArgs","currentPlatform","childProcess","data","str","operational","start","last","sleep","Move","args","network","profile","packageDirectoryPath","namedAddresses","addressesMap","addressName","output","objectAddress","compiledScriptPath","resolve","reject","stdout","code","totalNames","newArgs","names","value","key","toAppend","address","match"],"mappings":"yCAAA,OAAyC,SAAAA,MAAa,gBACtD,OAAOC,MAAU,YACjB,OAAS,YAAAC,MAAgB,KAIlB,IAAMC,EAAN,KAAgB,CAAhB,cACL,KAAS,sBAAwB,GAEjC,KAAS,mBAAqB,yBAE9B,aAAiD,KAMjD,MAAO,CACA,KAAK,SAAS,KACnBF,EAAK,KAAK,QAAQ,GAAG,CACvB,CAQA,MAAM,KAAM,CACO,MAAM,KAAK,mBAAmB,IAI/C,KAAK,MAAM,EACX,MAAM,KAAK,qBAAqB,EAClC,CAKA,OAAQ,CACN,IAAMG,EAAa,MACbC,EAAU,CAAC,QAAS,OAAQ,oBAAqB,kBAAmB,eAAgB,oBAAoB,EAExGC,EAAkBJ,EAAS,EAC7BK,EAEAD,IAAoB,QACtBC,EAAeP,EAAMI,EAA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BD,CACT,CASQ,oBAAoBX,EAA6E,CACvG,IAAMC,EAAe,IAAI,IAEzB,cAAO,KAAKD,CAAc,EAAE,QAASc,GAAQ,CAC3C,IAAME,EAAUhB,EAAec,CAAG,EAClCb,EAAa,IAAIa,EAAKE,CAAO,CAC/B,CAAC,EAEMf,CACT,CAQQ,yBAAyBE,EAAwB,CACvD,IAAMc,EAAQd,EAAO,MAAM,sEAAsE,EACjG,GAAIc,EACF,OAAOA,EAAM,CAAC,EAEhB,MAAM,IAAI,MAAM,8CAA8C,CAChE,CACF","sourcesContent":["import { ChildProcessWithoutNullStreams, spawn } from \"child_process\";\nimport kill from \"tree-kill\";\nimport { platform } from \"os\";\n\nimport { sleep } from \"../utils/helpers\";\n\nexport class LocalNode {\n readonly MAXIMUM_WAIT_TIME_SEC = 75;\n\n readonly READINESS_ENDPOINT = \"http://127.0.0.1:8070/\";\n\n process: ChildProcessWithoutNullStreams | null = null;\n\n /**\n * kills all the descendent processes\n * of the node process, including the node process itself\n */\n stop() {\n if (!this.process?.pid) return;\n kill(this.process.pid);\n }\n\n /**\n * Runs a local testnet and waits for process to be up.\n *\n * If local node process is already up it returns and does\n * not start the process\n */\n async run() {\n const nodeIsUp = await this.checkIfProcessIsUp();\n if (nodeIsUp) {\n return;\n }\n this.start();\n await this.waitUntilProcessIsUp();\n }\n\n /**\n * Starts the local testnet by running the aptos node run-local-testnet command\n */\n start() {\n const cliCommand = \"npx\";\n const cliArgs = [\"aptos\", \"node\", \"run-local-testnet\", \"--force-restart\", \"--assume-yes\", \"--with-indexer-api\"];\n\n const currentPlatform = platform();\n let childProcess;\n // Check if current OS is windows\n if (currentPlatform === \"win32\") {\n childProcess = spawn(cliCommand, cliArgs, { shell: true });\n } else {\n childProcess = spawn(cliCommand, cliArgs);\n }\n\n this.process = childProcess;\n\n childProcess.stderr?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n // eslint-disable-next-line no-console\n console.log(str);\n });\n\n childProcess.stdout?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n // eslint-disable-next-line no-console\n console.log(str);\n });\n }\n\n /**\n * Waits for the local testnet process to be up\n *\n * @returns Promise<boolean>\n */\n async waitUntilProcessIsUp(): Promise<boolean> {\n let operational = await this.checkIfProcessIsUp();\n const start = Date.now() / 1000;\n let last = start;\n\n while (!operational && start + this.MAXIMUM_WAIT_TIME_SEC > last) {\n // eslint-disable-next-line no-await-in-loop\n await sleep(1000);\n // eslint-disable-next-line no-await-in-loop\n operational = await this.checkIfProcessIsUp();\n last = Date.now() / 1000;\n }\n\n // If we are here it means something blocks the process to start.\n // Might worth checking if another process is running on port 8080\n if (!operational) {\n throw new Error(\"Process failed to start\");\n }\n\n return true;\n }\n\n /**\n * Checks if the local testnet is up\n *\n * @returns Promise<boolean>\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\nexport class Move {\n /**\n * Function to initialize current directory for Aptos\n *\n * Configuration will be pushed into .aptos/config.yaml\n * @param args.network optional Network type argument to use for default settings, default is local\n * @param args.profile optional Profile to use from the config file, default is 'default'\n * This will be used to override associated settings such as the REST URL, the Faucet URL, and the private key arguments.\n *\n * @returns stdout\n */\n async init(args: { network?: Network; profile?: string }): Promise<string> {\n const { network, profile } = args;\n const cliArgs = [\"aptos\", \"init\", `--network=${network ?? \"local\"}`, `--profile=${profile ?? \"default\"}`];\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to compile a package\n *\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\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns stdout\n */\n async compile(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n }): Promise<string> {\n const { packageDirectoryPath, namedAddresses } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to run Move unit tests for a package\n *\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\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns stdout\n */\n async test(args: { packageDirectoryPath: string; namedAddresses: Record<string, AccountAddress> }): Promise<string> {\n const { packageDirectoryPath, namedAddresses } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to publish the modules to the publisher account on the Aptos blockchain\n *\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\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns stdout\n */\n async publish(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<string> {\n const { packageDirectoryPath, namedAddresses, profile } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to create a new object and publish the Move package to it on the Aptos blockchain\n *\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 * @example\n * MoonCoin, please find the actual address name in Move.toml\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\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 * @returns object address\n */\n async createObjectAndPublishPackage(args: {\n packageDirectoryPath: string;\n addressName: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<string> {\n const { packageDirectoryPath, addressName, namedAddresses, profile } = 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 return this.runCommand(cliArgs).then((output) => this.extractAddressFromOutput(output));\n }\n\n /**\n * Function to upgrade a Move package previously published to an object on the Aptos blockchain\n * Caller must be the object owner to call this function\n *\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\n * @example\n * 0x1000\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns stdout\n */\n async upgradeObjectPackage(args: {\n packageDirectoryPath: string;\n objectAddress: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<string> {\n const { packageDirectoryPath, objectAddress, namedAddresses, profile } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to run a Move script, please run compile before running this\n *\n * @param args.compiledScriptPath Path to a compiled Move script bytecode file\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * build/my_package/bytecode_scripts/my_move_script.mv\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns stdout\n */\n async runScript(args: { compiledScriptPath: string; profile?: string }): Promise<string> {\n const { compiledScriptPath, profile } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"run-script\",\n \"--compiled-script-path\",\n compiledScriptPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Run a move command\n *\n * @param args\n * @returns stdout\n */\n // eslint-disable-next-line class-methods-use-this\n private async runCommand(args: Array<string>): Promise<string> {\n return new Promise((resolve, reject) => {\n const currentPlatform = platform();\n let childProcess;\n let stdout = \"\";\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 stdout += data.toString();\n });\n\n childProcess.stdout.pipe(process.stdout);\n childProcess.stderr.pipe(process.stderr);\n process.stdin.pipe(childProcess.stdin);\n\n childProcess.on(\"close\", (code) => {\n if (code === 0) {\n resolve(stdout); // Resolve with stdout if the child process exits successfully\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 seperated by a comma\n *\n * @example\n * input: {'alice' => '0x123', 'bob' => '0x456'}\n * output: \"alice=0x123,bob=0x456\"\n *\n * @param namedAddresses\n * @returns An array of names addresses seperated by a comma\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 * @param namedAddresses\n * @returns Map<name,address>\n */\n // eslint-disable-next-line class-methods-use-this\n private parseNamedAddresses(namedAddresses: Record<string, AccountAddress>): Map<string, AccountAddress> {\n const addressesMap = new Map();\n\n Object.keys(namedAddresses).forEach((key) => {\n const address = namedAddresses[key];\n addressesMap.set(key, address);\n });\n\n return addressesMap;\n }\n\n /**\n * Extract object address from the output\n *\n * @param output\n * @returns object address\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
+ {"version":3,"sources":["../../../src/cli/localNode.ts","../../../src/cli/move.ts"],"names":["spawn","kill","platform","LocalNode","cliCommand","cliArgs","currentPlatform","childProcess","data","str","operational","start","last","sleep","Move","args","network","profile","packageDirectoryPath","namedAddresses","addressesMap","addressName","result","objectAddress","compiledScriptPath","resolve","reject","stdout","code","totalNames","newArgs","names","value","key","toAppend","address","output","match"],"mappings":"yCAAA,OAAyC,SAAAA,MAAa,gBACtD,OAAOC,MAAU,YACjB,OAAS,YAAAC,MAAgB,KAIlB,IAAMC,EAAN,KAAgB,CAAhB,cACL,KAAS,sBAAwB,GAEjC,KAAS,mBAAqB,yBAE9B,aAAiD,KAMjD,MAAO,CACA,KAAK,SAAS,KACnBF,EAAK,KAAK,QAAQ,GAAG,CACvB,CAQA,MAAM,KAAM,CACO,MAAM,KAAK,mBAAmB,IAI/C,KAAK,MAAM,EACX,MAAM,KAAK,qBAAqB,EAClC,CAKA,OAAQ,CACN,IAAMG,EAAa,MACbC,EAAU,CA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Q,CAACa,EAAOC,IAAQ,CACrC,IAAMC,EAAW,GAAGD,CAAG,IAAID,EAAM,SAAS,CAAC,GAC3CD,EAAM,KAAKG,CAAQ,CACrB,CAAC,EACDJ,EAAQ,KAAKC,EAAM,KAAK,GAAG,CAAC,EACrBD,CACT,CASQ,oBAAoBX,EAA6E,CACvG,IAAMC,EAAe,IAAI,IAEzB,cAAO,KAAKD,CAAc,EAAE,QAASc,GAAQ,CAC3C,IAAME,EAAUhB,EAAec,CAAG,EAClCb,EAAa,IAAIa,EAAKE,CAAO,CAC/B,CAAC,EAEMf,CACT,CASQ,yBAAyBgB,EAAwB,CACvD,IAAMC,EAAQD,EAAO,MAAM,sEAAsE,EACjG,GAAIC,EACF,OAAOA,EAAM,CAAC,EAEhB,MAAM,IAAI,MAAM,8CAA8C,CAChE,CACF","sourcesContent":["import { ChildProcessWithoutNullStreams, spawn } from \"child_process\";\nimport kill from \"tree-kill\";\nimport { platform } from \"os\";\n\nimport { sleep } from \"../utils/helpers\";\n\nexport class LocalNode {\n readonly MAXIMUM_WAIT_TIME_SEC = 75;\n\n readonly READINESS_ENDPOINT = \"http://127.0.0.1:8070/\";\n\n process: ChildProcessWithoutNullStreams | null = null;\n\n /**\n * kills all the descendent processes\n * of the node process, including the node process itself\n */\n stop() {\n if (!this.process?.pid) return;\n kill(this.process.pid);\n }\n\n /**\n * Runs a local testnet and waits for process to be up.\n *\n * If local node process is already up it returns and does\n * not start the process\n */\n async run() {\n const nodeIsUp = await this.checkIfProcessIsUp();\n if (nodeIsUp) {\n return;\n }\n this.start();\n await this.waitUntilProcessIsUp();\n }\n\n /**\n * Starts the local testnet by running the aptos node run-local-testnet command\n */\n start() {\n const cliCommand = \"npx\";\n const cliArgs = [\"aptos\", \"node\", \"run-local-testnet\", \"--force-restart\", \"--assume-yes\", \"--with-indexer-api\"];\n\n const currentPlatform = platform();\n let childProcess;\n // Check if current OS is windows\n if (currentPlatform === \"win32\") {\n childProcess = spawn(cliCommand, cliArgs, { shell: true });\n } else {\n childProcess = spawn(cliCommand, cliArgs);\n }\n\n this.process = childProcess;\n\n childProcess.stderr?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n // eslint-disable-next-line no-console\n console.log(str);\n });\n\n childProcess.stdout?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n // eslint-disable-next-line no-console\n console.log(str);\n });\n }\n\n /**\n * Waits for the local testnet process to be up\n *\n * @returns Promise<boolean>\n */\n async waitUntilProcessIsUp(): Promise<boolean> {\n let operational = await this.checkIfProcessIsUp();\n const start = Date.now() / 1000;\n let last = start;\n\n while (!operational && start + this.MAXIMUM_WAIT_TIME_SEC > last) {\n // eslint-disable-next-line no-await-in-loop\n await sleep(1000);\n // eslint-disable-next-line no-await-in-loop\n operational = await this.checkIfProcessIsUp();\n last = Date.now() / 1000;\n }\n\n // If we are here it means something blocks the process to start.\n // Might worth checking if another process is running on port 8080\n if (!operational) {\n throw new Error(\"Process failed to start\");\n }\n\n return true;\n }\n\n /**\n * Checks if the local testnet is up\n *\n * @returns Promise<boolean>\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\nexport class Move {\n /**\n * Function to initialize current directory for Aptos\n *\n * Configuration will be pushed into .aptos/config.yaml\n * @param args.network optional Network type argument to use for default settings, default is local\n * @param args.profile optional Profile to use from the config file, default is 'default'\n * This will be used to override associated settings such as the REST URL, the Faucet URL, and the private key arguments.\n *\n * @returns stdout\n */\n async init(args: { network?: Network; profile?: string }): Promise<{ output: string }> {\n const { network, profile } = args;\n const cliArgs = [\"aptos\", \"init\", `--network=${network ?? \"local\"}`, `--profile=${profile ?? \"default\"}`];\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Function to compile a package\n *\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\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns stdout\n */\n async compile(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to run Move unit tests for a package\n *\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\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n *\n * @returns stdout\n */\n async test(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to publish the modules to the publisher account on the Aptos blockchain\n *\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\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns stdout\n */\n async publish(args: {\n packageDirectoryPath: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, namedAddresses, profile } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to create a new object and publish the Move package to it on the Aptos blockchain\n *\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 * @example\n * MoonCoin, please find the actual address name in Move.toml\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\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 * @returns object address\n */\n async createObjectAndPublishPackage(args: {\n packageDirectoryPath: string;\n addressName: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<{ objectAddress: string }> {\n const { packageDirectoryPath, addressName, namedAddresses, profile } = 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 const result = await this.runCommand(cliArgs);\n return { objectAddress: this.extractAddressFromOutput(result.output) };\n }\n\n /**\n * Function to upgrade a Move package previously published to an object on the Aptos blockchain\n * Caller must be the object owner to call this function\n *\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\n * @example\n * 0x1000\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * {\n * alice:0x1234, bob:0x5678\n * }\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns stdout\n */\n async upgradeObjectPackage(args: {\n packageDirectoryPath: string;\n objectAddress: string;\n namedAddresses: Record<string, AccountAddress>;\n profile?: string;\n }): Promise<{ output: string }> {\n const { packageDirectoryPath, objectAddress, namedAddresses, profile } = 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 return this.runCommand(cliArgs);\n }\n\n /**\n * Function to run a Move script, please run compile before running this\n *\n * @param args.compiledScriptPath Path to a compiled Move script bytecode file\n * @param args.namedAddresses Named addresses for the move binary\n * @example\n * build/my_package/bytecode_scripts/my_move_script.mv\n * @param args.profile optional Profile to use from the config file.\n *\n * @returns stdout\n */\n async runScript(args: { compiledScriptPath: string; profile?: string }): Promise<{ output: string }> {\n const { compiledScriptPath, profile } = args;\n const cliArgs = [\n \"aptos\",\n \"move\",\n \"run-script\",\n \"--compiled-script-path\",\n compiledScriptPath,\n `--profile=${profile ?? \"default\"}`,\n ];\n\n return this.runCommand(cliArgs);\n }\n\n /**\n * Run a move command\n *\n * @param args\n * @returns stdout\n */\n // eslint-disable-next-line class-methods-use-this\n private async runCommand(args: Array<string>): Promise<{ output: string }> {\n return new Promise((resolve, reject) => {\n const currentPlatform = platform();\n let childProcess;\n let stdout = \"\";\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 stdout += data.toString();\n });\n\n childProcess.stdout.pipe(process.stdout);\n childProcess.stderr.pipe(process.stderr);\n process.stdin.pipe(childProcess.stdin);\n\n childProcess.on(\"close\", (code) => {\n if (code === 0) {\n resolve({ output: stdout }); // Resolve with stdout if the child process exits successfully\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 seperated by a comma\n *\n * @example\n * input: {'alice' => '0x123', 'bob' => '0x456'}\n * output: \"alice=0x123,bob=0x456\"\n *\n * @param namedAddresses\n * @returns An array of names addresses seperated by a comma\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 * @param namedAddresses\n * @returns Map<name,address>\n */\n // eslint-disable-next-line class-methods-use-this\n private parseNamedAddresses(namedAddresses: Record<string, AccountAddress>): Map<string, AccountAddress> {\n const addressesMap = new Map();\n\n Object.keys(namedAddresses).forEach((key) => {\n const address = namedAddresses[key];\n addressesMap.set(key, address);\n });\n\n return addressesMap;\n }\n\n /**\n * Extract object address from the output\n *\n * @param output\n * @returns object address\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,5 +1,5 @@
1
- import { S as Serializable, T as TransactionArgument, H as HexInput, a as Serializer, D as Deserializer, E as EntryFunctionArgument, U as Uint8, b as Uint16, c as Uint32, A as AnyNumber, d as Deserializable, e as Hex, f as AuthenticationKeyScheme, g as AccountAddress, h as AnyPublicKeyVariant, i as EphemeralPublicKeyVariant, N as Network, C as Client, j as ClientConfig, F as FullNodeConfig, I as IndexerConfig, k as FaucetConfig, l as AptosSettings, m as EphemeralCertificateVariant, Z as ZkpVariant, L as LedgerVersionArg, M as MoveModuleId, n as ScriptFunctionArgument, o as MoveFunctionId, p as AccountAddressInput, q as MoveStructId, r as MoveValue, s as MoveFunctionGenericTypeParam, t as SigningSchemeInput, u as SigningScheme, v as AccountData, P as PaginationArgs, w as MoveModuleBytecode, x as TransactionResponse, y as MoveResource, z as TokenStandardArg, O as OrderByArg, G as GetAccountOwnedTokensQueryResponse, B as GetAccountOwnedTokensFromCollectionResponse, J as GetAccountCollectionsWithOwnedTokenResponse, K as GetAccountCoinsDataResponse, W as WhereArg, Q as GetObjectDataQueryResponse, R as GetCollectionDataResponse, V as GetTokenDataResponse, X as GetCurrentTokenOwnershipResponse, Y as GetOwnedTokensResponse, _ as GetTokenActivityResponse, $ as GetEventsResponse, a0 as WaitForTransactionOptions, a1 as UserTransactionResponse, a2 as MoveFunction, a3 as GetFungibleAssetMetadataResponse, a4 as GetFungibleAssetActivitiesResponse, a5 as GetCurrentFungibleAssetBalancesResponse, a6 as LedgerInfo, a7 as Block, a8 as GetChainTopUserTransactionsResponse, a9 as GraphqlQuery, aa as GetProcessorStatusResponse, ab as GetANSNameResponse, ac as GetNumberOfDelegatorsResponse, ad as GetDelegatedStakingActivitiesResponse, ae as PendingTransactionResponse, af as CommittedTransactionResponse, ag as GasEstimation, ah as TableItemRequest, ai as GetTableItemsDataResponse, aj as GetTableItemsMetadataResponse, ak as AptosRequest, al as ClientRequest, am as ClientResponse, an as MimeType } from './accountAddress-NYtf3uZq.js';
2
- export { aA as AccountAuthenticatorVariant, bg as AccountSignature, ar as AddressInvalidReason, aB as AnySignatureVariant, aP as BlockMetadataTransactionResponse, aG as ClientHeadersType, aZ as DecodedTableData, a_ as DeletedTableData, bD as DeriveScheme, bj as DirectWriteSet, b0 as EntryFunctionPayloadResponse, aC as EphemeralSignatureVariant, bl as Event, bk as EventGuid, bG as GenerateAccount, bE as GenerateAccountWithEd25519, bF as GenerateAccountWithSingleSignerSecp256k1Key, b3 as GenesisPayload, aO as GenesisTransactionResponse, au as HexInvalidReason, by as MoveAbility, bs as MoveAddressType, bx as MoveFunctionVisibility, bA as MoveModule, bt as MoveObjectType, bu as MoveOptionType, b4 as MoveScriptBytecode, bB as MoveStruct, bz as MoveStructField, bv as MoveStructType, bw as MoveType, bq as MoveUint128Type, bn as MoveUint16Type, br as MoveUint256Type, bo as MoveUint32Type, bp as MoveUint64Type, bm as MoveUint8Type, b2 as MultisigPayloadResponse, bP as NetworkToChainId, bM as NetworkToFaucetAPI, bK as NetworkToIndexerAPI, bQ as NetworkToNetworkName, bL as NetworkToNodeAPI, bN as NetworkToPepperAPI, bO as NetworkToProverAPI, bH as OrderBy, bI as OrderByValue, as as ParsingError, at as ParsingResult, bC as RoleType, b1 as ScriptPayloadResponse, aw as ScriptTransactionArgumentVariants, bi as ScriptWriteSet, aQ as StateCheckpointTransactionResponse, bJ as TokenStandard, az as TransactionAuthenticatorVariant, bb as TransactionEd25519Signature, bf as TransactionFeePayerSignature, be as TransactionMultiAgentSignature, bd as TransactionMultiEd25519Signature, a$ as TransactionPayloadResponse, ax as TransactionPayloadVariants, aH as TransactionResponseType, bc as TransactionSecp256k1Signature, b5 as TransactionSignature, ay as TransactionVariants, av as TypeTagVariants, aE as Uint128, aF as Uint256, aD as Uint64, aR as ValidatorTransactionResponse, bh as WriteSet, aS as WriteSetChange, aT as WriteSetChangeDeleteModule, aU as WriteSetChangeDeleteResource, aV as WriteSetChangeDeleteTableItem, aW as WriteSetChangeWriteModule, aX as WriteSetChangeWriteResource, aY as WriteSetChangeWriteTableItem, ao as ensureBoolean, aL as isBlockMetadataTransactionResponse, b6 as isEd25519Signature, b9 as isFeePayerSignature, aK as isGenesisTransactionResponse, b8 as isMultiAgentSignature, ba as isMultiEd25519Signature, aI as isPendingTransactionResponse, b7 as isSecp256k1Signature, aM as isStateCheckpointTransactionResponse, aJ as isUserTransactionResponse, aN as isValidatorTransactionResponse, ap as outOfRangeErrorMessage, aq as validateNumberInRange } from './accountAddress-NYtf3uZq.js';
1
+ import { S as Serializable, T as TransactionArgument, H as HexInput, a as Serializer, D as Deserializer, E as EntryFunctionArgument, U as Uint8, b as Uint16, c as Uint32, A as AnyNumber, d as Deserializable, e as Hex, f as AuthenticationKeyScheme, g as AccountAddress, h as AnyPublicKeyVariant, i as EphemeralPublicKeyVariant, N as Network, C as Client, j as ClientConfig, F as FullNodeConfig, I as IndexerConfig, k as FaucetConfig, l as AptosSettings, m as EphemeralCertificateVariant, Z as ZkpVariant, L as LedgerVersionArg, M as MoveModuleId, n as ScriptFunctionArgument, o as MoveFunctionId, p as AccountAddressInput, q as MoveStructId, r as MoveValue, s as MoveFunctionGenericTypeParam, t as SigningSchemeInput, u as SigningScheme, v as AccountData, P as PaginationArgs, w as MoveModuleBytecode, x as TransactionResponse, y as MoveResource, z as TokenStandardArg, O as OrderByArg, G as GetAccountOwnedTokensQueryResponse, B as GetAccountOwnedTokensFromCollectionResponse, J as GetAccountCollectionsWithOwnedTokenResponse, K as GetAccountCoinsDataResponse, W as WhereArg, Q as GetObjectDataQueryResponse, R as GetCollectionDataResponse, V as GetTokenDataResponse, X as GetCurrentTokenOwnershipResponse, Y as GetOwnedTokensResponse, _ as GetTokenActivityResponse, $ as GetEventsResponse, a0 as WaitForTransactionOptions, a1 as UserTransactionResponse, a2 as MoveFunction, a3 as GetFungibleAssetMetadataResponse, a4 as GetFungibleAssetActivitiesResponse, a5 as GetCurrentFungibleAssetBalancesResponse, a6 as LedgerInfo, a7 as Block, a8 as GetChainTopUserTransactionsResponse, a9 as GraphqlQuery, aa as GetProcessorStatusResponse, ab as GetANSNameResponse, ac as GetNumberOfDelegatorsResponse, ad as GetDelegatedStakingActivitiesResponse, ae as PendingTransactionResponse, af as CommittedTransactionResponse, ag as GasEstimation, ah as TableItemRequest, ai as GetTableItemsDataResponse, aj as GetTableItemsMetadataResponse, ak as AptosRequest, al as ClientRequest, am as ClientResponse, an as MimeType } from './accountAddress-D9blTwwp.js';
2
+ export { aA as AccountAuthenticatorVariant, bj as AccountSignature, ar as AddressInvalidReason, aB as AnySignatureVariant, aT as BlockEndInfo, aU as BlockEpilogueTransactionResponse, aQ as BlockMetadataTransactionResponse, aG as ClientHeadersType, b0 as DecodedTableData, b1 as DeletedTableData, bG as DeriveScheme, bm as DirectWriteSet, b3 as EntryFunctionPayloadResponse, aC as EphemeralSignatureVariant, bo as Event, bn as EventGuid, bJ as GenerateAccount, bH as GenerateAccountWithEd25519, bI as GenerateAccountWithSingleSignerSecp256k1Key, b6 as GenesisPayload, aP as GenesisTransactionResponse, au as HexInvalidReason, bB as MoveAbility, bv as MoveAddressType, bA as MoveFunctionVisibility, bD as MoveModule, bw as MoveObjectType, bx as MoveOptionType, b7 as MoveScriptBytecode, bE as MoveStruct, bC as MoveStructField, by as MoveStructType, bz as MoveType, bt as MoveUint128Type, bq as MoveUint16Type, bu as MoveUint256Type, br as MoveUint32Type, bs as MoveUint64Type, bp as MoveUint8Type, b5 as MultisigPayloadResponse, bS as NetworkToChainId, bP as NetworkToFaucetAPI, bN as NetworkToIndexerAPI, bT as NetworkToNetworkName, bO as NetworkToNodeAPI, bQ as NetworkToPepperAPI, bR as NetworkToProverAPI, bK as OrderBy, bL as OrderByValue, as as ParsingError, at as ParsingResult, bF as RoleType, b4 as ScriptPayloadResponse, aw as ScriptTransactionArgumentVariants, bl as ScriptWriteSet, aR as StateCheckpointTransactionResponse, bM as TokenStandard, az as TransactionAuthenticatorVariant, be as TransactionEd25519Signature, bi as TransactionFeePayerSignature, bh as TransactionMultiAgentSignature, bg as TransactionMultiEd25519Signature, b2 as TransactionPayloadResponse, ax as TransactionPayloadVariants, aH as TransactionResponseType, bf as TransactionSecp256k1Signature, b8 as TransactionSignature, ay as TransactionVariants, av as TypeTagVariants, aE as Uint128, aF as Uint256, aD as Uint64, aS as ValidatorTransactionResponse, bk as WriteSet, aV as WriteSetChange, aW as WriteSetChangeDeleteModule, aX as WriteSetChangeDeleteResource, aY as WriteSetChangeDeleteTableItem, aZ as WriteSetChangeWriteModule, a_ as WriteSetChangeWriteResource, a$ as WriteSetChangeWriteTableItem, ao as ensureBoolean, aO as isBlockEpilogueTransactionResponse, aL as isBlockMetadataTransactionResponse, b9 as isEd25519Signature, bc as isFeePayerSignature, aK as isGenesisTransactionResponse, bb as isMultiAgentSignature, bd as isMultiEd25519Signature, aI as isPendingTransactionResponse, ba as isSecp256k1Signature, aM as isStateCheckpointTransactionResponse, aJ as isUserTransactionResponse, aN as isValidatorTransactionResponse, ap as outOfRangeErrorMessage, aq as validateNumberInRange } from './accountAddress-D9blTwwp.js';
3
3
  import EventEmitter from 'eventemitter3';
4
4
 
5
5
  type Maybe<T> = T | null;
@@ -201,7 +201,7 @@ declare enum CurrentAptosNamesSelectColumnCurrentAptosNamesAggregateBoolExpBoolO
201
201
  /** column name */
202
202
  IsPrimary = "is_primary"
203
203
  }
204
- /** Boolean expression to filter rows from the table "current_fungible_asset_balances". All fields are combined with a logical 'AND'. */
204
+ /** Boolean expression to filter rows from the table "current_unified_fungible_asset_balances_to_be_renamed". All fields are combined with a logical 'AND'. */
205
205
  type CurrentFungibleAssetBalancesBoolExp = {
206
206
  _and?: InputMaybe<Array<CurrentFungibleAssetBalancesBoolExp>>;
207
207
  _not?: InputMaybe<CurrentFungibleAssetBalancesBoolExp>;
@@ -2079,6 +2079,35 @@ declare class AccountAuthenticatorMultiKey extends AccountAuthenticator {
2079
2079
  static load(deserializer: Deserializer): AccountAuthenticatorMultiKey;
2080
2080
  }
2081
2081
 
2082
+ /**
2083
+ * Creates an object address from creator address and seed
2084
+ *
2085
+ * @param creatorAddress The object creator account address
2086
+ * @param seed The seed in either Uint8Array | string type
2087
+ *
2088
+ * @returns The object account address
2089
+ */
2090
+ declare const createObjectAddress: (creatorAddress: AccountAddress, seed: Uint8Array | string) => AccountAddress;
2091
+ /**
2092
+ * Creates an resource address from creator address and seed
2093
+ *
2094
+ * @param creatorAddress The creator account address
2095
+ * @param seed The seed in either Uint8Array | string type
2096
+ *
2097
+ * @returns The resource account address
2098
+ */
2099
+ declare const createResourceAddress: (creatorAddress: AccountAddress, seed: Uint8Array | string) => AccountAddress;
2100
+ /**
2101
+ * Creates a token object address from creator address, collection name and token name
2102
+ *
2103
+ * @param creatorAddress The token creator account address
2104
+ * @param collectionName The collection name
2105
+ * @param tokenName The token name
2106
+ *
2107
+ * @returns The token account address
2108
+ */
2109
+ declare const createTokenAddress: (creatorAddress: AccountAddress, collectionName: string, tokenName: string) => AccountAddress;
2110
+
2082
2111
  /**
2083
2112
  * Representation of a ChainId that can serialized and deserialized
2084
2113
  */
@@ -3447,9 +3476,20 @@ declare class KeylessAccount extends Serializable implements Account$1 {
3447
3476
  * @returns KeylessSignature
3448
3477
  */
3449
3478
  signTransaction(transaction: AnyRawTransaction): KeylessSignature;
3479
+ /**
3480
+ * Note - This function is currently incomplete and should only be used to verify ownership of the KeylessAccount
3481
+ *
3482
+ * Verifies a signature given the message.
3483
+ *
3484
+ * TODO: Groth16 proof verification
3485
+ *
3486
+ * @param args.message the message that was signed.
3487
+ * @param args.signature the KeylessSignature to verify
3488
+ * @returns boolean
3489
+ */
3450
3490
  verifySignature(args: {
3451
3491
  message: HexInput;
3452
- signature: Signature;
3492
+ signature: KeylessSignature;
3453
3493
  }): boolean;
3454
3494
  static fromBytes(bytes: Uint8Array): KeylessAccount;
3455
3495
  static create(args: {
@@ -3870,12 +3910,15 @@ declare class Account {
3870
3910
  *
3871
3911
  * @param args.accountAddress The account address we want to get the total count for
3872
3912
  * @param args.coinType The coin type to query
3913
+ * @param args.faMetadataAddress The fungible asset metadata address to query.
3914
+ * Note: coinType will automatically fill this in if not provided when migrated to fungible assets
3873
3915
  * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
3874
3916
  * @returns Current amount of account's coin
3875
3917
  */
3876
3918
  getAccountCoinAmount(args: {
3877
3919
  accountAddress: AccountAddressInput;
3878
- coinType: MoveStructId;
3920
+ coinType?: MoveStructId;
3921
+ faMetadataAddress?: AccountAddressInput;
3879
3922
  minimumLedgerVersion?: AnyNumber;
3880
3923
  }): Promise<number>;
3881
3924
  /**
@@ -6383,6 +6426,11 @@ interface AptosResponse<Req, Res> {
6383
6426
  config?: any;
6384
6427
  request?: Req;
6385
6428
  }
6429
+ type AptosApiErrorOpts = {
6430
+ apiType: AptosApiType;
6431
+ aptosRequest: AptosRequest;
6432
+ aptosResponse: AptosResponse<any, any>;
6433
+ };
6386
6434
  /**
6387
6435
  * The type returned from an API error
6388
6436
  *
@@ -6399,7 +6447,8 @@ declare class AptosApiError extends Error {
6399
6447
  readonly statusText: string;
6400
6448
  readonly data: any;
6401
6449
  readonly request: AptosRequest;
6402
- constructor(request: AptosRequest, response: AptosResponse<any, any>, message: string);
6450
+ /** @internal this constructor is for sdk internal use - do not instantiate outside of the SDK codebase */
6451
+ constructor({ apiType, aptosRequest, aptosResponse }: AptosApiErrorOpts);
6403
6452
  }
6404
6453
 
6405
6454
  type DeserializableClass<T extends Serializable> = {
@@ -6422,11 +6471,11 @@ declare function request<Req, Res>(options: ClientRequest<Req>, client: Client):
6422
6471
  /**
6423
6472
  * The main function to use when doing an API request.
6424
6473
  *
6425
- * @param options AptosRequest
6474
+ * @param aptosRequestOpts AptosRequest
6426
6475
  * @param aptosConfig The config information for the SDK client instance
6427
6476
  * @returns the response or AptosApiError
6428
6477
  */
6429
- declare function aptosRequest<Req extends {}, Res extends {}>(options: AptosRequest, aptosConfig: AptosConfig, apiType: AptosApiType): Promise<AptosResponse<Req, Res>>;
6478
+ declare function aptosRequest<Req extends {}, Res extends {}>(aptosRequestOpts: AptosRequest, aptosConfig: AptosConfig, apiType: AptosApiType): Promise<AptosResponse<Req, Res>>;
6430
6479
 
6431
6480
  type GetRequestOptions = {
6432
6481
  /**
@@ -6538,4 +6587,4 @@ declare function postAptosFaucet<Req extends {}, Res extends {}>(options: PostAp
6538
6587
  declare function postAptosPepperService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
6539
6588
  declare function postAptosProvingService<Req extends {}, Res extends {}>(options: PostAptosRequestOptions): Promise<AptosResponse<Req, Res>>;
6540
6589
 
6541
- export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_HARDENED_REGEX, Account$1 as Account, AccountAddress, AccountAddressInput, AccountAuthenticator, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorSingleKey, AccountData, AccountPublicKey, AccountSequenceNumber, AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, AptosRequest, type AptosResponse, AptosSettings, AuthenticationKey, AuthenticationKeyScheme, Block, Bool, CKDPriv, ChainId, Client, ClientConfig, ClientRequest, ClientResponse, CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, type DerivedKeys, Deserializable, type DeserializableClass, Deserializer, EPK_HORIZON_SECS, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, EphemeralCertificate, EphemeralCertificateVariant, EphemeralKeyPair, EphemeralPublicKey, EphemeralPublicKeyVariant, EphemeralSignature, type ExecutionFinishEventData, type FailureEventData, FaucetConfig, FeePayerRawTransaction, FixedBytes, FullNodeConfig, type FunctionABI, GasEstimation, type GenerateAccountArgs, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, type GetRequestOptions, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, Groth16Zkp, HARDENED_OFFSET, Hex, HexInput, Identifier, IndexerConfig, type InputEntryFunctionData, type InputEntryFunctionDataWithABI, type InputEntryFunctionDataWithRemoteABI, type InputGenerateMultiAgentRawTransactionArgs, type InputGenerateMultiAgentRawTransactionData, type InputGenerateRawTransactionArgs, type InputGenerateSingleSignerRawTransactionArgs, type InputGenerateSingleSignerRawTransactionData, type InputGenerateTransactionData, type InputGenerateTransactionOptions, type InputGenerateTransactionPayloadData, type InputGenerateTransactionPayloadDataWithABI, type InputGenerateTransactionPayloadDataWithRemoteABI, type InputMultiSigData, type InputMultiSigDataWithABI, type InputMultiSigDataWithRemoteABI, type InputScriptData, type InputSimulateTransactionData, type InputSimulateTransactionOptions, type InputSubmitTransactionData, type InputViewFunctionData, type InputViewFunctionDataWithABI, type InputViewFunctionDataWithRemoteABI, type InputViewFunctionJsonData, KeyType, KeylessAccount, KeylessConfiguration, KeylessPublicKey, KeylessSignature, LedgerInfo, LedgerVersionArg, MAX_AUD_VAL_BYTES, MAX_COMMITED_EPK_BYTES, MAX_EXTRA_FIELD_BYTES, MAX_ISS_VAL_BYTES, MAX_JWT_HEADER_B64_BYTES, MAX_UID_KEY_BYTES, MAX_UID_VAL_BYTES, MimeType, ModuleId, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionId, MoveModuleBytecode, MoveModuleId, MoveOption, MoveResource, MoveString, MoveStructId, MoveValue, MoveVector, MultiAgentRawTransaction, MultiAgentTransaction, MultiEd25519PublicKey, MultiEd25519Signature, MultiKey, MultiKeyAccount, MultiKeySignature, MultiSig, MultiSigTransactionPayload, Network, OrderByArg, PaginationArgs, PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, type PrivateKey, type PrivateKeyFromDerivationPathArgs, ProcessorType, type ProofFetchCallback, type ProofFetchEvents, type ProofFetchFailure, type ProofFetchStatus, type ProofFetchSuccess, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RotationProofChallenge, Script, ScriptFunctionArgument, type ScriptFunctionArgumentTypes, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, StructTag, type SuccessEventData, TableItemRequest, TokenStandardArg, TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, TransactionPayloadScript, TransactionResponse, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, type TypeArgument, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVector, U128, U16, U256, U32, U64, U8, Uint16, Uint32, Uint8, UserTransactionResponse, type VerifyEd25519SignatureArgs, type VerifyMultiKeySignatureArgs, type VerifySignatureArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, type ViewFunctionJsonPayload, WaitForTransactionOptions, WhereArg, ZeroKnowledgeSig, ZkProof, ZkpVariant, aptosCoinStructTag, aptosRequest, buildTransaction, checkOrConvertArgument, convertArgument, convertNumber, deriveKey, deriveTransactionType, deserializeFromScriptArgument, fetchEntryFunctionAbi, fetchFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getFunctionParts, getKeylessConfig, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBool, isEmptyOption, isEncodedEntryFunctionArgument, isLargeNumber, isNumber, isScriptDataInput, isString, isValidBIP44Path, isValidHardenedPath, mnemonicToSeed, normalizeBundle, objectStructTag, optionStructTag, paginateWithCursor, parseTypeTag, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch };
6590
+ export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_HARDENED_REGEX, Account$1 as Account, AccountAddress, AccountAddressInput, AccountAuthenticator, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorSingleKey, AccountData, AccountPublicKey, AccountSequenceNumber, AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, AptosRequest, type AptosResponse, AptosSettings, AuthenticationKey, AuthenticationKeyScheme, Block, Bool, CKDPriv, ChainId, Client, ClientConfig, ClientRequest, ClientResponse, CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, type DerivedKeys, Deserializable, type DeserializableClass, Deserializer, EPK_HORIZON_SECS, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, EphemeralCertificate, EphemeralCertificateVariant, EphemeralKeyPair, EphemeralPublicKey, EphemeralPublicKeyVariant, EphemeralSignature, type ExecutionFinishEventData, type FailureEventData, FaucetConfig, FeePayerRawTransaction, FixedBytes, FullNodeConfig, type FunctionABI, GasEstimation, type GenerateAccountArgs, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, type GetRequestOptions, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, Groth16Zkp, HARDENED_OFFSET, Hex, HexInput, Identifier, IndexerConfig, type InputEntryFunctionData, type InputEntryFunctionDataWithABI, type InputEntryFunctionDataWithRemoteABI, type InputGenerateMultiAgentRawTransactionArgs, type InputGenerateMultiAgentRawTransactionData, type InputGenerateRawTransactionArgs, type InputGenerateSingleSignerRawTransactionArgs, type InputGenerateSingleSignerRawTransactionData, type InputGenerateTransactionData, type InputGenerateTransactionOptions, type InputGenerateTransactionPayloadData, type InputGenerateTransactionPayloadDataWithABI, type InputGenerateTransactionPayloadDataWithRemoteABI, type InputMultiSigData, type InputMultiSigDataWithABI, type InputMultiSigDataWithRemoteABI, type InputScriptData, type InputSimulateTransactionData, type InputSimulateTransactionOptions, type InputSubmitTransactionData, type InputViewFunctionData, type InputViewFunctionDataWithABI, type InputViewFunctionDataWithRemoteABI, type InputViewFunctionJsonData, KeyType, KeylessAccount, KeylessConfiguration, KeylessPublicKey, KeylessSignature, LedgerInfo, LedgerVersionArg, MAX_AUD_VAL_BYTES, MAX_COMMITED_EPK_BYTES, MAX_EXTRA_FIELD_BYTES, MAX_ISS_VAL_BYTES, MAX_JWT_HEADER_B64_BYTES, MAX_UID_KEY_BYTES, MAX_UID_VAL_BYTES, MimeType, ModuleId, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionId, MoveModuleBytecode, MoveModuleId, MoveOption, MoveResource, MoveString, MoveStructId, MoveValue, MoveVector, MultiAgentRawTransaction, MultiAgentTransaction, MultiEd25519PublicKey, MultiEd25519Signature, MultiKey, MultiKeyAccount, MultiKeySignature, MultiSig, MultiSigTransactionPayload, Network, OrderByArg, PaginationArgs, PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, type PrivateKey, type PrivateKeyFromDerivationPathArgs, ProcessorType, type ProofFetchCallback, type ProofFetchEvents, type ProofFetchFailure, type ProofFetchStatus, type ProofFetchSuccess, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RotationProofChallenge, Script, ScriptFunctionArgument, type ScriptFunctionArgumentTypes, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, StructTag, type SuccessEventData, TableItemRequest, TokenStandardArg, TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, TransactionPayloadScript, TransactionResponse, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, type TypeArgument, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVector, U128, U16, U256, U32, U64, U8, Uint16, Uint32, Uint8, UserTransactionResponse, type VerifyEd25519SignatureArgs, type VerifyMultiKeySignatureArgs, type VerifySignatureArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, type ViewFunctionJsonPayload, WaitForTransactionOptions, WhereArg, ZeroKnowledgeSig, ZkProof, ZkpVariant, aptosCoinStructTag, aptosRequest, buildTransaction, checkOrConvertArgument, convertArgument, convertNumber, createObjectAddress, createResourceAddress, createTokenAddress, deriveKey, deriveTransactionType, deserializeFromScriptArgument, fetchEntryFunctionAbi, fetchFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getFunctionParts, getKeylessConfig, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBool, isEmptyOption, isEncodedEntryFunctionArgument, isLargeNumber, isNumber, isScriptDataInput, isString, isValidBIP44Path, isValidHardenedPath, mnemonicToSeed, normalizeBundle, objectStructTag, optionStructTag, paginateWithCursor, parseTypeTag, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch };