@aptos-labs/ts-sdk 1.39.0 → 2.0.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 (344) hide show
  1. package/dist/common/{chunk-66TIRJFD.js → chunk-ZMDE3DNL.js} +3 -3
  2. package/dist/common/{chunk-66TIRJFD.js.map → chunk-ZMDE3DNL.js.map} +1 -1
  3. package/dist/common/cli/index.js +1 -1
  4. package/dist/common/index.d.ts +1 -102
  5. package/dist/common/index.js +31 -31
  6. package/dist/common/index.js.map +1 -1
  7. package/dist/esm/account/AbstractKeylessAccount.d.mts +0 -1
  8. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  9. package/dist/esm/account/AbstractedAccount.d.mts +0 -1
  10. package/dist/esm/account/AbstractedAccount.mjs +1 -1
  11. package/dist/esm/account/Account.d.mts +0 -1
  12. package/dist/esm/account/Account.mjs +1 -1
  13. package/dist/esm/account/AccountUtils.d.mts +0 -1
  14. package/dist/esm/account/AccountUtils.mjs +1 -1
  15. package/dist/esm/account/DerivableAbstractedAccount.d.mts +0 -1
  16. package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
  17. package/dist/esm/account/Ed25519Account.d.mts +0 -1
  18. package/dist/esm/account/Ed25519Account.mjs +1 -1
  19. package/dist/esm/account/EphemeralKeyPair.d.mts +0 -1
  20. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  21. package/dist/esm/account/FederatedKeylessAccount.d.mts +0 -1
  22. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  23. package/dist/esm/account/KeylessAccount.d.mts +0 -1
  24. package/dist/esm/account/KeylessAccount.mjs +1 -1
  25. package/dist/esm/account/MultiEd25519Account.d.mts +0 -1
  26. package/dist/esm/account/MultiEd25519Account.mjs +1 -1
  27. package/dist/esm/account/MultiKeyAccount.d.mts +0 -1
  28. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  29. package/dist/esm/account/SingleKeyAccount.d.mts +0 -1
  30. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  31. package/dist/esm/account/index.d.mts +0 -1
  32. package/dist/esm/account/index.mjs +1 -1
  33. package/dist/esm/account/utils.d.mts +0 -1
  34. package/dist/esm/account/utils.mjs +1 -1
  35. package/dist/esm/api/account/abstraction.d.mts +0 -1
  36. package/dist/esm/api/account/abstraction.mjs +1 -1
  37. package/dist/esm/api/account.d.mts +0 -1
  38. package/dist/esm/api/account.mjs +1 -1
  39. package/dist/esm/api/ans.d.mts +0 -1
  40. package/dist/esm/api/ans.mjs +1 -1
  41. package/dist/esm/api/aptos.d.mts +0 -2
  42. package/dist/esm/api/aptos.mjs +1 -1
  43. package/dist/esm/api/aptosConfig.d.mts +0 -1
  44. package/dist/esm/api/aptosConfig.mjs +1 -1
  45. package/dist/esm/api/coin.d.mts +0 -1
  46. package/dist/esm/api/coin.mjs +1 -1
  47. package/dist/esm/api/digitalAsset.d.mts +0 -1
  48. package/dist/esm/api/digitalAsset.mjs +1 -1
  49. package/dist/esm/api/event.d.mts +0 -1
  50. package/dist/esm/api/event.mjs +1 -1
  51. package/dist/esm/api/faucet.d.mts +0 -1
  52. package/dist/esm/api/faucet.mjs +1 -1
  53. package/dist/esm/api/fungibleAsset.d.mts +0 -1
  54. package/dist/esm/api/fungibleAsset.mjs +1 -1
  55. package/dist/esm/api/general.d.mts +0 -1
  56. package/dist/esm/api/general.mjs +1 -1
  57. package/dist/esm/api/index.d.mts +0 -2
  58. package/dist/esm/api/index.mjs +1 -1
  59. package/dist/esm/api/keyless.d.mts +0 -1
  60. package/dist/esm/api/keyless.mjs +1 -1
  61. package/dist/esm/api/object.d.mts +0 -1
  62. package/dist/esm/api/object.mjs +1 -1
  63. package/dist/esm/api/staking.d.mts +0 -1
  64. package/dist/esm/api/staking.mjs +1 -1
  65. package/dist/esm/api/table.d.mts +0 -1
  66. package/dist/esm/api/table.mjs +1 -1
  67. package/dist/esm/api/transaction.d.mts +0 -2
  68. package/dist/esm/api/transaction.mjs +1 -1
  69. package/dist/esm/api/transactionSubmission/build.d.mts +0 -66
  70. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  71. package/dist/esm/api/transactionSubmission/management.d.mts +0 -1
  72. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  73. package/dist/esm/api/transactionSubmission/sign.d.mts +0 -1
  74. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  75. package/dist/esm/api/transactionSubmission/simulate.d.mts +0 -1
  76. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  77. package/dist/esm/api/transactionSubmission/submit.d.mts +0 -1
  78. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  79. package/dist/esm/api/utils.d.mts +0 -1
  80. package/dist/esm/api/utils.mjs +1 -1
  81. package/dist/esm/bcs/consts.d.mts +0 -1
  82. package/dist/esm/bcs/deserializer.d.mts +0 -1
  83. package/dist/esm/bcs/deserializer.mjs +1 -1
  84. package/dist/esm/bcs/index.d.mts +0 -1
  85. package/dist/esm/bcs/index.mjs +1 -1
  86. package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +0 -1
  87. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  88. package/dist/esm/bcs/serializable/fixedBytes.d.mts +0 -1
  89. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  90. package/dist/esm/bcs/serializable/movePrimitives.d.mts +0 -1
  91. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  92. package/dist/esm/bcs/serializable/moveStructs.d.mts +0 -1
  93. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  94. package/dist/esm/bcs/serializer.d.mts +0 -1
  95. package/dist/esm/bcs/serializer.mjs +1 -1
  96. package/dist/esm/{chunk-KAYKTT4S.mjs → chunk-2UBI3AZJ.mjs} +2 -2
  97. package/dist/esm/{chunk-3IHKQH5O.mjs → chunk-34R7FSQF.mjs} +2 -2
  98. package/dist/esm/{chunk-V7U5Y4AU.mjs → chunk-4JT5AESZ.mjs} +2 -2
  99. package/dist/esm/{chunk-V7U5Y4AU.mjs.map → chunk-4JT5AESZ.mjs.map} +1 -1
  100. package/dist/esm/chunk-5YLNYSBT.mjs +4 -0
  101. package/dist/esm/chunk-5YLNYSBT.mjs.map +1 -0
  102. package/dist/esm/{chunk-25O4L7YR.mjs → chunk-6UZHMEK3.mjs} +2 -2
  103. package/dist/esm/{chunk-6Y6ZO7TS.mjs → chunk-6WDVDEQZ.mjs} +2 -2
  104. package/dist/esm/{chunk-YFFDF22R.mjs → chunk-7DQDJ2SA.mjs} +2 -2
  105. package/dist/esm/{chunk-ZMT2M6YT.mjs → chunk-B563XRSZ.mjs} +2 -2
  106. package/dist/esm/{chunk-JGFKIUG5.mjs → chunk-DLIBG6H7.mjs} +2 -2
  107. package/dist/esm/{chunk-NJN3EAOM.mjs → chunk-EBMEXURY.mjs} +2 -2
  108. package/dist/esm/{chunk-FBCXUC7J.mjs → chunk-EF4FA5I6.mjs} +2 -2
  109. package/dist/esm/chunk-FD6FGKYY.mjs +1 -0
  110. package/dist/esm/{chunk-6PKBXYG3.mjs → chunk-FGFLPH5K.mjs} +2 -2
  111. package/dist/esm/{chunk-SOJ3OG6X.mjs → chunk-G6HENV5D.mjs} +2 -2
  112. package/dist/esm/{chunk-WTLQD6MR.mjs → chunk-G7WH6GQP.mjs} +2 -2
  113. package/dist/esm/chunk-HLF3U7IS.mjs +2 -0
  114. package/dist/esm/{chunk-L33JDCWL.mjs.map → chunk-HLF3U7IS.mjs.map} +1 -1
  115. package/dist/esm/{chunk-BUUV6B4P.mjs → chunk-HNBVYE3N.mjs} +2 -2
  116. package/dist/esm/{chunk-GJ7STZEW.mjs → chunk-HW7TSJI2.mjs} +2 -2
  117. package/dist/esm/{chunk-YQIAWAPY.mjs → chunk-K43K3YG7.mjs} +2 -2
  118. package/dist/esm/{chunk-YQIAWAPY.mjs.map → chunk-K43K3YG7.mjs.map} +1 -1
  119. package/dist/esm/{chunk-ARNW34PP.mjs → chunk-MA4QUN6P.mjs} +2 -2
  120. package/dist/esm/{chunk-WLUXOUZH.mjs → chunk-MT2RJ7H3.mjs} +2 -2
  121. package/dist/esm/{chunk-PRUQZNAP.mjs → chunk-N6YTF76Q.mjs} +2 -2
  122. package/dist/esm/{chunk-C6JRJNK3.mjs → chunk-ORMOQWWH.mjs} +2 -2
  123. package/dist/esm/{chunk-GYVSI3TS.mjs → chunk-RGKRCZ36.mjs} +2 -2
  124. package/dist/esm/chunk-RIRJNQ7B.mjs +2 -0
  125. package/dist/esm/{chunk-P237G6YB.mjs → chunk-SE2VS7WM.mjs} +2 -2
  126. package/dist/esm/{chunk-GQ557FEA.mjs → chunk-TDGLYA35.mjs} +2 -2
  127. package/dist/esm/{chunk-XF6BISPI.mjs → chunk-TLFZOAAB.mjs} +2 -2
  128. package/dist/esm/{chunk-IXYGZ57N.mjs → chunk-TOBQ5UE6.mjs} +2 -2
  129. package/dist/esm/{chunk-GLFZJNF3.mjs → chunk-USB3LA6B.mjs} +2 -2
  130. package/dist/esm/{chunk-Z6KQX6VX.mjs → chunk-WCMW2L3P.mjs} +2 -2
  131. package/dist/esm/{chunk-BYINW7I2.mjs → chunk-WSR5EBJM.mjs} +2 -2
  132. package/dist/esm/chunk-XJJVJOX5.mjs +2 -0
  133. package/dist/esm/{chunk-OYH2T6V5.mjs → chunk-XKUIMGKU.mjs} +2 -2
  134. package/dist/esm/chunk-XTMUMN74.mjs +2 -0
  135. package/dist/esm/chunk-XTMUMN74.mjs.map +1 -0
  136. package/dist/esm/{chunk-BXRBOMHW.mjs → chunk-ZNLOQO4Q.mjs} +2 -2
  137. package/dist/esm/cli/index.d.mts +0 -1
  138. package/dist/esm/cli/index.mjs +1 -1
  139. package/dist/esm/cli/localNode.mjs +1 -1
  140. package/dist/esm/cli/move.d.mts +0 -1
  141. package/dist/esm/client/core.d.mts +0 -1
  142. package/dist/esm/client/core.mjs +1 -1
  143. package/dist/esm/client/get.d.mts +0 -1
  144. package/dist/esm/client/get.mjs +1 -1
  145. package/dist/esm/client/index.d.mts +0 -1
  146. package/dist/esm/client/index.mjs +1 -1
  147. package/dist/esm/client/post.d.mts +0 -1
  148. package/dist/esm/client/post.mjs +1 -1
  149. package/dist/esm/core/account/index.d.mts +0 -1
  150. package/dist/esm/core/account/index.mjs +1 -1
  151. package/dist/esm/core/account/utils/address.d.mts +0 -1
  152. package/dist/esm/core/account/utils/address.mjs +1 -1
  153. package/dist/esm/core/account/utils/index.d.mts +0 -1
  154. package/dist/esm/core/account/utils/index.mjs +1 -1
  155. package/dist/esm/core/accountAddress.d.mts +0 -1
  156. package/dist/esm/core/accountAddress.mjs +1 -1
  157. package/dist/esm/core/authenticationKey.d.mts +0 -1
  158. package/dist/esm/core/authenticationKey.mjs +1 -1
  159. package/dist/esm/core/crypto/abstraction.d.mts +0 -1
  160. package/dist/esm/core/crypto/abstraction.mjs +1 -1
  161. package/dist/esm/core/crypto/ed25519.d.mts +0 -1
  162. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  163. package/dist/esm/core/crypto/ephemeral.d.mts +0 -1
  164. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  165. package/dist/esm/core/crypto/federatedKeyless.d.mts +0 -1
  166. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  167. package/dist/esm/core/crypto/index.d.mts +0 -1
  168. package/dist/esm/core/crypto/index.mjs +1 -1
  169. package/dist/esm/core/crypto/keyless.d.mts +0 -1
  170. package/dist/esm/core/crypto/keyless.mjs +1 -1
  171. package/dist/esm/core/crypto/multiEd25519.d.mts +0 -1
  172. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  173. package/dist/esm/core/crypto/multiKey.d.mts +0 -1
  174. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  175. package/dist/esm/core/crypto/privateKey.d.mts +0 -1
  176. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  177. package/dist/esm/core/crypto/proof.d.mts +0 -1
  178. package/dist/esm/core/crypto/proof.mjs +1 -1
  179. package/dist/esm/core/crypto/publicKey.d.mts +0 -1
  180. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  181. package/dist/esm/core/crypto/secp256k1.d.mts +0 -1
  182. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  183. package/dist/esm/core/crypto/signature.d.mts +0 -1
  184. package/dist/esm/core/crypto/signature.mjs +1 -1
  185. package/dist/esm/core/crypto/singleKey.d.mts +0 -1
  186. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  187. package/dist/esm/core/crypto/utils.d.mts +0 -1
  188. package/dist/esm/core/hex.d.mts +0 -1
  189. package/dist/esm/core/index.d.mts +0 -1
  190. package/dist/esm/core/index.mjs +1 -1
  191. package/dist/esm/errors/index.d.mts +0 -1
  192. package/dist/esm/errors/index.mjs +1 -1
  193. package/dist/esm/index.d.mts +2 -4
  194. package/dist/esm/index.mjs +1 -1
  195. package/dist/esm/internal/abstraction.d.mts +0 -1
  196. package/dist/esm/internal/abstraction.mjs +1 -1
  197. package/dist/esm/internal/account.d.mts +0 -1
  198. package/dist/esm/internal/account.mjs +1 -1
  199. package/dist/esm/internal/ans.d.mts +0 -1
  200. package/dist/esm/internal/ans.mjs +1 -1
  201. package/dist/esm/internal/coin.d.mts +0 -1
  202. package/dist/esm/internal/coin.mjs +1 -1
  203. package/dist/esm/internal/digitalAsset.d.mts +0 -1
  204. package/dist/esm/internal/digitalAsset.mjs +1 -1
  205. package/dist/esm/internal/event.d.mts +0 -1
  206. package/dist/esm/internal/event.mjs +1 -1
  207. package/dist/esm/internal/faucet.d.mts +0 -1
  208. package/dist/esm/internal/faucet.mjs +1 -1
  209. package/dist/esm/internal/fungibleAsset.d.mts +0 -1
  210. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  211. package/dist/esm/internal/general.d.mts +0 -1
  212. package/dist/esm/internal/general.mjs +1 -1
  213. package/dist/esm/internal/keyless.d.mts +0 -1
  214. package/dist/esm/internal/keyless.mjs +1 -1
  215. package/dist/esm/internal/object.d.mts +0 -1
  216. package/dist/esm/internal/object.mjs +1 -1
  217. package/dist/esm/internal/staking.d.mts +0 -1
  218. package/dist/esm/internal/staking.mjs +1 -1
  219. package/dist/esm/internal/table.d.mts +0 -1
  220. package/dist/esm/internal/table.mjs +1 -1
  221. package/dist/esm/internal/transaction.d.mts +0 -1
  222. package/dist/esm/internal/transaction.mjs +1 -1
  223. package/dist/esm/internal/transactionSubmission.d.mts +0 -1
  224. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  225. package/dist/esm/internal/utils/index.d.mts +0 -1
  226. package/dist/esm/internal/utils/index.mjs +1 -1
  227. package/dist/esm/internal/utils/utils.d.mts +0 -1
  228. package/dist/esm/internal/utils/utils.mjs +1 -1
  229. package/dist/esm/internal/view.d.mts +0 -1
  230. package/dist/esm/internal/view.mjs +1 -1
  231. package/dist/esm/transactions/authenticator/account.d.mts +0 -1
  232. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  233. package/dist/esm/transactions/authenticator/index.d.mts +0 -1
  234. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  235. package/dist/esm/transactions/authenticator/transaction.d.mts +0 -1
  236. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  237. package/dist/esm/transactions/index.d.mts +2 -4
  238. package/dist/esm/transactions/index.mjs +1 -1
  239. package/dist/esm/transactions/instances/chainId.d.mts +0 -1
  240. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  241. package/dist/esm/transactions/instances/identifier.d.mts +0 -1
  242. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  243. package/dist/esm/transactions/instances/index.d.mts +0 -1
  244. package/dist/esm/transactions/instances/index.mjs +1 -1
  245. package/dist/esm/transactions/instances/moduleId.d.mts +0 -1
  246. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  247. package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +0 -1
  248. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  249. package/dist/esm/transactions/instances/rawTransaction.d.mts +0 -1
  250. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  251. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +0 -1
  252. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  253. package/dist/esm/transactions/instances/signedTransaction.d.mts +0 -1
  254. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  255. package/dist/esm/transactions/instances/simpleTransaction.d.mts +0 -1
  256. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  257. package/dist/esm/transactions/instances/transactionArgument.d.mts +0 -1
  258. package/dist/esm/transactions/instances/transactionPayload.d.mts +0 -1
  259. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  260. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +0 -1
  261. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  262. package/dist/esm/transactions/management/index.d.mts +0 -1
  263. package/dist/esm/transactions/management/index.mjs +1 -1
  264. package/dist/esm/transactions/management/transactionWorker.d.mts +0 -1
  265. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  266. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +0 -1
  267. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  268. package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -2
  269. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  270. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -13
  271. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  272. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +0 -1
  273. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  274. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +0 -1
  275. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  276. package/dist/esm/transactions/typeTag/index.d.mts +0 -1
  277. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  278. package/dist/esm/transactions/typeTag/parser.d.mts +0 -1
  279. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  280. package/dist/esm/transactions/types.d.mts +1 -10
  281. package/dist/esm/types/index.d.mts +0 -1
  282. package/dist/esm/types/index.mjs +1 -1
  283. package/dist/esm/types/types.d.mts +0 -1
  284. package/dist/esm/utils/helpers.d.mts +0 -1
  285. package/dist/esm/utils/helpers.mjs +1 -1
  286. package/dist/esm/utils/index.d.mts +0 -1
  287. package/dist/esm/utils/index.mjs +1 -1
  288. package/dist/esm/utils/normalizeBundle.d.mts +0 -1
  289. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  290. package/dist/esm/version.d.mts +1 -1
  291. package/dist/esm/version.mjs +1 -1
  292. package/package.json +2 -3
  293. package/src/api/aptosConfig.ts +9 -0
  294. package/src/api/transactionSubmission/build.ts +2 -85
  295. package/src/core/crypto/ed25519.ts +1 -1
  296. package/src/core/crypto/secp256k1.ts +1 -1
  297. package/src/transactions/index.ts +0 -1
  298. package/src/transactions/transactionBuilder/remoteAbi.ts +1 -26
  299. package/src/transactions/types.ts +0 -11
  300. package/src/types/index.ts +0 -1
  301. package/src/version.ts +1 -1
  302. package/dist/esm/chunk-3OLFJ65O.mjs +0 -2
  303. package/dist/esm/chunk-3OLFJ65O.mjs.map +0 -1
  304. package/dist/esm/chunk-F2ZTBAJJ.mjs +0 -2
  305. package/dist/esm/chunk-F2ZTBAJJ.mjs.map +0 -1
  306. package/dist/esm/chunk-L33JDCWL.mjs +0 -2
  307. package/dist/esm/chunk-OYUW6ZN2.mjs +0 -2
  308. package/dist/esm/chunk-TAEOFYOF.mjs +0 -4
  309. package/dist/esm/chunk-TAEOFYOF.mjs.map +0 -1
  310. package/dist/esm/chunk-TUZHLTDU.mjs +0 -2
  311. package/dist/esm/transactions/scriptComposer/index.d.mts +0 -53
  312. package/dist/esm/transactions/scriptComposer/index.mjs +0 -2
  313. package/src/transactions/scriptComposer/index.ts +0 -102
  314. /package/dist/esm/{chunk-KAYKTT4S.mjs.map → chunk-2UBI3AZJ.mjs.map} +0 -0
  315. /package/dist/esm/{chunk-3IHKQH5O.mjs.map → chunk-34R7FSQF.mjs.map} +0 -0
  316. /package/dist/esm/{chunk-25O4L7YR.mjs.map → chunk-6UZHMEK3.mjs.map} +0 -0
  317. /package/dist/esm/{chunk-6Y6ZO7TS.mjs.map → chunk-6WDVDEQZ.mjs.map} +0 -0
  318. /package/dist/esm/{chunk-YFFDF22R.mjs.map → chunk-7DQDJ2SA.mjs.map} +0 -0
  319. /package/dist/esm/{chunk-ZMT2M6YT.mjs.map → chunk-B563XRSZ.mjs.map} +0 -0
  320. /package/dist/esm/{chunk-JGFKIUG5.mjs.map → chunk-DLIBG6H7.mjs.map} +0 -0
  321. /package/dist/esm/{chunk-NJN3EAOM.mjs.map → chunk-EBMEXURY.mjs.map} +0 -0
  322. /package/dist/esm/{chunk-FBCXUC7J.mjs.map → chunk-EF4FA5I6.mjs.map} +0 -0
  323. /package/dist/esm/{transactions/scriptComposer/index.mjs.map → chunk-FD6FGKYY.mjs.map} +0 -0
  324. /package/dist/esm/{chunk-6PKBXYG3.mjs.map → chunk-FGFLPH5K.mjs.map} +0 -0
  325. /package/dist/esm/{chunk-SOJ3OG6X.mjs.map → chunk-G6HENV5D.mjs.map} +0 -0
  326. /package/dist/esm/{chunk-WTLQD6MR.mjs.map → chunk-G7WH6GQP.mjs.map} +0 -0
  327. /package/dist/esm/{chunk-BUUV6B4P.mjs.map → chunk-HNBVYE3N.mjs.map} +0 -0
  328. /package/dist/esm/{chunk-GJ7STZEW.mjs.map → chunk-HW7TSJI2.mjs.map} +0 -0
  329. /package/dist/esm/{chunk-ARNW34PP.mjs.map → chunk-MA4QUN6P.mjs.map} +0 -0
  330. /package/dist/esm/{chunk-WLUXOUZH.mjs.map → chunk-MT2RJ7H3.mjs.map} +0 -0
  331. /package/dist/esm/{chunk-PRUQZNAP.mjs.map → chunk-N6YTF76Q.mjs.map} +0 -0
  332. /package/dist/esm/{chunk-C6JRJNK3.mjs.map → chunk-ORMOQWWH.mjs.map} +0 -0
  333. /package/dist/esm/{chunk-GYVSI3TS.mjs.map → chunk-RGKRCZ36.mjs.map} +0 -0
  334. /package/dist/esm/{chunk-TUZHLTDU.mjs.map → chunk-RIRJNQ7B.mjs.map} +0 -0
  335. /package/dist/esm/{chunk-P237G6YB.mjs.map → chunk-SE2VS7WM.mjs.map} +0 -0
  336. /package/dist/esm/{chunk-GQ557FEA.mjs.map → chunk-TDGLYA35.mjs.map} +0 -0
  337. /package/dist/esm/{chunk-XF6BISPI.mjs.map → chunk-TLFZOAAB.mjs.map} +0 -0
  338. /package/dist/esm/{chunk-IXYGZ57N.mjs.map → chunk-TOBQ5UE6.mjs.map} +0 -0
  339. /package/dist/esm/{chunk-GLFZJNF3.mjs.map → chunk-USB3LA6B.mjs.map} +0 -0
  340. /package/dist/esm/{chunk-Z6KQX6VX.mjs.map → chunk-WCMW2L3P.mjs.map} +0 -0
  341. /package/dist/esm/{chunk-BYINW7I2.mjs.map → chunk-WSR5EBJM.mjs.map} +0 -0
  342. /package/dist/esm/{chunk-OYUW6ZN2.mjs.map → chunk-XJJVJOX5.mjs.map} +0 -0
  343. /package/dist/esm/{chunk-OYH2T6V5.mjs.map → chunk-XKUIMGKU.mjs.map} +0 -0
  344. /package/dist/esm/{chunk-BXRBOMHW.mjs.map → chunk-ZNLOQO4Q.mjs.map} +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 N=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var h=(r,e,t,n)=>{for(var s=n>1?void 0:n?C(e,t):e,o=r.length-1,c;o>=0;o--)(c=r[o])&&(s=(n?c(e,t,s):c(s))||s);return n&&s&&N(e,t,s),s};var u=class extends Error{constructor(e,t){super(e),this.invalidReason=t}};var _utils = require('@noble/hashes/utils');var H=(n=>(n.TOO_SHORT="too_short",n.INVALID_LENGTH="invalid_length",n.INVALID_HEX_CHARS="invalid_hex_chars",n))(H||{}),_= exports.j =class r{constructor(e){this.data=e}toUint8Array(){return this.data}toStringWithoutPrefix(){return _utils.bytesToHex.call(void 0, this.data)}toString(){return`0x${this.toStringWithoutPrefix()}`}static fromHexString(e){let t=e;if(t.startsWith("0x")&&(t=t.slice(2)),t.length===0)throw new u("Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.","too_short");if(t.length%2!==0)throw new u("Hex string must be an even number of hex characters.","invalid_length");try{return new r(_utils.hexToBytes.call(void 0, t))}catch(n){throw new u(`Hex string contains invalid hex characters: ${_optionalChain([n, 'optionalAccess', _2 => _2.message])}`,"invalid_hex_chars")}}static fromHexInput(e){return e instanceof Uint8Array?new r(e):r.fromHexString(e)}static hexInputToUint8Array(e){return e instanceof Uint8Array?e:r.fromHexString(e).toUint8Array()}static hexInputToString(e){return r.fromHexInput(e).toString()}static hexInputToStringWithoutPrefix(e){return r.fromHexInput(e).toStringWithoutPrefix()}static isValid(e){try{return r.fromHexString(e),{valid:!0}}catch(t){return{valid:!1,invalidReason:_optionalChain([t, 'optionalAccess', _3 => _3.invalidReason]),invalidReasonMessage:_optionalChain([t, 'optionalAccess', _4 => _4.message])}}}equals(e){return this.data.length!==e.data.length?!1:this.data.every((t,n)=>t===e.data[n])}},ye= exports.k =r=>new TextDecoder().decode(_.fromHexInput(r).toUint8Array());var T=255,U= exports.c =65535,x= exports.d =4294967295,b= exports.e =18446744073709551615n,A= exports.f =340282366920938463463374607431768211455n,v= exports.g =115792089237316195423570985008687907853269984665640564039457584007913129639935n;var m=class{bcsToBytes(){let e=new l;return this.serialize(e),e.toUint8Array()}bcsToHex(){let e=this.bcsToBytes();return _.fromHexInput(e)}toStringWithoutPrefix(){return this.bcsToHex().toStringWithoutPrefix()}toString(){return`0x${this.toStringWithoutPrefix()}`}},l= exports.m =class{constructor(e=64){if(e<=0)throw new Error("Length needs to be greater than 0");this.buffer=new ArrayBuffer(e),this.offset=0}ensureBufferWillHandleSize(e){for(;this.buffer.byteLength<this.offset+e;){let t=new ArrayBuffer(this.buffer.byteLength*2);new Uint8Array(t).set(new Uint8Array(this.buffer)),this.buffer=t}}appendToBuffer(e){this.ensureBufferWillHandleSize(e.length),new Uint8Array(this.buffer,this.offset).set(e),this.offset+=e.length}serializeWithFunction(e,t,n){this.ensureBufferWillHandleSize(t);let s=new DataView(this.buffer,this.offset);e.apply(s,[0,n,!0]),this.offset+=t}serializeStr(e){let t=new TextEncoder;this.serializeBytes(t.encode(e))}serializeBytes(e){this.serializeU32AsUleb128(e.length),this.appendToBuffer(e)}serializeFixedBytes(e){this.appendToBuffer(e)}serializeBool(e){O(e);let t=e?1:0;this.appendToBuffer(new Uint8Array([t]))}serializeU8(e){this.appendToBuffer(new Uint8Array([e]))}serializeU16(e){this.serializeWithFunction(DataView.prototype.setUint16,2,e)}serializeU32(e){this.serializeWithFunction(DataView.prototype.setUint32,4,e)}serializeU64(e){let t=BigInt(e)&BigInt(x),n=BigInt(e)>>BigInt(32);this.serializeU32(Number(t)),this.serializeU32(Number(n))}serializeU128(e){let t=BigInt(e)&b,n=BigInt(e)>>BigInt(64);this.serializeU64(t),this.serializeU64(n)}serializeU256(e){let t=BigInt(e)&A,n=BigInt(e)>>BigInt(128);this.serializeU128(t),this.serializeU128(n)}serializeU32AsUleb128(e){let t=e,n=[];for(;t>>>7;)n.push(t&127|128),t>>>=7;n.push(t),this.appendToBuffer(new Uint8Array(n))}toUint8Array(){return new Uint8Array(this.buffer).slice(0,this.offset)}serialize(e){e.serialize(this)}serializeVector(e){this.serializeU32AsUleb128(e.length),e.forEach(t=>{t.serialize(this)})}serializeOption(e,t){let n=e!==void 0;this.serializeBool(n),n&&(typeof e=="string"?this.serializeStr(e):e instanceof Uint8Array?t!==void 0?this.serializeFixedBytes(e):this.serializeBytes(e):e.serialize(this))}serializeOptionStr(e){e===void 0?this.serializeU32AsUleb128(0):(this.serializeU32AsUleb128(1),this.serializeStr(e))}};h([f(0,T)],l.prototype,"serializeU8",1),h([f(0,U)],l.prototype,"serializeU16",1),h([f(0,x)],l.prototype,"serializeU32",1),h([f(BigInt(0),b)],l.prototype,"serializeU64",1),h([f(BigInt(0),A)],l.prototype,"serializeU128",1),h([f(BigInt(0),v)],l.prototype,"serializeU256",1),h([f(0,x)],l.prototype,"serializeU32AsUleb128",1);function O(r){if(typeof r!="boolean")throw new Error(`${r} is not a boolean value`)}var D=(r,e,t)=>`${r} is out of range: [${e}, ${t}]`;function W(r,e,t){let n=BigInt(r);if(n>BigInt(t)||n<BigInt(e))throw new Error(D(r,e,t))}function f(r,e){return(t,n,s)=>{let o=s.value;return s.value=function(g){return W(g,r,e),o.apply(this,[g])},s}}var F=(s=>(s.JSON="application/json",s.BCS="application/x-bcs",s.BCS_SIGNED_TRANSACTION="application/x.aptos.signed_transaction+bcs",s.BCS_VIEW_FUNCTION="application/x.aptos.view_function+bcs",s))(F||{}),z= exports.r =(a=>(a[a.Bool=0]="Bool",a[a.U8=1]="U8",a[a.U64=2]="U64",a[a.U128=3]="U128",a[a.Address=4]="Address",a[a.Signer=5]="Signer",a[a.Vector=6]="Vector",a[a.Struct=7]="Struct",a[a.U16=8]="U16",a[a.U32=9]="U32",a[a.U256=10]="U256",a[a.Reference=254]="Reference",a[a.Generic=255]="Generic",a))(z||{}),I= exports.s =(p=>(p[p.U8=0]="U8",p[p.U64=1]="U64",p[p.U128=2]="U128",p[p.Address=3]="Address",p[p.U8Vector=4]="U8Vector",p[p.Bool=5]="Bool",p[p.U16=6]="U16",p[p.U32=7]="U32",p[p.U256=8]="U256",p[p.Serialized=9]="Serialized",p))(I||{}),P= exports.t =(n=>(n[n.Script=0]="Script",n[n.EntryFunction=2]="EntryFunction",n[n.Multisig=3]="Multisig",n))(P||{}),G= exports.u =(t=>(t[t.MultiAgentTransaction=0]="MultiAgentTransaction",t[t.FeePayerTransaction=1]="FeePayerTransaction",t))(G||{}),L= exports.v =(o=>(o[o.Ed25519=0]="Ed25519",o[o.MultiEd25519=1]="MultiEd25519",o[o.MultiAgent=2]="MultiAgent",o[o.FeePayer=3]="FeePayer",o[o.SingleSender=4]="SingleSender",o))(L||{}),$= exports.w =(c=>(c[c.Ed25519=0]="Ed25519",c[c.MultiEd25519=1]="MultiEd25519",c[c.SingleKey=2]="SingleKey",c[c.MultiKey=3]="MultiKey",c[c.NoAccountAuthenticator=4]="NoAccountAuthenticator",c[c.Abstraction=5]="Abstraction",c))($||{}),q= exports.x =(t=>(t.Ed25519="ed25519",t.Secp256k1="secp256k1",t))(q||{}),X= exports.y =(s=>(s[s.Ed25519=0]="Ed25519",s[s.Secp256k1=1]="Secp256k1",s[s.Keyless=3]="Keyless",s[s.FederatedKeyless=4]="FederatedKeyless",s))(X||{}),Y= exports.z =(n=>(n[n.Ed25519=0]="Ed25519",n[n.Secp256k1=1]="Secp256k1",n[n.Keyless=3]="Keyless",n))(Y||{}),j= exports.A =(e=>(e[e.Ed25519=0]="Ed25519",e))(j||{}),Z= exports.B =(e=>(e[e.Ed25519=0]="Ed25519",e))(Z||{}),Q= exports.C =(e=>(e[e.ZkProof=0]="ZkProof",e))(Q||{}),K= exports.D =(e=>(e[e.Groth16=0]="Groth16",e))(K||{}),J= exports.E =(g=>(g.Pending="pending_transaction",g.User="user_transaction",g.Genesis="genesis_transaction",g.BlockMetadata="block_metadata_transaction",g.StateCheckpoint="state_checkpoint_transaction",g.Validator="validator_transaction",g.BlockEpilogue="block_epilogue_transaction",g))(J||{});function Ae(r){return r.type==="pending_transaction"}function Se(r){return r.type==="user_transaction"}function Re(r){return r.type==="genesis_transaction"}function Te(r){return r.type==="block_metadata_transaction"}function Ue(r){return r.type==="state_checkpoint_transaction"}function ve(r){return r.type==="validator_transaction"}function Ie(r){return r.type==="block_epilogue_transaction"}function Me(r){return"signature"in r&&r.signature==="ed25519_signature"}function Ee(r){return"signature"in r&&r.signature==="secp256k1_ecdsa_signature"}function Be(r){return r.type==="multi_agent_signature"}function Ne(r){return r.type==="fee_payer_signature"}function Ce(r){return r.type==="multi_ed25519_signature"}var V=(n=>(n.PRIVATE="private",n.PUBLIC="public",n.FRIEND="friend",n))(V||{}),ee= exports.S =(s=>(s.STORE="store",s.DROP="drop",s.KEY="key",s.COPY="copy",s))(ee||{}),te= exports.T =(t=>(t.VALIDATOR="validator",t.FULL_NODE="full_node",t))(te||{}),re= exports.U =(s=>(s[s.Ed25519=0]="Ed25519",s[s.MultiEd25519=1]="MultiEd25519",s[s.SingleKey=2]="SingleKey",s[s.MultiKey=3]="MultiKey",s))(re||{}),ne= exports.V =(t=>(t[t.Ed25519=0]="Ed25519",t[t.Secp256k1Ecdsa=2]="Secp256k1Ecdsa",t))(ne||{}),M= exports.W =(o=>(o[o.DeriveAuid=251]="DeriveAuid",o[o.DeriveObjectAddressFromObject=252]="DeriveObjectAddressFromObject",o[o.DeriveObjectAddressFromGuid=253]="DeriveObjectAddressFromGuid",o[o.DeriveObjectAddressFromSeed=254]="DeriveObjectAddressFromSeed",o[o.DeriveResourceAccountAddress=255]="DeriveResourceAccountAddress",o))(M||{});var _scriptcomposerpack = require('@aptos-labs/script-composer-pack');var oe=(y=>(y.INCORRECT_NUMBER_OF_BYTES="incorrect_number_of_bytes",y.INVALID_HEX_CHARS="invalid_hex_chars",y.TOO_SHORT="too_short",y.TOO_LONG="too_long",y.LEADING_ZERO_X_REQUIRED="leading_zero_x_required",y.LONG_FORM_REQUIRED_UNLESS_SPECIAL="long_form_required_unless_special",y.INVALID_PADDING_ZEROES="INVALID_PADDING_ZEROES",y.INVALID_PADDING_STRICTNESS="INVALID_PADDING_STRICTNESS",y))(oe||{}),i=class i extends m{constructor(e){if(super(),e.length!==i.LENGTH)throw new u("AccountAddress data should be exactly 32 bytes long","incorrect_number_of_bytes");this.data=e}isSpecial(){return this.data.slice(0,this.data.length-1).every(e=>e===0)&&this.data[this.data.length-1]<16}toString(){return`0x${this.toStringWithoutPrefix()}`}toStringWithoutPrefix(){let e=_utils.bytesToHex.call(void 0, this.data);return this.isSpecial()&&(e=e[e.length-1]),e}toStringLong(){return`0x${this.toStringLongWithoutPrefix()}`}toStringLongWithoutPrefix(){return _utils.bytesToHex.call(void 0, this.data)}toStringShort(){return`0x${this.toStringShortWithoutPrefix()}`}toStringShortWithoutPrefix(){let e=_utils.bytesToHex.call(void 0, this.data).replace(/^0+/,"");return e===""?"0":e}toUint8Array(){return this.data}serialize(e){e.serializeFixedBytes(this.data)}serializeForEntryFunction(e){let t=this.bcsToBytes();e.serializeBytes(t)}serializeForScriptFunction(e){e.serializeU32AsUleb128(3),e.serialize(this)}static deserialize(e){let t=e.deserializeFixedBytes(i.LENGTH);return new i(t)}static fromStringStrict(e){if(!e.startsWith("0x"))throw new u("Hex string must start with a leading 0x.","leading_zero_x_required");let t=i.fromString(e);if(e.length!==i.LONG_STRING_LENGTH+2)if(t.isSpecial()){if(e.length!==3)throw new u(`The given hex string ${e} is a special address not in LONG form, it must be 0x0 to 0xf without padding zeroes.`,"INVALID_PADDING_ZEROES")}else throw new u(`The given hex string ${e} is not a special address, it must be represented as 0x + 64 chars.`,"long_form_required_unless_special");return t}static fromString(e,{maxMissingChars:t=4}={}){let n=e;if(e.startsWith("0x")&&(n=e.slice(2)),n.length===0)throw new u("Hex string is too short, must be 1 to 64 chars long, excluding the leading 0x.","too_short");if(n.length>64)throw new u("Hex string is too long, must be 1 to 64 chars long, excluding the leading 0x.","too_long");if(t>63||t<0)throw new u(`maxMissingChars must be between or equal to 0 and 63. Received ${t}`,"INVALID_PADDING_STRICTNESS");let s;try{s=_utils.hexToBytes.call(void 0, n.padStart(64,"0"))}catch(c){throw new u(`Hex characters are invalid: ${_optionalChain([c, 'optionalAccess', _5 => _5.message])}`,"invalid_hex_chars")}let o=new i(s);if(n.length<64-t&&!o.isSpecial())throw new u(`Hex string is too short, must be ${64-t} to 64 chars long, excluding the leading 0x. You may need to fix
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 N=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var h=(r,e,t,n)=>{for(var s=n>1?void 0:n?k(e,t):e,o=r.length-1,c;o>=0;o--)(c=r[o])&&(s=(n?c(e,t,s):c(s))||s);return n&&s&&N(e,t,s),s};var d=class extends Error{constructor(e,t){super(e),this.invalidReason=t}};var _utils = require('@noble/hashes/utils');var H=(n=>(n.TOO_SHORT="too_short",n.INVALID_LENGTH="invalid_length",n.INVALID_HEX_CHARS="invalid_hex_chars",n))(H||{}),_= exports.j =class r{constructor(e){this.data=e}toUint8Array(){return this.data}toStringWithoutPrefix(){return _utils.bytesToHex.call(void 0, this.data)}toString(){return`0x${this.toStringWithoutPrefix()}`}static fromHexString(e){let t=e;if(t.startsWith("0x")&&(t=t.slice(2)),t.length===0)throw new d("Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.","too_short");if(t.length%2!==0)throw new d("Hex string must be an even number of hex characters.","invalid_length");try{return new r(_utils.hexToBytes.call(void 0, t))}catch(n){throw new d(`Hex string contains invalid hex characters: ${_optionalChain([n, 'optionalAccess', _2 => _2.message])}`,"invalid_hex_chars")}}static fromHexInput(e){return e instanceof Uint8Array?new r(e):r.fromHexString(e)}static hexInputToUint8Array(e){return e instanceof Uint8Array?e:r.fromHexString(e).toUint8Array()}static hexInputToString(e){return r.fromHexInput(e).toString()}static hexInputToStringWithoutPrefix(e){return r.fromHexInput(e).toStringWithoutPrefix()}static isValid(e){try{return r.fromHexString(e),{valid:!0}}catch(t){return{valid:!1,invalidReason:_optionalChain([t, 'optionalAccess', _3 => _3.invalidReason]),invalidReasonMessage:_optionalChain([t, 'optionalAccess', _4 => _4.message])}}}equals(e){return this.data.length!==e.data.length?!1:this.data.every((t,n)=>t===e.data[n])}},ye= exports.k =r=>new TextDecoder().decode(_.fromHexInput(r).toUint8Array());var T=255,U= exports.c =65535,x= exports.d =4294967295,b= exports.e =18446744073709551615n,A= exports.f =340282366920938463463374607431768211455n,v= exports.g =115792089237316195423570985008687907853269984665640564039457584007913129639935n;var m=class{bcsToBytes(){let e=new l;return this.serialize(e),e.toUint8Array()}bcsToHex(){let e=this.bcsToBytes();return _.fromHexInput(e)}toStringWithoutPrefix(){return this.bcsToHex().toStringWithoutPrefix()}toString(){return`0x${this.toStringWithoutPrefix()}`}},l= exports.m =class{constructor(e=64){if(e<=0)throw new Error("Length needs to be greater than 0");this.buffer=new ArrayBuffer(e),this.offset=0}ensureBufferWillHandleSize(e){for(;this.buffer.byteLength<this.offset+e;){let t=new ArrayBuffer(this.buffer.byteLength*2);new Uint8Array(t).set(new Uint8Array(this.buffer)),this.buffer=t}}appendToBuffer(e){this.ensureBufferWillHandleSize(e.length),new Uint8Array(this.buffer,this.offset).set(e),this.offset+=e.length}serializeWithFunction(e,t,n){this.ensureBufferWillHandleSize(t);let s=new DataView(this.buffer,this.offset);e.apply(s,[0,n,!0]),this.offset+=t}serializeStr(e){let t=new TextEncoder;this.serializeBytes(t.encode(e))}serializeBytes(e){this.serializeU32AsUleb128(e.length),this.appendToBuffer(e)}serializeFixedBytes(e){this.appendToBuffer(e)}serializeBool(e){O(e);let t=e?1:0;this.appendToBuffer(new Uint8Array([t]))}serializeU8(e){this.appendToBuffer(new Uint8Array([e]))}serializeU16(e){this.serializeWithFunction(DataView.prototype.setUint16,2,e)}serializeU32(e){this.serializeWithFunction(DataView.prototype.setUint32,4,e)}serializeU64(e){let t=BigInt(e)&BigInt(x),n=BigInt(e)>>BigInt(32);this.serializeU32(Number(t)),this.serializeU32(Number(n))}serializeU128(e){let t=BigInt(e)&b,n=BigInt(e)>>BigInt(64);this.serializeU64(t),this.serializeU64(n)}serializeU256(e){let t=BigInt(e)&A,n=BigInt(e)>>BigInt(128);this.serializeU128(t),this.serializeU128(n)}serializeU32AsUleb128(e){let t=e,n=[];for(;t>>>7;)n.push(t&127|128),t>>>=7;n.push(t),this.appendToBuffer(new Uint8Array(n))}toUint8Array(){return new Uint8Array(this.buffer).slice(0,this.offset)}serialize(e){e.serialize(this)}serializeVector(e){this.serializeU32AsUleb128(e.length),e.forEach(t=>{t.serialize(this)})}serializeOption(e,t){let n=e!==void 0;this.serializeBool(n),n&&(typeof e=="string"?this.serializeStr(e):e instanceof Uint8Array?t!==void 0?this.serializeFixedBytes(e):this.serializeBytes(e):e.serialize(this))}serializeOptionStr(e){e===void 0?this.serializeU32AsUleb128(0):(this.serializeU32AsUleb128(1),this.serializeStr(e))}};h([f(0,T)],l.prototype,"serializeU8",1),h([f(0,U)],l.prototype,"serializeU16",1),h([f(0,x)],l.prototype,"serializeU32",1),h([f(BigInt(0),b)],l.prototype,"serializeU64",1),h([f(BigInt(0),A)],l.prototype,"serializeU128",1),h([f(BigInt(0),v)],l.prototype,"serializeU256",1),h([f(0,x)],l.prototype,"serializeU32AsUleb128",1);function O(r){if(typeof r!="boolean")throw new Error(`${r} is not a boolean value`)}var D=(r,e,t)=>`${r} is out of range: [${e}, ${t}]`;function W(r,e,t){let n=BigInt(r);if(n>BigInt(t)||n<BigInt(e))throw new Error(D(r,e,t))}function f(r,e){return(t,n,s)=>{let o=s.value;return s.value=function(g){return W(g,r,e),o.apply(this,[g])},s}}var F=(s=>(s.JSON="application/json",s.BCS="application/x-bcs",s.BCS_SIGNED_TRANSACTION="application/x.aptos.signed_transaction+bcs",s.BCS_VIEW_FUNCTION="application/x.aptos.view_function+bcs",s))(F||{}),z= exports.r =(a=>(a[a.Bool=0]="Bool",a[a.U8=1]="U8",a[a.U64=2]="U64",a[a.U128=3]="U128",a[a.Address=4]="Address",a[a.Signer=5]="Signer",a[a.Vector=6]="Vector",a[a.Struct=7]="Struct",a[a.U16=8]="U16",a[a.U32=9]="U32",a[a.U256=10]="U256",a[a.Reference=254]="Reference",a[a.Generic=255]="Generic",a))(z||{}),I= exports.s =(p=>(p[p.U8=0]="U8",p[p.U64=1]="U64",p[p.U128=2]="U128",p[p.Address=3]="Address",p[p.U8Vector=4]="U8Vector",p[p.Bool=5]="Bool",p[p.U16=6]="U16",p[p.U32=7]="U32",p[p.U256=8]="U256",p[p.Serialized=9]="Serialized",p))(I||{}),P= exports.t =(n=>(n[n.Script=0]="Script",n[n.EntryFunction=2]="EntryFunction",n[n.Multisig=3]="Multisig",n))(P||{}),G= exports.u =(t=>(t[t.MultiAgentTransaction=0]="MultiAgentTransaction",t[t.FeePayerTransaction=1]="FeePayerTransaction",t))(G||{}),L= exports.v =(o=>(o[o.Ed25519=0]="Ed25519",o[o.MultiEd25519=1]="MultiEd25519",o[o.MultiAgent=2]="MultiAgent",o[o.FeePayer=3]="FeePayer",o[o.SingleSender=4]="SingleSender",o))(L||{}),$= exports.w =(c=>(c[c.Ed25519=0]="Ed25519",c[c.MultiEd25519=1]="MultiEd25519",c[c.SingleKey=2]="SingleKey",c[c.MultiKey=3]="MultiKey",c[c.NoAccountAuthenticator=4]="NoAccountAuthenticator",c[c.Abstraction=5]="Abstraction",c))($||{}),q= exports.x =(t=>(t.Ed25519="ed25519",t.Secp256k1="secp256k1",t))(q||{}),X= exports.y =(s=>(s[s.Ed25519=0]="Ed25519",s[s.Secp256k1=1]="Secp256k1",s[s.Keyless=3]="Keyless",s[s.FederatedKeyless=4]="FederatedKeyless",s))(X||{}),Y= exports.z =(n=>(n[n.Ed25519=0]="Ed25519",n[n.Secp256k1=1]="Secp256k1",n[n.Keyless=3]="Keyless",n))(Y||{}),j= exports.A =(e=>(e[e.Ed25519=0]="Ed25519",e))(j||{}),Z= exports.B =(e=>(e[e.Ed25519=0]="Ed25519",e))(Z||{}),Q= exports.C =(e=>(e[e.ZkProof=0]="ZkProof",e))(Q||{}),K= exports.D =(e=>(e[e.Groth16=0]="Groth16",e))(K||{}),J= exports.E =(g=>(g.Pending="pending_transaction",g.User="user_transaction",g.Genesis="genesis_transaction",g.BlockMetadata="block_metadata_transaction",g.StateCheckpoint="state_checkpoint_transaction",g.Validator="validator_transaction",g.BlockEpilogue="block_epilogue_transaction",g))(J||{});function Ae(r){return r.type==="pending_transaction"}function Se(r){return r.type==="user_transaction"}function Re(r){return r.type==="genesis_transaction"}function Te(r){return r.type==="block_metadata_transaction"}function Ue(r){return r.type==="state_checkpoint_transaction"}function ve(r){return r.type==="validator_transaction"}function Ie(r){return r.type==="block_epilogue_transaction"}function Me(r){return"signature"in r&&r.signature==="ed25519_signature"}function Ee(r){return"signature"in r&&r.signature==="secp256k1_ecdsa_signature"}function Be(r){return r.type==="multi_agent_signature"}function Ne(r){return r.type==="fee_payer_signature"}function ke(r){return r.type==="multi_ed25519_signature"}var V=(n=>(n.PRIVATE="private",n.PUBLIC="public",n.FRIEND="friend",n))(V||{}),ee= exports.S =(s=>(s.STORE="store",s.DROP="drop",s.KEY="key",s.COPY="copy",s))(ee||{}),te= exports.T =(t=>(t.VALIDATOR="validator",t.FULL_NODE="full_node",t))(te||{}),re= exports.U =(s=>(s[s.Ed25519=0]="Ed25519",s[s.MultiEd25519=1]="MultiEd25519",s[s.SingleKey=2]="SingleKey",s[s.MultiKey=3]="MultiKey",s))(re||{}),ne= exports.V =(t=>(t[t.Ed25519=0]="Ed25519",t[t.Secp256k1Ecdsa=2]="Secp256k1Ecdsa",t))(ne||{}),M= exports.W =(o=>(o[o.DeriveAuid=251]="DeriveAuid",o[o.DeriveObjectAddressFromObject=252]="DeriveObjectAddressFromObject",o[o.DeriveObjectAddressFromGuid=253]="DeriveObjectAddressFromGuid",o[o.DeriveObjectAddressFromSeed=254]="DeriveObjectAddressFromSeed",o[o.DeriveResourceAccountAddress=255]="DeriveResourceAccountAddress",o))(M||{});var oe=(y=>(y.INCORRECT_NUMBER_OF_BYTES="incorrect_number_of_bytes",y.INVALID_HEX_CHARS="invalid_hex_chars",y.TOO_SHORT="too_short",y.TOO_LONG="too_long",y.LEADING_ZERO_X_REQUIRED="leading_zero_x_required",y.LONG_FORM_REQUIRED_UNLESS_SPECIAL="long_form_required_unless_special",y.INVALID_PADDING_ZEROES="INVALID_PADDING_ZEROES",y.INVALID_PADDING_STRICTNESS="INVALID_PADDING_STRICTNESS",y))(oe||{}),i=class i extends m{constructor(e){if(super(),e.length!==i.LENGTH)throw new d("AccountAddress data should be exactly 32 bytes long","incorrect_number_of_bytes");this.data=e}isSpecial(){return this.data.slice(0,this.data.length-1).every(e=>e===0)&&this.data[this.data.length-1]<16}toString(){return`0x${this.toStringWithoutPrefix()}`}toStringWithoutPrefix(){let e=_utils.bytesToHex.call(void 0, this.data);return this.isSpecial()&&(e=e[e.length-1]),e}toStringLong(){return`0x${this.toStringLongWithoutPrefix()}`}toStringLongWithoutPrefix(){return _utils.bytesToHex.call(void 0, this.data)}toStringShort(){return`0x${this.toStringShortWithoutPrefix()}`}toStringShortWithoutPrefix(){let e=_utils.bytesToHex.call(void 0, this.data).replace(/^0+/,"");return e===""?"0":e}toUint8Array(){return this.data}serialize(e){e.serializeFixedBytes(this.data)}serializeForEntryFunction(e){let t=this.bcsToBytes();e.serializeBytes(t)}serializeForScriptFunction(e){e.serializeU32AsUleb128(3),e.serialize(this)}static deserialize(e){let t=e.deserializeFixedBytes(i.LENGTH);return new i(t)}static fromStringStrict(e){if(!e.startsWith("0x"))throw new d("Hex string must start with a leading 0x.","leading_zero_x_required");let t=i.fromString(e);if(e.length!==i.LONG_STRING_LENGTH+2)if(t.isSpecial()){if(e.length!==3)throw new d(`The given hex string ${e} is a special address not in LONG form, it must be 0x0 to 0xf without padding zeroes.`,"INVALID_PADDING_ZEROES")}else throw new d(`The given hex string ${e} is not a special address, it must be represented as 0x + 64 chars.`,"long_form_required_unless_special");return t}static fromString(e,{maxMissingChars:t=4}={}){let n=e;if(e.startsWith("0x")&&(n=e.slice(2)),n.length===0)throw new d("Hex string is too short, must be 1 to 64 chars long, excluding the leading 0x.","too_short");if(n.length>64)throw new d("Hex string is too long, must be 1 to 64 chars long, excluding the leading 0x.","too_long");if(t>63||t<0)throw new d(`maxMissingChars must be between or equal to 0 and 63. Received ${t}`,"INVALID_PADDING_STRICTNESS");let s;try{s=_utils.hexToBytes.call(void 0, n.padStart(64,"0"))}catch(c){throw new d(`Hex characters are invalid: ${_optionalChain([c, 'optionalAccess', _5 => _5.message])}`,"invalid_hex_chars")}let o=new i(s);if(n.length<64-t&&!o.isSpecial())throw new d(`Hex string is too short, must be ${64-t} to 64 chars long, excluding the leading 0x. You may need to fix
2
2
  the addresss by padding it with 0s before passing it to \`fromString\` (e.g. <addressString>.padStart(64, '0')).
3
- Received ${e}`,"too_short");return o}static from(e,{maxMissingChars:t=4}={}){return typeof e=="string"?i.fromString(e,{maxMissingChars:t}):e instanceof Uint8Array?new i(e):e}static fromStrict(e){return typeof e=="string"?i.fromStringStrict(e):e instanceof Uint8Array?new i(e):e}static isValid(e){try{return e.strict?i.fromStrict(e.input):i.from(e.input),{valid:!0}}catch(t){return{valid:!1,invalidReason:_optionalChain([t, 'optionalAccess', _6 => _6.invalidReason]),invalidReasonMessage:_optionalChain([t, 'optionalAccess', _7 => _7.message])}}}equals(e){return this.data.length!==e.data.length?!1:this.data.every((t,n)=>t===e.data[n])}};i.LENGTH=32,i.LONG_STRING_LENGTH=64,i.ZERO=i.from("0x0"),i.ONE=i.from("0x1"),i.TWO=i.from("0x2"),i.THREE=i.from("0x3"),i.FOUR=i.from("0x4"),i.A=i.from("0xA");var d=i;var _sha3 = require('@noble/hashes/sha3');var R=(r,e)=>{let t=r.bcsToBytes(),n=typeof e=="string"?Buffer.from(e,"utf8"):e,s=new Uint8Array([...t,...n,254]);return new d(_sha3.sha3_256.call(void 0, s))},Qe= exports.$ =(r,e)=>{let t=r.bcsToBytes(),n=typeof e=="string"?Buffer.from(e,"utf8"):e,s=new Uint8Array([...t,...n,255]);return new d(_sha3.sha3_256.call(void 0, s))},Ke= exports.aa =(r,e,t)=>{let n=`${e}::${t}`;return R(r,n)};var _jsbase64 = require('js-base64');async function rt(r){return new Promise(e=>{setTimeout(e,r)})}function nt(r){return r instanceof Error?r.message:String(r)}var st=()=>Math.floor(Date.now()/1e3);function ot(r){let e=new Date(r*1e3);return e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),Math.floor(e.getTime()/1e3)}function it(r){let e=r.replace(/-/g,"+").replace(/_/g,"/"),t=e+"==".substring(0,(3-e.length%3)%3);return _jsbase64.decode.call(void 0, t)}function at(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");for(;e.length%4!==0;)e+="=";return new Uint8Array(Buffer.from(e,"base64"))}var pt=(r,e)=>r*10**e,ct= exports.ia =(r,e)=>r/10**e,B=r=>{let e="";for(let t=2;t<r.length;t+=2)e+=String.fromCharCode(parseInt(r.substring(t,t+2),16));return e},ut= exports.ja =r=>{let{account_address:e,module_name:t,struct_name:n}=r,s=B(t),o=B(n);return`${e}::${s}::${o}`},dt= exports.ka =r=>typeof r=="object"&&!Array.isArray(r)&&r!==null&&"account_address"in r&&"module_name"in r&&"struct_name"in r&&typeof r.account_address=="string"&&typeof r.module_name=="string"&&typeof r.struct_name=="string";function gt(r){let e=r.split("::");if(e.length!==3)throw new Error(`Invalid function ${r}`);let t=e[0],n=e[1],s=e[2];return{moduleAddress:t,moduleName:n,functionName:s}}function lt(r){let e=r.split("::");return e.length===3&&d.isValid({input:e[0]}).valid}function yt(r,e=6,t=5){return`${r.slice(0,e)}...${r.slice(-t)}`}var ae="0x1::aptos_coin::AptosCoin",ht=d.A.toStringLong();function pe(r){let e=/0x[0-9a-fA-F]+/g;return r.replace(e,t=>d.from(t,{maxMissingChars:63}).toStringShort())}function ft(r){let e=pe(r);return e===ae?d.A:R(d.A,e)}exports.a = h; exports.b = T; exports.c = U; exports.d = x; exports.e = b; exports.f = A; exports.g = v; exports.h = u; exports.i = H; exports.j = _; exports.k = ye; exports.l = m; exports.m = l; exports.n = O; exports.o = D; exports.p = W; exports.q = F; exports.r = z; exports.s = I; exports.t = P; exports.u = G; exports.v = L; exports.w = $; exports.x = q; exports.y = X; exports.z = Y; exports.A = j; exports.B = Z; exports.C = Q; exports.D = K; exports.E = J; exports.F = Ae; exports.G = Se; exports.H = Re; exports.I = Te; exports.J = Ue; exports.K = ve; exports.L = Ie; exports.M = Me; exports.N = Ee; exports.O = Be; exports.P = Ne; exports.Q = Ce; exports.R = V; exports.S = ee; exports.T = te; exports.U = re; exports.V = ne; exports.W = M; exports.X = _scriptcomposerpack.CallArgument; exports.Y = oe; exports.Z = d; exports._ = R; exports.$ = Qe; exports.aa = Ke; exports.ba = rt; exports.ca = nt; exports.da = st; exports.ea = ot; exports.fa = it; exports.ga = at; exports.ha = pt; exports.ia = ct; exports.ja = ut; exports.ka = dt; exports.la = gt; exports.ma = lt; exports.na = yt; exports.oa = ft;
4
- //# sourceMappingURL=chunk-66TIRJFD.js.map
3
+ Received ${e}`,"too_short");return o}static from(e,{maxMissingChars:t=4}={}){return typeof e=="string"?i.fromString(e,{maxMissingChars:t}):e instanceof Uint8Array?new i(e):e}static fromStrict(e){return typeof e=="string"?i.fromStringStrict(e):e instanceof Uint8Array?new i(e):e}static isValid(e){try{return e.strict?i.fromStrict(e.input):i.from(e.input),{valid:!0}}catch(t){return{valid:!1,invalidReason:_optionalChain([t, 'optionalAccess', _6 => _6.invalidReason]),invalidReasonMessage:_optionalChain([t, 'optionalAccess', _7 => _7.message])}}}equals(e){return this.data.length!==e.data.length?!1:this.data.every((t,n)=>t===e.data[n])}};i.LENGTH=32,i.LONG_STRING_LENGTH=64,i.ZERO=i.from("0x0"),i.ONE=i.from("0x1"),i.TWO=i.from("0x2"),i.THREE=i.from("0x3"),i.FOUR=i.from("0x4"),i.A=i.from("0xA");var u=i;var _sha3 = require('@noble/hashes/sha3');var R=(r,e)=>{let t=r.bcsToBytes(),n=typeof e=="string"?Buffer.from(e,"utf8"):e,s=new Uint8Array([...t,...n,254]);return new u(_sha3.sha3_256.call(void 0, s))},je= exports._ =(r,e)=>{let t=r.bcsToBytes(),n=typeof e=="string"?Buffer.from(e,"utf8"):e,s=new Uint8Array([...t,...n,255]);return new u(_sha3.sha3_256.call(void 0, s))},Ze= exports.$ =(r,e,t)=>{let n=`${e}::${t}`;return R(r,n)};var _jsbase64 = require('js-base64');async function et(r){return new Promise(e=>{setTimeout(e,r)})}function tt(r){return r instanceof Error?r.message:String(r)}var rt=()=>Math.floor(Date.now()/1e3);function nt(r){let e=new Date(r*1e3);return e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),Math.floor(e.getTime()/1e3)}function st(r){let e=r.replace(/-/g,"+").replace(/_/g,"/"),t=e+"==".substring(0,(3-e.length%3)%3);return _jsbase64.decode.call(void 0, t)}function ot(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");for(;e.length%4!==0;)e+="=";return new Uint8Array(Buffer.from(e,"base64"))}var it=(r,e)=>r*10**e,at= exports.ha =(r,e)=>r/10**e,B=r=>{let e="";for(let t=2;t<r.length;t+=2)e+=String.fromCharCode(parseInt(r.substring(t,t+2),16));return e},pt= exports.ia =r=>{let{account_address:e,module_name:t,struct_name:n}=r,s=B(t),o=B(n);return`${e}::${s}::${o}`},ct= exports.ja =r=>typeof r=="object"&&!Array.isArray(r)&&r!==null&&"account_address"in r&&"module_name"in r&&"struct_name"in r&&typeof r.account_address=="string"&&typeof r.module_name=="string"&&typeof r.struct_name=="string";function dt(r){let e=r.split("::");if(e.length!==3)throw new Error(`Invalid function ${r}`);let t=e[0],n=e[1],s=e[2];return{moduleAddress:t,moduleName:n,functionName:s}}function ut(r){let e=r.split("::");return e.length===3&&u.isValid({input:e[0]}).valid}function gt(r,e=6,t=5){return`${r.slice(0,e)}...${r.slice(-t)}`}var ae="0x1::aptos_coin::AptosCoin",lt=u.A.toStringLong();function pe(r){let e=/0x[0-9a-fA-F]+/g;return r.replace(e,t=>u.from(t,{maxMissingChars:63}).toStringShort())}function yt(r){let e=pe(r);return e===ae?u.A:R(u.A,e)}exports.a = h; exports.b = T; exports.c = U; exports.d = x; exports.e = b; exports.f = A; exports.g = v; exports.h = d; exports.i = H; exports.j = _; exports.k = ye; exports.l = m; exports.m = l; exports.n = O; exports.o = D; exports.p = W; exports.q = F; exports.r = z; exports.s = I; exports.t = P; exports.u = G; exports.v = L; exports.w = $; exports.x = q; exports.y = X; exports.z = Y; exports.A = j; exports.B = Z; exports.C = Q; exports.D = K; exports.E = J; exports.F = Ae; exports.G = Se; exports.H = Re; exports.I = Te; exports.J = Ue; exports.K = ve; exports.L = Ie; exports.M = Me; exports.N = Ee; exports.O = Be; exports.P = Ne; exports.Q = ke; exports.R = V; exports.S = ee; exports.T = te; exports.U = re; exports.V = ne; exports.W = M; exports.X = oe; exports.Y = u; exports.Z = R; exports._ = je; exports.$ = Ze; exports.aa = et; exports.ba = tt; exports.ca = rt; exports.da = nt; exports.ea = st; exports.fa = ot; exports.ga = it; exports.ha = at; exports.ia = pt; exports.ja = ct; exports.ka = dt; exports.la = ut; exports.ma = gt; exports.na = yt;
4
+ //# sourceMappingURL=chunk-ZMDE3DNL.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/maayansavir/work/aptos_repos/aptos-ts-sdk/dist/common/chunk-66TIRJFD.js","../../src/core/common.ts","../../src/core/hex.ts","../../src/core/accountAddress.ts"],"names":["ParsingError","message","invalidReason","HexInvalidReason","Hex","_Hex","data","bytesToHex"],"mappings":"AAAA,ilBAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CCQhM,IAAMA,CAAAA,CAAN,MAAA,QAA8B,KAAM,CAkBzC,WAAA,CAAYC,CAAAA,CAAiBC,CAAAA,CAAkB,CAC7C,KAAA,CAAMD,CAAO,CAAA,CACb,IAAA,CAAK,aAAA,CAAgBC,CACvB,CACF,CAAA,CC3BA,4CAAuC,IAS3BC,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CACVA,CAAAA,CAAA,SAAA,CAAY,WAAA,CACZA,CAAAA,CAAA,cAAA,CAAiB,gBAAA,CACjBA,CAAAA,CAAA,iBAAA,CAAoB,mBAAA,CAHVA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAA,CAAA,CAAA,CAAA,CAgCCC,CAAAA,aAAN,MAAMC,CAAI,CAUf,WAAA,CAAYC,CAAAA,CAAkB,CAC5B,IAAA,CAAK,IAAA,CAAOA,CACd,CAaA,YAAA,CAAA,CAA2B,CACzB,OAAO,IAAA,CAAK,IACd,CASA,qBAAA,CAAA,CAAgC,CAC9B,OAAOC,+BAAAA,IAAW,CAAK,IAAI,CAC7B,CASA,QAAA,CAAA,CAAmB,CACjB,MAAO,CAAA,EAAA,EAAK,IAAA,CAAK,qBAAA,CAAsB,CAAC,CAAA,CAAA;ACkVsB;AAnWV,SAAA","file":"/Users/maayansavir/work/aptos_repos/aptos-ts-sdk/dist/common/chunk-66TIRJFD.js","sourcesContent":[null,"// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This error is used to explain why parsing failed.\n * @group Implementation\n * @category Serialization\n */\nexport class ParsingError<T> extends Error {\n /**\n * This provides a programmatic way to access why parsing failed. Downstream devs\n * might want to use this to build their own error messages if the default error\n * messages are not suitable for their use case. This should be an enum.\n * @group Implementation\n * @category Serialization\n */\n public invalidReason: T;\n\n /**\n * Creates an instance of the error with a specified message and invalid reason.\n *\n * @param message The error message that describes the issue.\n * @param invalidReason The reason why the input is considered invalid.\n * @group Implementation\n * @category Serialization\n */\n constructor(message: string, invalidReason: T) {\n super(message);\n this.invalidReason = invalidReason;\n }\n}\n\n/**\n * Whereas ParsingError is thrown when parsing fails, e.g. in a fromString function,\n * this type is returned from \"defensive\" functions like isValid.\n * @group Implementation\n * @category Serialization\n */\nexport type ParsingResult<T> = {\n /**\n * True if valid, false otherwise.\n * @group Implementation\n * @category Serialization\n */\n valid: boolean;\n\n /**\n * If valid is false, this will be a code explaining why parsing failed.\n * @group Implementation\n * @category Serialization\n */\n invalidReason?: T;\n\n /**\n * If valid is false, this will be a string explaining why parsing failed.\n * @group Implementation\n * @category Serialization\n */\n invalidReasonMessage?: string;\n};\n","// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bytesToHex, hexToBytes } from \"@noble/hashes/utils\";\nimport { ParsingError, ParsingResult } from \"./common\";\nimport { HexInput } from \"../types\";\n\n/**\n * Provides reasons for parsing failures related to hexadecimal values.\n * @group Implementation\n * @category Serialization\n */\nexport enum HexInvalidReason {\n TOO_SHORT = \"too_short\",\n INVALID_LENGTH = \"invalid_length\",\n INVALID_HEX_CHARS = \"invalid_hex_chars\",\n}\n\n/**\n * NOTE: Do not use this class when working with account addresses; use AccountAddress instead.\n * When accepting hex data as input to a function, prefer to accept HexInput and\n *\n * A helper class for working with hex data. Hex data, when represented as a string,\n * generally looks like this, for example: 0xaabbcc, 45cd32, etc.\n *\n * then use the static helper methods of this class to convert it into the desired\n * format. This enables the greatest flexibility for the developer.\n *\n * Example usage:\n * ```typescript\n * getTransactionByHash(txnHash: HexInput): Promise<Transaction> {\n * const txnHashString = Hex.fromHexInput(txnHash).toString();\n * return await getTransactionByHashInner(txnHashString);\n * }\n * ```\n * This call to `Hex.fromHexInput().toString()` converts the HexInput to a hex string\n * with a leading 0x prefix, regardless of what the input format was.\n *\n * Other ways to chain the functions together:\n * - `Hex.fromHexString({ hexInput: \"0x1f\" }).toUint8Array()`\n * - `new Hex([1, 3]).toStringWithoutPrefix()`\n * @group Implementation\n * @category Serialization\n */\nexport class Hex {\n private readonly data: Uint8Array;\n\n /**\n * Create a new Hex instance from a Uint8Array.\n *\n * @param data - The Uint8Array containing the data to initialize the Hex instance.\n * @group Implementation\n * @category Serialization\n */\n constructor(data: Uint8Array) {\n this.data = data;\n }\n\n // ===\n // Methods for representing an instance of Hex as other types.\n // ===\n\n /**\n * Get the inner hex data as a Uint8Array. The inner data is already a Uint8Array, so no conversion takes place.\n *\n * @returns Hex data as Uint8Array\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n return this.data;\n }\n\n /**\n * Get the hex data as a string without the 0x prefix.\n *\n * @returns Hex string without 0x prefix\n * @group Implementation\n * @category Serialization\n */\n toStringWithoutPrefix(): string {\n return bytesToHex(this.data);\n }\n\n /**\n * Get the hex data as a string with the 0x prefix.\n *\n * @returns Hex string with 0x prefix\n * @group Implementation\n * @category Serialization\n */\n toString(): string {\n return `0x${this.toStringWithoutPrefix()}`;\n }\n\n // ===\n // Methods for creating an instance of Hex from other types.\n // ===\n\n /**\n * Converts a hex string into a Hex instance, allowing for both prefixed and non-prefixed formats.\n *\n * @param str - A hex string, with or without the 0x prefix.\n *\n * @throws ParsingError - If the hex string is too short, has an odd number of characters, or contains invalid hex characters.\n *\n * @returns Hex - The resulting Hex instance created from the provided string.\n * @group Implementation\n * @category Serialization\n */\n static fromHexString(str: string): Hex {\n let input = str;\n\n if (input.startsWith(\"0x\")) {\n input = input.slice(2);\n }\n\n if (input.length === 0) {\n throw new ParsingError(\n \"Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.\",\n HexInvalidReason.TOO_SHORT,\n );\n }\n\n if (input.length % 2 !== 0) {\n throw new ParsingError(\"Hex string must be an even number of hex characters.\", HexInvalidReason.INVALID_LENGTH);\n }\n\n try {\n return new Hex(hexToBytes(input));\n } catch (error: any) {\n throw new ParsingError(\n `Hex string contains invalid hex characters: ${error?.message}`,\n HexInvalidReason.INVALID_HEX_CHARS,\n );\n }\n }\n\n /**\n * Converts an instance of HexInput, which can be a string or a Uint8Array, into a Hex instance.\n * This function is useful for transforming hexadecimal representations into a structured Hex object for further manipulation.\n *\n * @param hexInput - A HexInput which can be a string or Uint8Array.\n * @returns A Hex instance created from the provided hexInput.\n * @group Implementation\n * @category Serialization\n */\n static fromHexInput(hexInput: HexInput): Hex {\n if (hexInput instanceof Uint8Array) return new Hex(hexInput);\n return Hex.fromHexString(hexInput);\n }\n\n /**\n * Converts an instance of HexInput, which can be a string or a Uint8Array, into a Uint8Array.\n *\n * @param hexInput - A HexInput which can be a string or Uint8Array.\n * @returns A Uint8Array created from the provided hexInput.\n */\n static hexInputToUint8Array(hexInput: HexInput): Uint8Array {\n if (hexInput instanceof Uint8Array) return hexInput;\n return Hex.fromHexString(hexInput).toUint8Array();\n }\n\n /**\n * Converts a HexInput (string or Uint8Array) to a hex string with '0x' prefix.\n *\n * @param hexInput - The input to convert, either a hex string (with/without '0x' prefix) or Uint8Array\n * @returns A hex string with '0x' prefix (e.g., \"0x1234\")\n *\n * @example\n * ```typescript\n * Hex.hexInputToString(\"1234\") // returns \"0x1234\"\n * Hex.hexInputToString(\"0x1234\") // returns \"0x1234\"\n * Hex.hexInputToString(new Uint8Array([0x12, 0x34])) // returns \"0x1234\"\n * ```\n */\n static hexInputToString(hexInput: HexInput): string {\n return Hex.fromHexInput(hexInput).toString();\n }\n\n /**\n * Converts a HexInput (string or Uint8Array) to a hex string without '0x' prefix.\n *\n * @param hexInput - The input to convert, either a hex string (with/without '0x' prefix) or Uint8Array\n * @returns A hex string without '0x' prefix (e.g., \"1234\")\n *\n * @example\n * ```typescript\n * Hex.hexInputToStringWithoutPrefix(\"1234\") // returns \"1234\"\n * Hex.hexInputToStringWithoutPrefix(\"0x1234\") // returns \"1234\"\n * Hex.hexInputToStringWithoutPrefix(new Uint8Array([0x12, 0x34])) // returns \"1234\"\n * ```\n */\n static hexInputToStringWithoutPrefix(hexInput: HexInput): string {\n return Hex.fromHexInput(hexInput).toStringWithoutPrefix();\n }\n\n // ===\n // Methods for checking validity.\n // ===\n\n /**\n * Check if the provided string is a valid hexadecimal representation.\n *\n * @param str - A hex string representing byte data.\n *\n * @returns An object containing:\n * - valid: A boolean indicating whether the string is valid.\n * - invalidReason: The reason for invalidity if the string is not valid.\n * - invalidReasonMessage: A message explaining why the string is invalid.\n * @group Implementation\n * @category Serialization\n */\n static isValid(str: string): ParsingResult<HexInvalidReason> {\n try {\n Hex.fromHexString(str);\n return { valid: true };\n } catch (error: any) {\n return {\n valid: false,\n invalidReason: error?.invalidReason,\n invalidReasonMessage: error?.message,\n };\n }\n }\n\n /**\n * Determine if two Hex instances are equal by comparing their underlying byte data.\n *\n * @param other The Hex instance to compare to.\n * @returns true if the Hex instances are equal, false if not.\n * @group Implementation\n * @category Serialization\n */\n equals(other: Hex): boolean {\n if (this.data.length !== other.data.length) return false;\n return this.data.every((value, index) => value === other.data[index]);\n }\n}\n\nexport const hexToAsciiString = (hex: string) => new TextDecoder().decode(Hex.fromHexInput(hex).toUint8Array());\n","// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bytesToHex, hexToBytes } from \"@noble/hashes/utils\";\nimport { Serializable, Serializer } from \"../bcs/serializer\";\nimport { Deserializer } from \"../bcs/deserializer\";\nimport { ParsingError, ParsingResult } from \"./common\";\nimport { TransactionArgument } from \"../transactions/instances/transactionArgument\";\nimport { HexInput, ScriptTransactionArgumentVariants } from \"../types\";\n\n/**\n * Provides reasons for an address was invalid.\n * @group Implementation\n * @category Serialization\n */\nexport enum AddressInvalidReason {\n INCORRECT_NUMBER_OF_BYTES = \"incorrect_number_of_bytes\",\n INVALID_HEX_CHARS = \"invalid_hex_chars\",\n TOO_SHORT = \"too_short\",\n TOO_LONG = \"too_long\",\n LEADING_ZERO_X_REQUIRED = \"leading_zero_x_required\",\n LONG_FORM_REQUIRED_UNLESS_SPECIAL = \"long_form_required_unless_special\",\n INVALID_PADDING_ZEROES = \"INVALID_PADDING_ZEROES\",\n INVALID_PADDING_STRICTNESS = \"INVALID_PADDING_STRICTNESS\",\n}\n\n/**\n * The input for an account address, which can be either a hexadecimal string or a standard account address.\n * @group Implementation\n * @category Serialization\n */\nexport type AccountAddressInput = HexInput | AccountAddress;\n\n/**\n * NOTE: Only use this class for account addresses. For other hex data, e.g. transaction\n * hashes, use the Hex class.\n *\n * AccountAddress is used for working with account addresses. Account addresses, when\n * represented as a string, generally look like these examples:\n * - 0x1\n * - 0xaa86fe99004361f747f91342ca13c426ca0cccb0c1217677180c9493bad6ef0c\n *\n * Proper formatting and parsing of account addresses is defined by AIP-40.\n * To learn more about the standard, read the AIP here:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * The comments in this class make frequent reference to the LONG and SHORT formats,\n * as well as \"special\" addresses. To learn what these refer to see AIP-40.\n * @group Implementation\n * @category Serialization\n */\nexport class AccountAddress extends Serializable implements TransactionArgument {\n /**\n * This is the internal representation of an account address.\n * @group Implementation\n * @category Serialization\n */\n readonly data: Uint8Array;\n\n /**\n * The number of bytes that make up an account address.\n * @group Implementation\n * @category Serialization\n */\n static readonly LENGTH: number = 32;\n\n /**\n * The length of an address string in LONG form without a leading 0x.\n * @group Implementation\n * @category Serialization\n */\n static readonly LONG_STRING_LENGTH: number = 64;\n\n static ZERO: AccountAddress = AccountAddress.from(\"0x0\");\n\n static ONE: AccountAddress = AccountAddress.from(\"0x1\");\n\n static TWO: AccountAddress = AccountAddress.from(\"0x2\");\n\n static THREE: AccountAddress = AccountAddress.from(\"0x3\");\n\n static FOUR: AccountAddress = AccountAddress.from(\"0x4\");\n\n static A: AccountAddress = AccountAddress.from(\"0xA\");\n\n /**\n * Creates an instance of AccountAddress from a Uint8Array.\n *\n * This function ensures that the input data is exactly 32 bytes long, which is required for a valid account address.\n *\n * @param input A Uint8Array representing an account address.\n * @throws ParsingError if the input length is not equal to 32 bytes.\n * @group Implementation\n * @category Serialization\n */\n constructor(input: Uint8Array) {\n super();\n if (input.length !== AccountAddress.LENGTH) {\n throw new ParsingError(\n \"AccountAddress data should be exactly 32 bytes long\",\n AddressInvalidReason.INCORRECT_NUMBER_OF_BYTES,\n );\n }\n this.data = input;\n }\n\n /**\n * Determines if the address is classified as special, which is defined as 0x0 to 0xf inclusive.\n * In other words, the last byte of the address must be < 0b10000 (16)\n * and every other byte must be zero.\n *\n * For more information on how special addresses are defined, see AIP-40:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * @returns true if the address is special, false otherwise.\n * @group Implementation\n * @category Serialization\n */\n isSpecial(): boolean {\n return (\n this.data.slice(0, this.data.length - 1).every((byte) => byte === 0) && this.data[this.data.length - 1] < 0b10000\n );\n }\n // ===\n // Methods for representing an instance of AccountAddress as other types.\n // ===\n\n /**\n * Return the AccountAddress as a string as per AIP-40.\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n * This representation returns special addresses in SHORT form (0xf)\n * and other addresses in LONG form (0x + 64 characters).\n *\n * @returns AccountAddress as a string conforming to AIP-40.\n * @group Implementation\n * @category Serialization\n */\n toString(): `0x${string}` {\n return `0x${this.toStringWithoutPrefix()}`;\n }\n\n /**\n * Return the AccountAddress as a string conforming to AIP-40 but without the leading 0x.\n *\n * NOTE: Prefer to use `toString` where possible.\n *\n * @returns AccountAddress as a string without the leading 0x.\n * @group Implementation\n * @category Serialization\n */\n toStringWithoutPrefix(): string {\n let hex = bytesToHex(this.data);\n if (this.isSpecial()) {\n hex = hex[hex.length - 1];\n }\n return hex;\n }\n\n /**\n * Convert the account address to a string in LONG format, which is always 0x followed by 64 hex characters.\n *\n * NOTE: Prefer to use `toString` where possible, as it formats special addresses using the SHORT form (no leading 0s).\n *\n * @returns AccountAddress as a string in LONG form.\n * @group Implementation\n * @category Serialization\n */\n toStringLong(): `0x${string}` {\n return `0x${this.toStringLongWithoutPrefix()}`;\n }\n\n /**\n * Returns the account address as a string in LONG form without a leading 0x.\n * This function will include leading zeroes and will produce a string of 64 hex characters.\n *\n * NOTE: Prefer to use `toString` where possible, as it formats special addresses using the SHORT form (no leading 0s).\n *\n * @returns {string} The account address in LONG form.\n * @group Implementation\n * @category Serialization\n */\n toStringLongWithoutPrefix(): string {\n return bytesToHex(this.data);\n }\n\n /**\n * Convert the account address to a string in SHORT format, which is 0x followed by the shortest\n * possible representation (no leading zeros).\n *\n * @returns AccountAddress as a string in SHORT form.\n * @group Implementation\n * @category Serialization\n */\n toStringShort(): `0x${string}` {\n return `0x${this.toStringShortWithoutPrefix()}`;\n }\n\n /**\n * Returns a lossless short string representation of the address by trimming leading zeros.\n * If the address consists of all zeros, returns \"0\".\n *\n * @returns A string representation of the address without leading zeros\n * @group Implementation\n * @category Serialization\n */\n toStringShortWithoutPrefix(): string {\n const hex = bytesToHex(this.data).replace(/^0+/, \"\");\n return hex === \"\" ? \"0\" : hex;\n }\n\n /**\n * Get the inner data as a Uint8Array.\n * The inner data is already a Uint8Array, so no conversion takes place.\n *\n * @returns Hex data as Uint8Array\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n return this.data;\n }\n\n /**\n * Serialize the AccountAddress to a Serializer instance's data buffer.\n * @param serializer The serializer to serialize the AccountAddress to.\n * @returns void\n * @example\n * const serializer = new Serializer();\n * const address = AccountAddress.fromString(\"0x1\");\n * address.serialize(serializer);\n * const bytes = serializer.toUint8Array();\n * // `bytes` is now the BCS-serialized address.\n * @group Implementation\n * @category Serialization\n */\n serialize(serializer: Serializer): void {\n serializer.serializeFixedBytes(this.data);\n }\n\n /**\n * Serializes the current instance into a byte sequence suitable for entry functions.\n * This allows for the proper encoding of data when interacting with entry functions in the blockchain.\n *\n * @param serializer - The serializer instance used to convert the data into bytes.\n * @group Implementation\n * @category Serialization\n */\n serializeForEntryFunction(serializer: Serializer): void {\n const bcsBytes = this.bcsToBytes();\n serializer.serializeBytes(bcsBytes);\n }\n\n /**\n * Serializes the current instance for use in a script function by encoding it into a byte sequence.\n * This process involves serializing the variant index and the instance data, making it suitable for transmission.\n *\n * @param serializer - The serializer instance used to perform the serialization.\n * @group Implementation\n * @category Serialization\n */\n serializeForScriptFunction(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(ScriptTransactionArgumentVariants.Address);\n serializer.serialize(this);\n }\n\n /**\n * Deserialize an AccountAddress from the byte buffer in a Deserializer instance.\n * This function allows you to convert a byte representation of an AccountAddress into an instance of AccountAddress.\n * @param deserializer The deserializer to deserialize the AccountAddress from.\n * @returns An instance of AccountAddress.\n * @example\n * const bytes = hexToBytes(\"0x0102030405060708091011121314151617181920212223242526272829303132\");\n * const deserializer = new Deserializer(bytes);\n * const address = AccountAddress.deserialize(deserializer);\n * // `address` is now an instance of AccountAddress.\n * @group Implementation\n * @category Serialization\n */\n static deserialize(deserializer: Deserializer): AccountAddress {\n const bytes = deserializer.deserializeFixedBytes(AccountAddress.LENGTH);\n return new AccountAddress(bytes);\n }\n\n // ===\n // Methods for creating an instance of AccountAddress from other types.\n // ===\n\n /**\n * NOTE: This function has strict parsing behavior. For relaxed behavior, please use\n * the `fromString` function.\n *\n * Creates an instance of AccountAddress from a hex string.\n *\n * This function allows only the strictest formats defined by AIP-40. In short this\n * means only the following formats are accepted:\n *\n * - LONG\n * - SHORT for special addresses\n *\n * Where:\n * - LONG is defined as 0x + 64 hex characters.\n * - SHORT for special addresses is 0x0 to 0xf inclusive without padding zeroes.\n *\n * This means the following are not accepted:\n * - SHORT for non-special addresses.\n * - Any address without a leading 0x.\n *\n * @param input - A hex string representing an account address.\n *\n * @throws {ParsingError} If the hex string does not start with 0x or is not in a valid format.\n *\n * @remarks\n *\n * This function has strict parsing behavior. For relaxed behavior, please use the `fromString` function.\n *\n * @see AIP-40 documentation for more details on address formats:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * @returns An instance of AccountAddress.\n * @group Implementation\n * @category Serialization\n */\n static fromStringStrict(input: string): AccountAddress {\n // Assert the string starts with 0x.\n if (!input.startsWith(\"0x\")) {\n throw new ParsingError(\"Hex string must start with a leading 0x.\", AddressInvalidReason.LEADING_ZERO_X_REQUIRED);\n }\n\n const address = AccountAddress.fromString(input);\n\n // Check if the address is in LONG form. If it is not, this is only allowed for\n // special addresses, in which case we check it is in proper SHORT form.\n if (input.length !== AccountAddress.LONG_STRING_LENGTH + 2) {\n if (!address.isSpecial()) {\n throw new ParsingError(\n `The given hex string ${input} is not a special address, it must be represented as 0x + 64 chars.`,\n AddressInvalidReason.LONG_FORM_REQUIRED_UNLESS_SPECIAL,\n );\n } else if (input.length !== 3) {\n // 0x + one hex char is the only valid SHORT form for special addresses.\n throw new ParsingError(\n // eslint-disable-next-line max-len\n `The given hex string ${input} is a special address not in LONG form, it must be 0x0 to 0xf without padding zeroes.`,\n AddressInvalidReason.INVALID_PADDING_ZEROES,\n );\n }\n }\n\n return address;\n }\n\n /**\n * NOTE: This function has relaxed parsing behavior. For strict behavior, please use\n * the `fromStringStrict` function. Where possible use `fromStringStrict` rather than this\n * function, `fromString`.\n *\n * Creates an instance of AccountAddress from a hex string.\n *\n * This function allows all formats defined by AIP-40. In short this means the\n * following formats are accepted:\n *\n * - LONG, with or without leading 0x\n * - SHORT*, with or without leading 0x\n *\n * Where:\n * - LONG is 64 hex characters.\n * - SHORT* is 1 to 63 hex characters inclusive. The address can have missing values up to `maxMissingChars` before it is padded.\n * - Padding zeroes are allowed, e.g. 0x0123 is valid.\n *\n * Learn more about the different address formats by reading AIP-40:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * @param input A hex string representing an account address.\n * @param args.maxMissingChars The number of characters that can be missing in a padded address before it is invalid.\n *\n * @returns An instance of AccountAddress.\n *\n * @throws ParsingError if the hex string is too short, too long, or contains invalid characters.\n * @group Implementation\n * @category Serialization\n */\n static fromString(input: string, { maxMissingChars = 4 }: { maxMissingChars?: number } = {}): AccountAddress {\n let parsedInput = input;\n // Remove leading 0x for parsing.\n if (input.startsWith(\"0x\")) {\n parsedInput = input.slice(2);\n }\n\n // Ensure the address string is at least 1 character long.\n if (parsedInput.length === 0) {\n throw new ParsingError(\n \"Hex string is too short, must be 1 to 64 chars long, excluding the leading 0x.\",\n AddressInvalidReason.TOO_SHORT,\n );\n }\n\n // Ensure the address string is not longer than 64 characters.\n if (parsedInput.length > 64) {\n throw new ParsingError(\n \"Hex string is too long, must be 1 to 64 chars long, excluding the leading 0x.\",\n AddressInvalidReason.TOO_LONG,\n );\n }\n\n // Ensure that the maxMissingChars is between or equal to 0 and 63.\n if (maxMissingChars > 63 || maxMissingChars < 0) {\n throw new ParsingError(\n `maxMissingChars must be between or equal to 0 and 63. Received ${maxMissingChars}`,\n AddressInvalidReason.INVALID_PADDING_STRICTNESS,\n );\n }\n\n let addressBytes: Uint8Array;\n try {\n // Pad the address with leading zeroes, so it is 64 chars long and then convert\n // the hex string to bytes. Every two characters in a hex string constitutes a\n // single byte. So a 64 length hex string becomes a 32 byte array.\n addressBytes = hexToBytes(parsedInput.padStart(64, \"0\"));\n } catch (error: any) {\n // At this point the only way this can fail is if the hex string contains\n // invalid characters.\n throw new ParsingError(`Hex characters are invalid: ${error?.message}`, AddressInvalidReason.INVALID_HEX_CHARS);\n }\n\n const address = new AccountAddress(addressBytes);\n\n // Cannot pad the address if it has more than maxMissingChars missing.\n if (parsedInput.length < 64 - maxMissingChars) {\n if (!address.isSpecial()) {\n throw new ParsingError(\n `Hex string is too short, must be ${64 - maxMissingChars} to 64 chars long, excluding the leading 0x. You may need to fix \nthe addresss by padding it with 0s before passing it to \\`fromString\\` (e.g. <addressString>.padStart(64, '0')). \nReceived ${input}`,\n AddressInvalidReason.TOO_SHORT,\n );\n }\n }\n\n return address;\n }\n\n /**\n * Convenience method for creating an AccountAddress from various input types.\n * This function accepts a string, Uint8Array, or an existing AccountAddress instance and returns the corresponding\n * AccountAddress.\n *\n * @param input - The input to convert into an AccountAddress. This can be a string representation of an address, a Uint8Array,\n * or an existing AccountAddress.\n * @param args.maxMissingChars The number of characters that can be missing in a padded address before it is invalid.\n * @group Implementation\n * @category Serialization\n */\n static from(input: AccountAddressInput, { maxMissingChars = 4 }: { maxMissingChars?: number } = {}): AccountAddress {\n if (typeof input === \"string\") {\n return AccountAddress.fromString(input, { maxMissingChars });\n }\n if (input instanceof Uint8Array) {\n return new AccountAddress(input);\n }\n return input;\n }\n\n /**\n * Create an AccountAddress from various input types, including strings, Uint8Array, and AccountAddress instances.\n *\n * @param input - The input to convert into an AccountAddress, which can be a string, a Uint8Array, or an AccountAddress.\n * @group Implementation\n * @category Serialization\n */\n static fromStrict(input: AccountAddressInput): AccountAddress {\n if (typeof input === \"string\") {\n return AccountAddress.fromStringStrict(input);\n }\n if (input instanceof Uint8Array) {\n return new AccountAddress(input);\n }\n return input;\n }\n // ===\n // Methods for checking validity.\n // ===\n\n /**\n * Check if the provided input is a valid AccountAddress.\n *\n * @param args - The arguments for validation.\n * @param args.input - A hex string representing an account address.\n * @param args.strict - If true, use strict parsing behavior; if false, use relaxed parsing behavior.\n *\n * @returns An object indicating whether the address is valid. If valid, valid = true; if not, valid = false with additional details.\n * If the address is invalid, invalidReason will explain why it is invalid, and invalidReasonMessage will provide the error message.\n * @group Implementation\n * @category Serialization\n */\n static isValid(args: { input: AccountAddressInput; strict?: boolean }): ParsingResult<AddressInvalidReason> {\n try {\n if (args.strict) {\n AccountAddress.fromStrict(args.input);\n } else {\n AccountAddress.from(args.input);\n }\n return { valid: true };\n } catch (error: any) {\n return {\n valid: false,\n invalidReason: error?.invalidReason,\n invalidReasonMessage: error?.message,\n };\n }\n }\n\n /**\n * Determine if two AccountAddresses are equal based on their underlying byte data.\n *\n * @param other - The AccountAddress to compare to.\n * @returns true if the AccountAddresses are equal, false if not.\n * @group Implementation\n * @category Serialization\n */\n equals(other: AccountAddress): boolean {\n if (this.data.length !== other.data.length) return false;\n return this.data.every((value, index) => value === other.data[index]);\n }\n}\n"]}
1
+ {"version":3,"sources":["/Users/maayansavir/work/aptos_repos/aptos-ts-sdk/dist/common/chunk-ZMDE3DNL.js","../../src/core/common.ts","../../src/core/hex.ts","../../src/core/accountAddress.ts"],"names":["ParsingError","message","invalidReason","HexInvalidReason","Hex","_Hex","data","bytesToHex"],"mappings":"AAAA,ilBAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CCQhM,IAAMA,CAAAA,CAAN,MAAA,QAA8B,KAAM,CAkBzC,WAAA,CAAYC,CAAAA,CAAiBC,CAAAA,CAAkB,CAC7C,KAAA,CAAMD,CAAO,CAAA,CACb,IAAA,CAAK,aAAA,CAAgBC,CACvB,CACF,CAAA,CC3BA,4CAAuC,IAS3BC,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CACVA,CAAAA,CAAA,SAAA,CAAY,WAAA,CACZA,CAAAA,CAAA,cAAA,CAAiB,gBAAA,CACjBA,CAAAA,CAAA,iBAAA,CAAoB,mBAAA,CAHVA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAA,CAAA,CAAA,CAAA,CAgCCC,CAAAA,aAAN,MAAMC,CAAI,CAUf,WAAA,CAAYC,CAAAA,CAAkB,CAC5B,IAAA,CAAK,IAAA,CAAOA,CACd,CAaA,YAAA,CAAA,CAA2B,CACzB,OAAO,IAAA,CAAK,IACd,CASA,qBAAA,CAAA,CAAgC,CAC9B,OAAOC,+BAAAA,IAAW,CAAK,IAAI,CAC7B,CASA,QAAA,CAAA,CAAmB,CACjB,MAAO,CAAA,EAAA,EAAK,IAAA,CAAK,qBAAA,CAAsB,CAAC,CAAA,CAAA;ACkVsB;AAnWV,SAAA","file":"/Users/maayansavir/work/aptos_repos/aptos-ts-sdk/dist/common/chunk-ZMDE3DNL.js","sourcesContent":[null,"// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This error is used to explain why parsing failed.\n * @group Implementation\n * @category Serialization\n */\nexport class ParsingError<T> extends Error {\n /**\n * This provides a programmatic way to access why parsing failed. Downstream devs\n * might want to use this to build their own error messages if the default error\n * messages are not suitable for their use case. This should be an enum.\n * @group Implementation\n * @category Serialization\n */\n public invalidReason: T;\n\n /**\n * Creates an instance of the error with a specified message and invalid reason.\n *\n * @param message The error message that describes the issue.\n * @param invalidReason The reason why the input is considered invalid.\n * @group Implementation\n * @category Serialization\n */\n constructor(message: string, invalidReason: T) {\n super(message);\n this.invalidReason = invalidReason;\n }\n}\n\n/**\n * Whereas ParsingError is thrown when parsing fails, e.g. in a fromString function,\n * this type is returned from \"defensive\" functions like isValid.\n * @group Implementation\n * @category Serialization\n */\nexport type ParsingResult<T> = {\n /**\n * True if valid, false otherwise.\n * @group Implementation\n * @category Serialization\n */\n valid: boolean;\n\n /**\n * If valid is false, this will be a code explaining why parsing failed.\n * @group Implementation\n * @category Serialization\n */\n invalidReason?: T;\n\n /**\n * If valid is false, this will be a string explaining why parsing failed.\n * @group Implementation\n * @category Serialization\n */\n invalidReasonMessage?: string;\n};\n","// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bytesToHex, hexToBytes } from \"@noble/hashes/utils\";\nimport { ParsingError, ParsingResult } from \"./common\";\nimport { HexInput } from \"../types\";\n\n/**\n * Provides reasons for parsing failures related to hexadecimal values.\n * @group Implementation\n * @category Serialization\n */\nexport enum HexInvalidReason {\n TOO_SHORT = \"too_short\",\n INVALID_LENGTH = \"invalid_length\",\n INVALID_HEX_CHARS = \"invalid_hex_chars\",\n}\n\n/**\n * NOTE: Do not use this class when working with account addresses; use AccountAddress instead.\n * When accepting hex data as input to a function, prefer to accept HexInput and\n *\n * A helper class for working with hex data. Hex data, when represented as a string,\n * generally looks like this, for example: 0xaabbcc, 45cd32, etc.\n *\n * then use the static helper methods of this class to convert it into the desired\n * format. This enables the greatest flexibility for the developer.\n *\n * Example usage:\n * ```typescript\n * getTransactionByHash(txnHash: HexInput): Promise<Transaction> {\n * const txnHashString = Hex.fromHexInput(txnHash).toString();\n * return await getTransactionByHashInner(txnHashString);\n * }\n * ```\n * This call to `Hex.fromHexInput().toString()` converts the HexInput to a hex string\n * with a leading 0x prefix, regardless of what the input format was.\n *\n * Other ways to chain the functions together:\n * - `Hex.fromHexString({ hexInput: \"0x1f\" }).toUint8Array()`\n * - `new Hex([1, 3]).toStringWithoutPrefix()`\n * @group Implementation\n * @category Serialization\n */\nexport class Hex {\n private readonly data: Uint8Array;\n\n /**\n * Create a new Hex instance from a Uint8Array.\n *\n * @param data - The Uint8Array containing the data to initialize the Hex instance.\n * @group Implementation\n * @category Serialization\n */\n constructor(data: Uint8Array) {\n this.data = data;\n }\n\n // ===\n // Methods for representing an instance of Hex as other types.\n // ===\n\n /**\n * Get the inner hex data as a Uint8Array. The inner data is already a Uint8Array, so no conversion takes place.\n *\n * @returns Hex data as Uint8Array\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n return this.data;\n }\n\n /**\n * Get the hex data as a string without the 0x prefix.\n *\n * @returns Hex string without 0x prefix\n * @group Implementation\n * @category Serialization\n */\n toStringWithoutPrefix(): string {\n return bytesToHex(this.data);\n }\n\n /**\n * Get the hex data as a string with the 0x prefix.\n *\n * @returns Hex string with 0x prefix\n * @group Implementation\n * @category Serialization\n */\n toString(): string {\n return `0x${this.toStringWithoutPrefix()}`;\n }\n\n // ===\n // Methods for creating an instance of Hex from other types.\n // ===\n\n /**\n * Converts a hex string into a Hex instance, allowing for both prefixed and non-prefixed formats.\n *\n * @param str - A hex string, with or without the 0x prefix.\n *\n * @throws ParsingError - If the hex string is too short, has an odd number of characters, or contains invalid hex characters.\n *\n * @returns Hex - The resulting Hex instance created from the provided string.\n * @group Implementation\n * @category Serialization\n */\n static fromHexString(str: string): Hex {\n let input = str;\n\n if (input.startsWith(\"0x\")) {\n input = input.slice(2);\n }\n\n if (input.length === 0) {\n throw new ParsingError(\n \"Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.\",\n HexInvalidReason.TOO_SHORT,\n );\n }\n\n if (input.length % 2 !== 0) {\n throw new ParsingError(\"Hex string must be an even number of hex characters.\", HexInvalidReason.INVALID_LENGTH);\n }\n\n try {\n return new Hex(hexToBytes(input));\n } catch (error: any) {\n throw new ParsingError(\n `Hex string contains invalid hex characters: ${error?.message}`,\n HexInvalidReason.INVALID_HEX_CHARS,\n );\n }\n }\n\n /**\n * Converts an instance of HexInput, which can be a string or a Uint8Array, into a Hex instance.\n * This function is useful for transforming hexadecimal representations into a structured Hex object for further manipulation.\n *\n * @param hexInput - A HexInput which can be a string or Uint8Array.\n * @returns A Hex instance created from the provided hexInput.\n * @group Implementation\n * @category Serialization\n */\n static fromHexInput(hexInput: HexInput): Hex {\n if (hexInput instanceof Uint8Array) return new Hex(hexInput);\n return Hex.fromHexString(hexInput);\n }\n\n /**\n * Converts an instance of HexInput, which can be a string or a Uint8Array, into a Uint8Array.\n *\n * @param hexInput - A HexInput which can be a string or Uint8Array.\n * @returns A Uint8Array created from the provided hexInput.\n */\n static hexInputToUint8Array(hexInput: HexInput): Uint8Array {\n if (hexInput instanceof Uint8Array) return hexInput;\n return Hex.fromHexString(hexInput).toUint8Array();\n }\n\n /**\n * Converts a HexInput (string or Uint8Array) to a hex string with '0x' prefix.\n *\n * @param hexInput - The input to convert, either a hex string (with/without '0x' prefix) or Uint8Array\n * @returns A hex string with '0x' prefix (e.g., \"0x1234\")\n *\n * @example\n * ```typescript\n * Hex.hexInputToString(\"1234\") // returns \"0x1234\"\n * Hex.hexInputToString(\"0x1234\") // returns \"0x1234\"\n * Hex.hexInputToString(new Uint8Array([0x12, 0x34])) // returns \"0x1234\"\n * ```\n */\n static hexInputToString(hexInput: HexInput): string {\n return Hex.fromHexInput(hexInput).toString();\n }\n\n /**\n * Converts a HexInput (string or Uint8Array) to a hex string without '0x' prefix.\n *\n * @param hexInput - The input to convert, either a hex string (with/without '0x' prefix) or Uint8Array\n * @returns A hex string without '0x' prefix (e.g., \"1234\")\n *\n * @example\n * ```typescript\n * Hex.hexInputToStringWithoutPrefix(\"1234\") // returns \"1234\"\n * Hex.hexInputToStringWithoutPrefix(\"0x1234\") // returns \"1234\"\n * Hex.hexInputToStringWithoutPrefix(new Uint8Array([0x12, 0x34])) // returns \"1234\"\n * ```\n */\n static hexInputToStringWithoutPrefix(hexInput: HexInput): string {\n return Hex.fromHexInput(hexInput).toStringWithoutPrefix();\n }\n\n // ===\n // Methods for checking validity.\n // ===\n\n /**\n * Check if the provided string is a valid hexadecimal representation.\n *\n * @param str - A hex string representing byte data.\n *\n * @returns An object containing:\n * - valid: A boolean indicating whether the string is valid.\n * - invalidReason: The reason for invalidity if the string is not valid.\n * - invalidReasonMessage: A message explaining why the string is invalid.\n * @group Implementation\n * @category Serialization\n */\n static isValid(str: string): ParsingResult<HexInvalidReason> {\n try {\n Hex.fromHexString(str);\n return { valid: true };\n } catch (error: any) {\n return {\n valid: false,\n invalidReason: error?.invalidReason,\n invalidReasonMessage: error?.message,\n };\n }\n }\n\n /**\n * Determine if two Hex instances are equal by comparing their underlying byte data.\n *\n * @param other The Hex instance to compare to.\n * @returns true if the Hex instances are equal, false if not.\n * @group Implementation\n * @category Serialization\n */\n equals(other: Hex): boolean {\n if (this.data.length !== other.data.length) return false;\n return this.data.every((value, index) => value === other.data[index]);\n }\n}\n\nexport const hexToAsciiString = (hex: string) => new TextDecoder().decode(Hex.fromHexInput(hex).toUint8Array());\n","// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bytesToHex, hexToBytes } from \"@noble/hashes/utils\";\nimport { Serializable, Serializer } from \"../bcs/serializer\";\nimport { Deserializer } from \"../bcs/deserializer\";\nimport { ParsingError, ParsingResult } from \"./common\";\nimport { TransactionArgument } from \"../transactions/instances/transactionArgument\";\nimport { HexInput, ScriptTransactionArgumentVariants } from \"../types\";\n\n/**\n * Provides reasons for an address was invalid.\n * @group Implementation\n * @category Serialization\n */\nexport enum AddressInvalidReason {\n INCORRECT_NUMBER_OF_BYTES = \"incorrect_number_of_bytes\",\n INVALID_HEX_CHARS = \"invalid_hex_chars\",\n TOO_SHORT = \"too_short\",\n TOO_LONG = \"too_long\",\n LEADING_ZERO_X_REQUIRED = \"leading_zero_x_required\",\n LONG_FORM_REQUIRED_UNLESS_SPECIAL = \"long_form_required_unless_special\",\n INVALID_PADDING_ZEROES = \"INVALID_PADDING_ZEROES\",\n INVALID_PADDING_STRICTNESS = \"INVALID_PADDING_STRICTNESS\",\n}\n\n/**\n * The input for an account address, which can be either a hexadecimal string or a standard account address.\n * @group Implementation\n * @category Serialization\n */\nexport type AccountAddressInput = HexInput | AccountAddress;\n\n/**\n * NOTE: Only use this class for account addresses. For other hex data, e.g. transaction\n * hashes, use the Hex class.\n *\n * AccountAddress is used for working with account addresses. Account addresses, when\n * represented as a string, generally look like these examples:\n * - 0x1\n * - 0xaa86fe99004361f747f91342ca13c426ca0cccb0c1217677180c9493bad6ef0c\n *\n * Proper formatting and parsing of account addresses is defined by AIP-40.\n * To learn more about the standard, read the AIP here:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * The comments in this class make frequent reference to the LONG and SHORT formats,\n * as well as \"special\" addresses. To learn what these refer to see AIP-40.\n * @group Implementation\n * @category Serialization\n */\nexport class AccountAddress extends Serializable implements TransactionArgument {\n /**\n * This is the internal representation of an account address.\n * @group Implementation\n * @category Serialization\n */\n readonly data: Uint8Array;\n\n /**\n * The number of bytes that make up an account address.\n * @group Implementation\n * @category Serialization\n */\n static readonly LENGTH: number = 32;\n\n /**\n * The length of an address string in LONG form without a leading 0x.\n * @group Implementation\n * @category Serialization\n */\n static readonly LONG_STRING_LENGTH: number = 64;\n\n static ZERO: AccountAddress = AccountAddress.from(\"0x0\");\n\n static ONE: AccountAddress = AccountAddress.from(\"0x1\");\n\n static TWO: AccountAddress = AccountAddress.from(\"0x2\");\n\n static THREE: AccountAddress = AccountAddress.from(\"0x3\");\n\n static FOUR: AccountAddress = AccountAddress.from(\"0x4\");\n\n static A: AccountAddress = AccountAddress.from(\"0xA\");\n\n /**\n * Creates an instance of AccountAddress from a Uint8Array.\n *\n * This function ensures that the input data is exactly 32 bytes long, which is required for a valid account address.\n *\n * @param input A Uint8Array representing an account address.\n * @throws ParsingError if the input length is not equal to 32 bytes.\n * @group Implementation\n * @category Serialization\n */\n constructor(input: Uint8Array) {\n super();\n if (input.length !== AccountAddress.LENGTH) {\n throw new ParsingError(\n \"AccountAddress data should be exactly 32 bytes long\",\n AddressInvalidReason.INCORRECT_NUMBER_OF_BYTES,\n );\n }\n this.data = input;\n }\n\n /**\n * Determines if the address is classified as special, which is defined as 0x0 to 0xf inclusive.\n * In other words, the last byte of the address must be < 0b10000 (16)\n * and every other byte must be zero.\n *\n * For more information on how special addresses are defined, see AIP-40:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * @returns true if the address is special, false otherwise.\n * @group Implementation\n * @category Serialization\n */\n isSpecial(): boolean {\n return (\n this.data.slice(0, this.data.length - 1).every((byte) => byte === 0) && this.data[this.data.length - 1] < 0b10000\n );\n }\n // ===\n // Methods for representing an instance of AccountAddress as other types.\n // ===\n\n /**\n * Return the AccountAddress as a string as per AIP-40.\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n * This representation returns special addresses in SHORT form (0xf)\n * and other addresses in LONG form (0x + 64 characters).\n *\n * @returns AccountAddress as a string conforming to AIP-40.\n * @group Implementation\n * @category Serialization\n */\n toString(): `0x${string}` {\n return `0x${this.toStringWithoutPrefix()}`;\n }\n\n /**\n * Return the AccountAddress as a string conforming to AIP-40 but without the leading 0x.\n *\n * NOTE: Prefer to use `toString` where possible.\n *\n * @returns AccountAddress as a string without the leading 0x.\n * @group Implementation\n * @category Serialization\n */\n toStringWithoutPrefix(): string {\n let hex = bytesToHex(this.data);\n if (this.isSpecial()) {\n hex = hex[hex.length - 1];\n }\n return hex;\n }\n\n /**\n * Convert the account address to a string in LONG format, which is always 0x followed by 64 hex characters.\n *\n * NOTE: Prefer to use `toString` where possible, as it formats special addresses using the SHORT form (no leading 0s).\n *\n * @returns AccountAddress as a string in LONG form.\n * @group Implementation\n * @category Serialization\n */\n toStringLong(): `0x${string}` {\n return `0x${this.toStringLongWithoutPrefix()}`;\n }\n\n /**\n * Returns the account address as a string in LONG form without a leading 0x.\n * This function will include leading zeroes and will produce a string of 64 hex characters.\n *\n * NOTE: Prefer to use `toString` where possible, as it formats special addresses using the SHORT form (no leading 0s).\n *\n * @returns {string} The account address in LONG form.\n * @group Implementation\n * @category Serialization\n */\n toStringLongWithoutPrefix(): string {\n return bytesToHex(this.data);\n }\n\n /**\n * Convert the account address to a string in SHORT format, which is 0x followed by the shortest\n * possible representation (no leading zeros).\n *\n * @returns AccountAddress as a string in SHORT form.\n * @group Implementation\n * @category Serialization\n */\n toStringShort(): `0x${string}` {\n return `0x${this.toStringShortWithoutPrefix()}`;\n }\n\n /**\n * Returns a lossless short string representation of the address by trimming leading zeros.\n * If the address consists of all zeros, returns \"0\".\n *\n * @returns A string representation of the address without leading zeros\n * @group Implementation\n * @category Serialization\n */\n toStringShortWithoutPrefix(): string {\n const hex = bytesToHex(this.data).replace(/^0+/, \"\");\n return hex === \"\" ? \"0\" : hex;\n }\n\n /**\n * Get the inner data as a Uint8Array.\n * The inner data is already a Uint8Array, so no conversion takes place.\n *\n * @returns Hex data as Uint8Array\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n return this.data;\n }\n\n /**\n * Serialize the AccountAddress to a Serializer instance's data buffer.\n * @param serializer The serializer to serialize the AccountAddress to.\n * @returns void\n * @example\n * const serializer = new Serializer();\n * const address = AccountAddress.fromString(\"0x1\");\n * address.serialize(serializer);\n * const bytes = serializer.toUint8Array();\n * // `bytes` is now the BCS-serialized address.\n * @group Implementation\n * @category Serialization\n */\n serialize(serializer: Serializer): void {\n serializer.serializeFixedBytes(this.data);\n }\n\n /**\n * Serializes the current instance into a byte sequence suitable for entry functions.\n * This allows for the proper encoding of data when interacting with entry functions in the blockchain.\n *\n * @param serializer - The serializer instance used to convert the data into bytes.\n * @group Implementation\n * @category Serialization\n */\n serializeForEntryFunction(serializer: Serializer): void {\n const bcsBytes = this.bcsToBytes();\n serializer.serializeBytes(bcsBytes);\n }\n\n /**\n * Serializes the current instance for use in a script function by encoding it into a byte sequence.\n * This process involves serializing the variant index and the instance data, making it suitable for transmission.\n *\n * @param serializer - The serializer instance used to perform the serialization.\n * @group Implementation\n * @category Serialization\n */\n serializeForScriptFunction(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(ScriptTransactionArgumentVariants.Address);\n serializer.serialize(this);\n }\n\n /**\n * Deserialize an AccountAddress from the byte buffer in a Deserializer instance.\n * This function allows you to convert a byte representation of an AccountAddress into an instance of AccountAddress.\n * @param deserializer The deserializer to deserialize the AccountAddress from.\n * @returns An instance of AccountAddress.\n * @example\n * const bytes = hexToBytes(\"0x0102030405060708091011121314151617181920212223242526272829303132\");\n * const deserializer = new Deserializer(bytes);\n * const address = AccountAddress.deserialize(deserializer);\n * // `address` is now an instance of AccountAddress.\n * @group Implementation\n * @category Serialization\n */\n static deserialize(deserializer: Deserializer): AccountAddress {\n const bytes = deserializer.deserializeFixedBytes(AccountAddress.LENGTH);\n return new AccountAddress(bytes);\n }\n\n // ===\n // Methods for creating an instance of AccountAddress from other types.\n // ===\n\n /**\n * NOTE: This function has strict parsing behavior. For relaxed behavior, please use\n * the `fromString` function.\n *\n * Creates an instance of AccountAddress from a hex string.\n *\n * This function allows only the strictest formats defined by AIP-40. In short this\n * means only the following formats are accepted:\n *\n * - LONG\n * - SHORT for special addresses\n *\n * Where:\n * - LONG is defined as 0x + 64 hex characters.\n * - SHORT for special addresses is 0x0 to 0xf inclusive without padding zeroes.\n *\n * This means the following are not accepted:\n * - SHORT for non-special addresses.\n * - Any address without a leading 0x.\n *\n * @param input - A hex string representing an account address.\n *\n * @throws {ParsingError} If the hex string does not start with 0x or is not in a valid format.\n *\n * @remarks\n *\n * This function has strict parsing behavior. For relaxed behavior, please use the `fromString` function.\n *\n * @see AIP-40 documentation for more details on address formats:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * @returns An instance of AccountAddress.\n * @group Implementation\n * @category Serialization\n */\n static fromStringStrict(input: string): AccountAddress {\n // Assert the string starts with 0x.\n if (!input.startsWith(\"0x\")) {\n throw new ParsingError(\"Hex string must start with a leading 0x.\", AddressInvalidReason.LEADING_ZERO_X_REQUIRED);\n }\n\n const address = AccountAddress.fromString(input);\n\n // Check if the address is in LONG form. If it is not, this is only allowed for\n // special addresses, in which case we check it is in proper SHORT form.\n if (input.length !== AccountAddress.LONG_STRING_LENGTH + 2) {\n if (!address.isSpecial()) {\n throw new ParsingError(\n `The given hex string ${input} is not a special address, it must be represented as 0x + 64 chars.`,\n AddressInvalidReason.LONG_FORM_REQUIRED_UNLESS_SPECIAL,\n );\n } else if (input.length !== 3) {\n // 0x + one hex char is the only valid SHORT form for special addresses.\n throw new ParsingError(\n // eslint-disable-next-line max-len\n `The given hex string ${input} is a special address not in LONG form, it must be 0x0 to 0xf without padding zeroes.`,\n AddressInvalidReason.INVALID_PADDING_ZEROES,\n );\n }\n }\n\n return address;\n }\n\n /**\n * NOTE: This function has relaxed parsing behavior. For strict behavior, please use\n * the `fromStringStrict` function. Where possible use `fromStringStrict` rather than this\n * function, `fromString`.\n *\n * Creates an instance of AccountAddress from a hex string.\n *\n * This function allows all formats defined by AIP-40. In short this means the\n * following formats are accepted:\n *\n * - LONG, with or without leading 0x\n * - SHORT*, with or without leading 0x\n *\n * Where:\n * - LONG is 64 hex characters.\n * - SHORT* is 1 to 63 hex characters inclusive. The address can have missing values up to `maxMissingChars` before it is padded.\n * - Padding zeroes are allowed, e.g. 0x0123 is valid.\n *\n * Learn more about the different address formats by reading AIP-40:\n * https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md.\n *\n * @param input A hex string representing an account address.\n * @param args.maxMissingChars The number of characters that can be missing in a padded address before it is invalid.\n *\n * @returns An instance of AccountAddress.\n *\n * @throws ParsingError if the hex string is too short, too long, or contains invalid characters.\n * @group Implementation\n * @category Serialization\n */\n static fromString(input: string, { maxMissingChars = 4 }: { maxMissingChars?: number } = {}): AccountAddress {\n let parsedInput = input;\n // Remove leading 0x for parsing.\n if (input.startsWith(\"0x\")) {\n parsedInput = input.slice(2);\n }\n\n // Ensure the address string is at least 1 character long.\n if (parsedInput.length === 0) {\n throw new ParsingError(\n \"Hex string is too short, must be 1 to 64 chars long, excluding the leading 0x.\",\n AddressInvalidReason.TOO_SHORT,\n );\n }\n\n // Ensure the address string is not longer than 64 characters.\n if (parsedInput.length > 64) {\n throw new ParsingError(\n \"Hex string is too long, must be 1 to 64 chars long, excluding the leading 0x.\",\n AddressInvalidReason.TOO_LONG,\n );\n }\n\n // Ensure that the maxMissingChars is between or equal to 0 and 63.\n if (maxMissingChars > 63 || maxMissingChars < 0) {\n throw new ParsingError(\n `maxMissingChars must be between or equal to 0 and 63. Received ${maxMissingChars}`,\n AddressInvalidReason.INVALID_PADDING_STRICTNESS,\n );\n }\n\n let addressBytes: Uint8Array;\n try {\n // Pad the address with leading zeroes, so it is 64 chars long and then convert\n // the hex string to bytes. Every two characters in a hex string constitutes a\n // single byte. So a 64 length hex string becomes a 32 byte array.\n addressBytes = hexToBytes(parsedInput.padStart(64, \"0\"));\n } catch (error: any) {\n // At this point the only way this can fail is if the hex string contains\n // invalid characters.\n throw new ParsingError(`Hex characters are invalid: ${error?.message}`, AddressInvalidReason.INVALID_HEX_CHARS);\n }\n\n const address = new AccountAddress(addressBytes);\n\n // Cannot pad the address if it has more than maxMissingChars missing.\n if (parsedInput.length < 64 - maxMissingChars) {\n if (!address.isSpecial()) {\n throw new ParsingError(\n `Hex string is too short, must be ${64 - maxMissingChars} to 64 chars long, excluding the leading 0x. You may need to fix \nthe addresss by padding it with 0s before passing it to \\`fromString\\` (e.g. <addressString>.padStart(64, '0')). \nReceived ${input}`,\n AddressInvalidReason.TOO_SHORT,\n );\n }\n }\n\n return address;\n }\n\n /**\n * Convenience method for creating an AccountAddress from various input types.\n * This function accepts a string, Uint8Array, or an existing AccountAddress instance and returns the corresponding\n * AccountAddress.\n *\n * @param input - The input to convert into an AccountAddress. This can be a string representation of an address, a Uint8Array,\n * or an existing AccountAddress.\n * @param args.maxMissingChars The number of characters that can be missing in a padded address before it is invalid.\n * @group Implementation\n * @category Serialization\n */\n static from(input: AccountAddressInput, { maxMissingChars = 4 }: { maxMissingChars?: number } = {}): AccountAddress {\n if (typeof input === \"string\") {\n return AccountAddress.fromString(input, { maxMissingChars });\n }\n if (input instanceof Uint8Array) {\n return new AccountAddress(input);\n }\n return input;\n }\n\n /**\n * Create an AccountAddress from various input types, including strings, Uint8Array, and AccountAddress instances.\n *\n * @param input - The input to convert into an AccountAddress, which can be a string, a Uint8Array, or an AccountAddress.\n * @group Implementation\n * @category Serialization\n */\n static fromStrict(input: AccountAddressInput): AccountAddress {\n if (typeof input === \"string\") {\n return AccountAddress.fromStringStrict(input);\n }\n if (input instanceof Uint8Array) {\n return new AccountAddress(input);\n }\n return input;\n }\n // ===\n // Methods for checking validity.\n // ===\n\n /**\n * Check if the provided input is a valid AccountAddress.\n *\n * @param args - The arguments for validation.\n * @param args.input - A hex string representing an account address.\n * @param args.strict - If true, use strict parsing behavior; if false, use relaxed parsing behavior.\n *\n * @returns An object indicating whether the address is valid. If valid, valid = true; if not, valid = false with additional details.\n * If the address is invalid, invalidReason will explain why it is invalid, and invalidReasonMessage will provide the error message.\n * @group Implementation\n * @category Serialization\n */\n static isValid(args: { input: AccountAddressInput; strict?: boolean }): ParsingResult<AddressInvalidReason> {\n try {\n if (args.strict) {\n AccountAddress.fromStrict(args.input);\n } else {\n AccountAddress.from(args.input);\n }\n return { valid: true };\n } catch (error: any) {\n return {\n valid: false,\n invalidReason: error?.invalidReason,\n invalidReasonMessage: error?.message,\n };\n }\n }\n\n /**\n * Determine if two AccountAddresses are equal based on their underlying byte data.\n *\n * @param other - The AccountAddress to compare to.\n * @returns true if the AccountAddresses are equal, false if not.\n * @group Implementation\n * @category Serialization\n */\n equals(other: AccountAddress): boolean {\n if (this.data.length !== other.data.length) return false;\n return this.data.every((value, index) => value === other.data[index]);\n }\n}\n"]}
@@ -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 _chunk66TIRJFDjs = require('../chunk-66TIRJFD.js');var _child_process = require('child_process');var _treekill = require('tree-kill'); var _treekill2 = _interopRequireDefault(_treekill);var _os = require('os');var u=class{constructor(s){this.MAXIMUM_WAIT_TIME_SEC=75;this.READINESS_ENDPOINT="http://127.0.0.1:8070/";this.showStdout=!0;this.process=null;this.showStdout=_nullishCoalesce(_optionalChain([s, 'optionalAccess', _ => _.showStdout]), () => (!0))}async stop(){await new Promise((s,e)=>{_optionalChain([this, 'access', _2 => _2.process, 'optionalAccess', _3 => _3.pid])&&_treekill2.default.call(void 0, this.process.pid,r=>{r?e(r):s(!0)})})}async run(){await this.checkIfProcessIsUp()||(this.start(),await this.waitUntilProcessIsUp())}start(){let s="npx",e=["aptos","node","run-localnet","--force-restart","--assume-yes","--with-indexer-api"],r=_os.platform.call(void 0, ),o={env:{...process.env,ENABLE_KEYLESS_DEFAULT:"1"},...r==="win32"&&{shell:!0}};this.process=_child_process.spawn.call(void 0, s,e,o),_optionalChain([this, 'access', _4 => _4.process, 'access', _5 => _5.stdout, 'optionalAccess', _6 => _6.on, 'call', _7 => _7("data",a=>{let t=a.toString();this.showStdout&&console.log(t)})])}async waitUntilProcessIsUp(){let s=await this.checkIfProcessIsUp(),e=Date.now()/1e3,r=e;for(;!s&&e+this.MAXIMUM_WAIT_TIME_SEC>r;)await _chunk66TIRJFDjs.ba.call(void 0, 1e3),s=await this.checkIfProcessIsUp(),r=Date.now()/1e3;if(!s)throw new Error("Process failed to start");return!0}async checkIfProcessIsUp(){try{return(await fetch(this.READINESS_ENDPOINT)).status===200}catch (e2){return!1}}};var l=class{async init(s){let{network:e,profile:r,extraArguments:o,showStdout:a}=s,t=["aptos","init",`--network=${_nullishCoalesce(e, () => ("local"))}`,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return o&&t.push(...o),this.runCommand(t,a)}async compile(s){let{packageDirectoryPath:e,namedAddresses:r,extraArguments:o,showStdout:a}=s,t=["aptos","move","compile","--package-dir",e],n=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(n)),o&&t.push(...o),this.runCommand(t,a)}async test(s){let{packageDirectoryPath:e,namedAddresses:r,extraArguments:o,showStdout:a}=s,t=["aptos","move","test","--package-dir",e],n=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(n)),o&&t.push(...o),this.runCommand(t,a)}async publish(s){let{packageDirectoryPath:e,namedAddresses:r,profile:o,extraArguments:a,showStdout:t}=s,n=["aptos","move","publish","--package-dir",e,`--profile=${_nullishCoalesce(o, () => ("default"))}`],i=this.parseNamedAddresses(r);return n.push(...this.prepareNamedAddresses(i)),a&&n.push(...a),this.runCommand(n,t)}async createObjectAndPublishPackage(s){let{packageDirectoryPath:e,addressName:r,namedAddresses:o,profile:a,extraArguments:t,showStdout:n}=s,i=["aptos","move","create-object-and-publish-package","--package-dir",e,"--address-name",r,`--profile=${_nullishCoalesce(a, () => ("default"))}`],d=this.parseNamedAddresses(o);i.push(...this.prepareNamedAddresses(d)),t&&i.push(...t);let{output:c}=await this.runCommand(i,n);return{objectAddress:this.extractAddressFromOutput(c)}}async upgradeObjectPackage(s){let{packageDirectoryPath:e,objectAddress:r,namedAddresses:o,profile:a,extraArguments:t,showStdout:n}=s,i=["aptos","move","upgrade-object-package","--package-dir",e,"--object-address",r,`--profile=${_nullishCoalesce(a, () => ("default"))}`],d=this.parseNamedAddresses(o);return i.push(...this.prepareNamedAddresses(d)),t&&i.push(...t),this.runCommand(i,n)}async buildPublishPayload(s){let{outputFile:e,packageDirectoryPath:r,namedAddresses:o,extraArguments:a,showStdout:t}=s,n=["aptos","move","build-publish-payload","--json-output-file",e,"--package-dir",r],i=this.parseNamedAddresses(o);return n.push(...this.prepareNamedAddresses(i)),a&&n.push(...a),this.runCommand(n,t)}async runScript(s){let{compiledScriptPath:e,profile:r,extraArguments:o,showStdout:a}=s,t=["aptos","move","run-script","--compiled-script-path",e,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return o&&t.push(...o),this.runCommand(t,a)}async gasProfile(s){let{network:e,transactionId:r,extraArguments:o,showStdout:a}=s,t=["aptos","move","replay","--profile-gas","--network",e,"--txn-id",r];return o&&t.push(...o),this.runCommand(t,a)}async runCommand(s,e=!0){return new Promise((r,o)=>{let a=_os.platform.call(void 0, ),t,n="",i="";a==="win32"?t=_child_process.spawn.call(void 0, "npx",s,{shell:!0}):t=_child_process.spawn.call(void 0, "npx",s),t.stdout.on("data",d=>{i=d.toString(),n+=d.toString()}),e&&(t.stdout.pipe(process.stdout),t.stderr.pipe(process.stderr)),process.stdin.pipe(t.stdin),t.on("close",d=>{if(d===0)try{let c=JSON.parse(i);c.Error?o(new Error(`Error: ${c.Error}`)):c.Result&&r({result:c.Result,output:n})}catch (e3){r({output:n})}else o(new Error(`Child process exited with code ${d}`))})})}prepareNamedAddresses(s){let e=s.size,r=[];if(e===0)return r;r.push("--named-addresses");let o=[];return s.forEach((a,t)=>{let n=`${t}=${a.toString()}`;o.push(n)}),r.push(o.join(",")),r}parseNamedAddresses(s){let e=new Map;return Object.keys(s).forEach(r=>{let o=s[r];e.set(r,o)}),e}extractAddressFromOutput(s){let e=s.match("Code was successfully deployed to object address (0x[0-9a-fA-F]+)");if(e)return e[1];throw new Error("Failed to extract object address from output")}};exports.LocalNode = u; exports.Move = l;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkZMDE3DNLjs = require('../chunk-ZMDE3DNL.js');var _child_process = require('child_process');var _treekill = require('tree-kill'); var _treekill2 = _interopRequireDefault(_treekill);var _os = require('os');var u=class{constructor(s){this.MAXIMUM_WAIT_TIME_SEC=75;this.READINESS_ENDPOINT="http://127.0.0.1:8070/";this.showStdout=!0;this.process=null;this.showStdout=_nullishCoalesce(_optionalChain([s, 'optionalAccess', _ => _.showStdout]), () => (!0))}async stop(){await new Promise((s,e)=>{_optionalChain([this, 'access', _2 => _2.process, 'optionalAccess', _3 => _3.pid])&&_treekill2.default.call(void 0, this.process.pid,r=>{r?e(r):s(!0)})})}async run(){await this.checkIfProcessIsUp()||(this.start(),await this.waitUntilProcessIsUp())}start(){let s="npx",e=["aptos","node","run-localnet","--force-restart","--assume-yes","--with-indexer-api"],r=_os.platform.call(void 0, ),o={env:{...process.env,ENABLE_KEYLESS_DEFAULT:"1"},...r==="win32"&&{shell:!0}};this.process=_child_process.spawn.call(void 0, s,e,o),_optionalChain([this, 'access', _4 => _4.process, 'access', _5 => _5.stdout, 'optionalAccess', _6 => _6.on, 'call', _7 => _7("data",a=>{let t=a.toString();this.showStdout&&console.log(t)})])}async waitUntilProcessIsUp(){let s=await this.checkIfProcessIsUp(),e=Date.now()/1e3,r=e;for(;!s&&e+this.MAXIMUM_WAIT_TIME_SEC>r;)await _chunkZMDE3DNLjs.aa.call(void 0, 1e3),s=await this.checkIfProcessIsUp(),r=Date.now()/1e3;if(!s)throw new Error("Process failed to start");return!0}async checkIfProcessIsUp(){try{return(await fetch(this.READINESS_ENDPOINT)).status===200}catch (e2){return!1}}};var l=class{async init(s){let{network:e,profile:r,extraArguments:o,showStdout:a}=s,t=["aptos","init",`--network=${_nullishCoalesce(e, () => ("local"))}`,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return o&&t.push(...o),this.runCommand(t,a)}async compile(s){let{packageDirectoryPath:e,namedAddresses:r,extraArguments:o,showStdout:a}=s,t=["aptos","move","compile","--package-dir",e],n=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(n)),o&&t.push(...o),this.runCommand(t,a)}async test(s){let{packageDirectoryPath:e,namedAddresses:r,extraArguments:o,showStdout:a}=s,t=["aptos","move","test","--package-dir",e],n=this.parseNamedAddresses(r);return t.push(...this.prepareNamedAddresses(n)),o&&t.push(...o),this.runCommand(t,a)}async publish(s){let{packageDirectoryPath:e,namedAddresses:r,profile:o,extraArguments:a,showStdout:t}=s,n=["aptos","move","publish","--package-dir",e,`--profile=${_nullishCoalesce(o, () => ("default"))}`],i=this.parseNamedAddresses(r);return n.push(...this.prepareNamedAddresses(i)),a&&n.push(...a),this.runCommand(n,t)}async createObjectAndPublishPackage(s){let{packageDirectoryPath:e,addressName:r,namedAddresses:o,profile:a,extraArguments:t,showStdout:n}=s,i=["aptos","move","create-object-and-publish-package","--package-dir",e,"--address-name",r,`--profile=${_nullishCoalesce(a, () => ("default"))}`],d=this.parseNamedAddresses(o);i.push(...this.prepareNamedAddresses(d)),t&&i.push(...t);let{output:c}=await this.runCommand(i,n);return{objectAddress:this.extractAddressFromOutput(c)}}async upgradeObjectPackage(s){let{packageDirectoryPath:e,objectAddress:r,namedAddresses:o,profile:a,extraArguments:t,showStdout:n}=s,i=["aptos","move","upgrade-object-package","--package-dir",e,"--object-address",r,`--profile=${_nullishCoalesce(a, () => ("default"))}`],d=this.parseNamedAddresses(o);return i.push(...this.prepareNamedAddresses(d)),t&&i.push(...t),this.runCommand(i,n)}async buildPublishPayload(s){let{outputFile:e,packageDirectoryPath:r,namedAddresses:o,extraArguments:a,showStdout:t}=s,n=["aptos","move","build-publish-payload","--json-output-file",e,"--package-dir",r],i=this.parseNamedAddresses(o);return n.push(...this.prepareNamedAddresses(i)),a&&n.push(...a),this.runCommand(n,t)}async runScript(s){let{compiledScriptPath:e,profile:r,extraArguments:o,showStdout:a}=s,t=["aptos","move","run-script","--compiled-script-path",e,`--profile=${_nullishCoalesce(r, () => ("default"))}`];return o&&t.push(...o),this.runCommand(t,a)}async gasProfile(s){let{network:e,transactionId:r,extraArguments:o,showStdout:a}=s,t=["aptos","move","replay","--profile-gas","--network",e,"--txn-id",r];return o&&t.push(...o),this.runCommand(t,a)}async runCommand(s,e=!0){return new Promise((r,o)=>{let a=_os.platform.call(void 0, ),t,n="",i="";a==="win32"?t=_child_process.spawn.call(void 0, "npx",s,{shell:!0}):t=_child_process.spawn.call(void 0, "npx",s),t.stdout.on("data",d=>{i=d.toString(),n+=d.toString()}),e&&(t.stdout.pipe(process.stdout),t.stderr.pipe(process.stderr)),process.stdin.pipe(t.stdin),t.on("close",d=>{if(d===0)try{let c=JSON.parse(i);c.Error?o(new Error(`Error: ${c.Error}`)):c.Result&&r({result:c.Result,output:n})}catch (e3){r({output:n})}else o(new Error(`Child process exited with code ${d}`))})})}prepareNamedAddresses(s){let e=s.size,r=[];if(e===0)return r;r.push("--named-addresses");let o=[];return s.forEach((a,t)=>{let n=`${t}=${a.toString()}`;o.push(n)}),r.push(o.join(",")),r}parseNamedAddresses(s){let e=new Map;return Object.keys(s).forEach(r=>{let o=s[r];e.set(r,o)}),e}extractAddressFromOutput(s){let e=s.match("Code was successfully deployed to object address (0x[0-9a-fA-F]+)");if(e)return e[1];throw new Error("Failed to extract object address from output")}};exports.LocalNode = u; exports.Move = l;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,5 @@
1
1
  import { S as Serializable, T as TransactionArgument, H as HexInput, a as Serializer, D as Deserializer, E as EntryFunctionArgument, A as AnyNumber, U as Uint8, b as Uint16, c as Uint32, d as Deserializable, e as Hex, f as AuthenticationKeyScheme, g as AccountAddress, N as Network, C as Client, h as ClientConfig, F as FullNodeConfig, I as IndexerConfig, i as FaucetConfig, j as AptosSettings, P as PrivateKeyVariants, k as AnyPublicKeyVariant, M as MoveModuleId, l as ScriptFunctionArgument, m as MoveFunctionId, n as MoveFunctionGenericTypeParam, o as MoveStructId, p as MoveValue, q as AccountAddressInput, r as MoveFunction, s as MoveModule, t as AccountData, L as LedgerVersionArg, u as MoveModuleBytecode, v as CursorPaginationArgs, w as PaginationArgs, 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, Z as GetTokenActivityResponse, _ as GetEventsResponse, $ as WaitForTransactionOptions, a0 as UserTransactionResponse, a1 as GetFungibleAssetMetadataResponse, a2 as GetFungibleAssetActivitiesResponse, a3 as GetCurrentFungibleAssetBalancesResponse, a4 as LedgerInfo, a5 as Block, a6 as GetChainTopUserTransactionsResponse, a7 as GraphqlQuery, a8 as GetProcessorStatusResponse, a9 as GetANSNameResponse, aa as GetNumberOfDelegatorsResponse, ab as GetDelegatedStakingActivitiesResponse, ac as PendingTransactionResponse, ad as CommittedTransactionResponse, ae as GasEstimation, af as TableItemRequest, ag as GetTableItemsDataResponse, ah as GetTableItemsMetadataResponse, ai as EphemeralPublicKeyVariant, aj as EphemeralCertificateVariant, ak as ZkpVariant, al as SigningScheme, am as SigningSchemeInput, an as ClientRequest, ao as ClientResponse, ap as AptosRequest, aq as AptosResponse, ar as MimeType } from './accountAddress-D0xKX-UM.js';
2
2
  export { aI as AccountAuthenticatorVariant, br as AccountSignature, av as AddressInvalidReason, aJ as AnySignatureVariant, a$ as BlockEndInfo, b0 as BlockEpilogueTransactionResponse, aY as BlockMetadataTransactionResponse, aO as ClientHeadersType, b8 as DecodedTableData, b9 as DeletedTableData, bN as DeriveScheme, bu as DirectWriteSet, bb as EntryFunctionPayloadResponse, aK as EphemeralSignatureVariant, bw as Event, bv as EventGuid, bQ as GenerateAccount, bO as GenerateAccountWithEd25519, bP as GenerateAccountWithSingleSignerSecp256k1Key, be as GenesisPayload, aX as GenesisTransactionResponse, ay as HexInvalidReason, bJ as MoveAbility, bD as MoveAddressType, bI as MoveFunctionVisibility, bE as MoveObjectType, bF as MoveOptionType, bf as MoveScriptBytecode, bL as MoveStruct, bK as MoveStructField, bG as MoveStructType, bH as MoveType, bB as MoveUint128Type, by as MoveUint16Type, bC as MoveUint256Type, bz as MoveUint32Type, bA as MoveUint64Type, bx as MoveUint8Type, bd as MultisigPayloadResponse, bW as NetworkToChainId, bT as NetworkToFaucetAPI, bR as NetworkToIndexerAPI, bX as NetworkToNetworkName, bS as NetworkToNodeAPI, bU as NetworkToPepperAPI, bV as NetworkToProverAPI, aA as OrderBy, aB as OrderByValue, aw as ParsingError, ax as ParsingResult, bM as RoleType, bc as ScriptPayloadResponse, aE as ScriptTransactionArgumentVariants, bt as ScriptWriteSet, aZ as StateCheckpointTransactionResponse, aC as TokenStandard, aH as TransactionAuthenticatorVariant, bm as TransactionEd25519Signature, bq as TransactionFeePayerSignature, bp as TransactionMultiAgentSignature, bo as TransactionMultiEd25519Signature, ba as TransactionPayloadResponse, aF as TransactionPayloadVariants, aP as TransactionResponseType, bn as TransactionSecp256k1Signature, bg as TransactionSignature, aG as TransactionVariants, aD as TypeTagVariants, aM as Uint128, aN as Uint256, aL as Uint64, a_ as ValidatorTransactionResponse, bs as WriteSet, b1 as WriteSetChange, b2 as WriteSetChangeDeleteModule, b3 as WriteSetChangeDeleteResource, b4 as WriteSetChangeDeleteTableItem, b5 as WriteSetChangeWriteModule, b6 as WriteSetChangeWriteResource, b7 as WriteSetChangeWriteTableItem, as as ensureBoolean, az as hexToAsciiString, aW as isBlockEpilogueTransactionResponse, aT as isBlockMetadataTransactionResponse, bh as isEd25519Signature, bk as isFeePayerSignature, aS as isGenesisTransactionResponse, bj as isMultiAgentSignature, bl as isMultiEd25519Signature, aQ as isPendingTransactionResponse, bi as isSecp256k1Signature, aU as isStateCheckpointTransactionResponse, aR as isUserTransactionResponse, aV as isValidatorTransactionResponse, at as outOfRangeErrorMessage, au as validateNumberInRange } from './accountAddress-D0xKX-UM.js';
3
- import { CallArgument } from '@aptos-labs/script-composer-pack';
4
- export { CallArgument } from '@aptos-labs/script-composer-pack';
5
3
  import { ProjPointType } from '@noble/curves/abstract/weierstrass';
6
4
  import { Fp2 } from '@noble/curves/abstract/tower';
7
5
  import EventEmitter from 'eventemitter3';
@@ -4194,14 +4192,6 @@ type InputMultiSigDataWithABI = {
4194
4192
  type InputEntryFunctionDataWithRemoteABI = InputEntryFunctionData & {
4195
4193
  aptosConfig: AptosConfig;
4196
4194
  };
4197
- /**
4198
- * The data needed to generate a batched function payload
4199
- */
4200
- type InputBatchedFunctionData = {
4201
- function: MoveFunctionId;
4202
- typeArguments?: Array<TypeArgument>;
4203
- functionArguments: Array<EntryFunctionArgumentTypes | CallArgument | SimpleEntryFunctionArgumentTypes>;
4204
- };
4205
4195
  /**
4206
4196
  * The data needed to generate a Multi Sig payload
4207
4197
  * @group Implementation
@@ -4847,17 +4837,6 @@ declare function fetchEntryFunctionAbi(moduleAddress: string, moduleName: string
4847
4837
  * @category Transactions
4848
4838
  */
4849
4839
  declare function fetchViewFunctionAbi(moduleAddress: string, moduleName: string, functionName: string, aptosConfig: AptosConfig): Promise<ViewFunctionABI>;
4850
- /**
4851
- * @deprecated Handle this inline
4852
- *
4853
- * @example
4854
- * ```typescript
4855
- * const callArgument = argument instanceof CallArgument ? argument : CallArgument.newBytes(
4856
- * convertArgument(functionName, functionAbi, argument, position, genericTypeParams).bcsToBytes()
4857
- * );
4858
- * ```
4859
- */
4860
- declare function convertCallArgument(argument: CallArgument | EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes, functionName: string, functionAbi: FunctionABI, position: number, genericTypeParams: Array<TypeTag>): CallArgument;
4861
4840
  /**
4862
4841
  * Converts a non-BCS encoded argument into BCS encoded, if necessary.
4863
4842
  * This function checks the provided argument against the expected parameter type and converts it accordingly.
@@ -5015,22 +4994,6 @@ declare function parseTypeTag(typeStr: string, options?: {
5015
4994
  allowGenerics?: boolean;
5016
4995
  }): TypeTag;
5017
4996
 
5018
- /**
5019
- * A wrapper class around TransactionComposer, which is a WASM library compiled
5020
- * from aptos-core/aptos-move/script-composer.
5021
- * This class allows the SDK caller to build a transaction that invokes multiple Move functions
5022
- * and allow for arguments to be passed around.
5023
- * */
5024
- declare class AptosScriptComposer {
5025
- private config;
5026
- private builder?;
5027
- private static transactionComposer?;
5028
- constructor(aptosConfig: AptosConfig);
5029
- init(): Promise<void>;
5030
- addBatchedCalls(input: InputBatchedFunctionData): Promise<CallArgument[]>;
5031
- build(): Uint8Array;
5032
- }
5033
-
5034
4997
  declare class AccountAbstraction {
5035
4998
  readonly config: AptosConfig;
5036
4999
  constructor(config: AptosConfig);
@@ -8717,70 +8680,6 @@ declare class Build {
8717
8680
  options?: InputGenerateTransactionOptions;
8718
8681
  withFeePayer?: boolean;
8719
8682
  }): Promise<SimpleTransaction>;
8720
- /**
8721
- * Build a transaction from a series of Move calls.
8722
- *
8723
- * This function allows you to create a transaction with a list of Move calls.
8724
- *
8725
- * Right now we only tested this logic with single signer and we will add support
8726
- * for mutli agent transactions if needed.
8727
- *
8728
- * @param args.sender - The sender account address.
8729
- * @param args.builder - The closure to construct the list of calls.
8730
- * @param args.options - Optional transaction configurations.
8731
- * @param args.withFeePayer - Whether there is a fee payer for the transaction.
8732
- *
8733
- * @returns SimpleTransaction
8734
- *
8735
- * @example
8736
- * ```typescript
8737
- * import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
8738
- *
8739
- * const config = new AptosConfig({ network: Network.TESTNET });
8740
- * const aptos = new Aptos(config);
8741
- *
8742
- * async function runExample() {
8743
- * // Build a transaction from a chained series of Move calls.
8744
- * const transaction = await aptos.transaction.build.scriptComposer({
8745
- * sender: "0x1", // replace with a real sender account address
8746
- * builder: builder: async (builder) => {
8747
- * const coin = await builder.addBatchedCalls({
8748
- * function: "0x1::coin::withdraw",
8749
- * functionArguments: [CallArgument.new_signer(0), 1],
8750
- * typeArguments: ["0x1::aptos_coin::AptosCoin"],
8751
- * });
8752
- *
8753
- * // Pass the returned value from the first function call to the second call
8754
- * const fungibleAsset = await builder.addBatchedCalls({
8755
- * function: "0x1::coin::coin_to_fungible_asset",
8756
- * functionArguments: [coin[0]],
8757
- * typeArguments: ["0x1::aptos_coin::AptosCoin"],
8758
- * });
8759
- *
8760
- * await builder.addBatchedCalls({
8761
- * function: "0x1::primary_fungible_store::deposit",
8762
- * functionArguments: [singleSignerED25519SenderAccount.accountAddress, fungibleAsset[0]],
8763
- * typeArguments: [],
8764
- * });
8765
- * return builder;
8766
- * },
8767
- * options: {
8768
- * gasUnitPrice: 100, // specify your own gas unit price if needed
8769
- * maxGasAmount: 1000, // specify your own max gas amount if needed
8770
- * },
8771
- * });
8772
- *
8773
- * console.log(transaction);
8774
- * }
8775
- * runExample().catch(console.error);
8776
- * ```
8777
- */
8778
- scriptComposer(args: {
8779
- sender: AccountAddressInput;
8780
- builder: (builder: AptosScriptComposer) => Promise<AptosScriptComposer>;
8781
- options?: InputGenerateTransactionOptions;
8782
- withFeePayer?: boolean;
8783
- }): Promise<SimpleTransaction>;
8784
8683
  /**
8785
8684
  * Build a multi-agent transaction that allows multiple signers to authorize a transaction.
8786
8685
  *
@@ -14470,4 +14369,4 @@ declare class AptosApiError extends Error {
14470
14369
  constructor({ apiType, aptosRequest, aptosResponse }: AptosApiErrorOpts);
14471
14370
  }
14472
14371
 
14473
- export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_FA, APTOS_HARDENED_REGEX, AbstractKeylessAccount, AbstractMultiKey, AbstractPublicKey, AbstractSignature, AbstractedAccount, Account, AccountAddress, AccountAddressInput, AccountAuthenticator, AccountAuthenticatorAbstraction, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorNoAccountAuthenticator, AccountAuthenticatorSingleKey, AccountData, AccountPublicKey, AccountSequenceNumber, AccountUtils, AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, AptosRequest, AptosResponse, AptosScriptComposer, AptosSettings, AuthenticationKey, AuthenticationKeyScheme, Block, Bool, CKDPriv, ChainId, Client, ClientConfig, ClientRequest, ClientResponse, CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, CursorPaginationArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, DerivableAbstractedAccount, type DerivedKeys, Deserializable, type DeserializableClass, Deserializer, EPK_HORIZON_SECS, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, EphemeralCertificate, EphemeralCertificateVariant, EphemeralKeyPair, EphemeralPublicKey, EphemeralPublicKeyVariant, EphemeralSignature, type ExecutionFinishEventData, FIREBASE_AUTH_ISS_PATTERN, type FailureEventData, FaucetConfig, FederatedKeylessAccount, FederatedKeylessPublicKey, FeePayerRawTransaction, FixedBytes, FullNodeConfig, type FunctionABI, GasEstimation, type GenerateAccountArgs, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, type GetRequestOptions, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, Groth16ProofAndStatement, Groth16VerificationKey, Groth16Zkp, HARDENED_OFFSET, Hex, HexInput, Identifier, IndexerConfig, type InputBatchedFunctionData, type InputEntryFunctionData, type InputEntryFunctionDataWithABI, type InputEntryFunctionDataWithRemoteABI, type InputGenerateMultiAgentRawTransactionArgs, type InputGenerateMultiAgentRawTransactionData, type InputGenerateRawTransactionArgs, type InputGenerateSingleSignerRawTransactionArgs, type InputGenerateSingleSignerRawTransactionData, type InputGenerateTransactionData, type InputGenerateTransactionOptions, type InputGenerateTransactionPayloadData, type InputGenerateTransactionPayloadDataWithABI, type InputGenerateTransactionPayloadDataWithRemoteABI, type InputMultiSigData, type InputMultiSigDataWithABI, type InputMultiSigDataWithRemoteABI, type InputScriptData, type InputSimulateTransactionData, type InputSimulateTransactionOptions, type InputSubmitTransactionData, type InputViewFunctionData, type InputViewFunctionDataWithABI, type InputViewFunctionDataWithRemoteABI, type InputViewFunctionJsonData, KeyType, KeylessAccount, KeylessConfiguration, KeylessError, KeylessErrorCategory, KeylessErrorResolutionTip, KeylessErrorType, KeylessPublicKey, KeylessSignature, type KeylessSigner, LedgerInfo, LedgerVersionArg, MAX_AUD_VAL_BYTES, MAX_COMMITED_EPK_BYTES, MAX_EXTRA_FIELD_BYTES, MAX_ISS_VAL_BYTES, MAX_JWT_HEADER_B64_BYTES, MAX_UID_KEY_BYTES, MAX_UID_VAL_BYTES, MimeType, ModuleId, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionId, MoveJWK, MoveModule, MoveModuleBytecode, MoveModuleId, MoveOption, MoveResource, MoveString, MoveStructId, MoveValue, MoveVector, MultiAgentRawTransaction, MultiAgentTransaction, MultiEd25519Account, MultiEd25519PublicKey, MultiEd25519Signature, type MultiEd25519SignerConstructorArgs, MultiKey, MultiKeyAccount, MultiKeySignature, MultiSig, MultiSigTransactionPayload, Network, OrderByArg, PaginationArgs, PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, PrivateKey, type PrivateKeyFromDerivationPathArgs, type PrivateKeyInput, PrivateKeyVariants, ProcessorType, type ProofFetchCallback, type ProofFetchEvents, type ProofFetchFailure, type ProofFetchStatus, type ProofFetchSuccess, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RotationProofChallenge, Script, ScriptFunctionArgument, type ScriptFunctionArgumentTypes, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serialized, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySigner, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, type SingleKeySignerOrLegacyEd25519Account, StructTag, type SuccessEventData, TableItemRequest, TokenStandardArg, TransactionAndProof, TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, TransactionPayloadScript, TransactionResponse, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, type TypeArgument, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVector, U128, U16, U256, U32, U64, U8, Uint16, Uint32, Uint8, UserTransactionResponse, type VerifyEd25519SignatureArgs, type VerifyMultiEd25519SignatureArgs, type VerifyMultiKeySignatureArgs, type VerifySignatureArgs, type VerifySignatureAsyncArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, type ViewFunctionJsonPayload, WaitForTransactionOptions, WhereArg, ZeroKnowledgeSig, ZkProof, ZkpVariant, aptosCoinStructTag, aptosRequest, base64UrlDecode, base64UrlToBytes, bigIntToBytesLE, buildTransaction, bytesToBigIntLE, checkOrConvertArgument, convertAmountFromHumanReadableToOnChain, convertAmountFromOnChainToHumanReadable, convertArgument, convertCallArgument, convertNumber, createObjectAddress, createResourceAddress, createTokenAddress, deriveKey, deriveTransactionType, deserializeFromScriptArgument, fetchEntryFunctionAbi, fetchFunctionAbi, fetchJWK, fetchModuleAbi, fetchMoveFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, floorToWholeHour, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getErrorMessage, getFunctionParts, getIssAudAndUidVal, getKeylessConfig, getKeylessJWKs, getPageWithObfuscatedCursor, hashStrToField, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBool, isCanonicalEd25519Signature, isEmptyOption, isEncodedEntryFunctionArgument, isEncodedStruct, isKeylessSigner, isLargeNumber, isNumber, isScriptDataInput, isSingleKeySigner, isString, isValidBIP44Path, isValidFunctionInfo, isValidHardenedPath, mnemonicToSeed, normalizeBundle, nowInSeconds, objectStructTag, optionStructTag, padAndPackBytesWithLen, paginateWithCursor, paginateWithObfuscatedCursor, pairedFaMetadataAddress, parseEncodedStruct, parseJwtHeader, parseTypeTag, poseidonHash, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, sleep, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch, truncateAddress, verifyKeylessSignature, verifyKeylessSignatureWithJwkAndConfig };
14372
+ export { APTOS_BIP44_REGEX, APTOS_COIN, APTOS_FA, APTOS_HARDENED_REGEX, AbstractKeylessAccount, AbstractMultiKey, AbstractPublicKey, AbstractSignature, AbstractedAccount, Account, AccountAddress, AccountAddressInput, AccountAuthenticator, AccountAuthenticatorAbstraction, AccountAuthenticatorEd25519, AccountAuthenticatorMultiEd25519, AccountAuthenticatorMultiKey, AccountAuthenticatorNoAccountAuthenticator, AccountAuthenticatorSingleKey, AccountData, AccountPublicKey, AccountSequenceNumber, AccountUtils, AnyNumber, AnyPublicKey, AnyPublicKeyVariant, type AnyRawTransaction, type AnyRawTransactionInstance, AnySignature, type AnyTransactionPayloadInstance, Aptos, AptosApiError, AptosApiType, AptosConfig, AptosRequest, AptosResponse, AptosSettings, AuthenticationKey, AuthenticationKeyScheme, Block, Bool, CKDPriv, ChainId, Client, ClientConfig, ClientRequest, ClientResponse, CommittedTransactionResponse, type CreateAccountFromPrivateKeyArgs, type CreateEd25519AccountFromPrivateKeyArgs, type CreateEd25519SingleKeyAccountFromPrivateKeyArgs, type CreateSingleKeyAccountFromPrivateKeyArgs, CursorPaginationArgs, DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW, DEFAULT_TXN_TIMEOUT_SEC, DerivableAbstractedAccount, type DerivedKeys, Deserializable, type DeserializableClass, Deserializer, EPK_HORIZON_SECS, Ed25519Account, Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature, type Ed25519SignerConstructorArgs, type Ed25519SignerFromDerivationPathArgs, EntryFunction, type EntryFunctionABI, EntryFunctionArgument, type EntryFunctionArgumentTypes, EntryFunctionBytes, EphemeralCertificate, EphemeralCertificateVariant, EphemeralKeyPair, EphemeralPublicKey, EphemeralPublicKeyVariant, EphemeralSignature, type ExecutionFinishEventData, FIREBASE_AUTH_ISS_PATTERN, type FailureEventData, FaucetConfig, FederatedKeylessAccount, FederatedKeylessPublicKey, FeePayerRawTransaction, FixedBytes, FullNodeConfig, type FunctionABI, GasEstimation, type GenerateAccountArgs, type GenerateEd25519AccountArgs, type GenerateEd25519SingleKeyAccountArgs, type GenerateSingleKeyAccountArgs, GetANSNameResponse, GetAccountCoinsDataResponse, GetAccountCollectionsWithOwnedTokenResponse, GetAccountOwnedTokensFromCollectionResponse, GetAccountOwnedTokensQueryResponse, type GetAptosRequestOptions, GetChainTopUserTransactionsResponse, GetCollectionDataResponse, GetCurrentFungibleAssetBalancesResponse, GetCurrentTokenOwnershipResponse, GetDelegatedStakingActivitiesResponse, GetEventsResponse, GetFungibleAssetActivitiesResponse, GetFungibleAssetMetadataResponse, GetNumberOfDelegatorsResponse, GetObjectDataQueryResponse, GetOwnedTokensResponse, GetProcessorStatusResponse, type GetRequestOptions, GetTableItemsDataResponse, GetTableItemsMetadataResponse, GetTokenActivityResponse, GetTokenDataResponse, GraphqlQuery, Groth16ProofAndStatement, Groth16VerificationKey, 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, KeylessError, KeylessErrorCategory, KeylessErrorResolutionTip, KeylessErrorType, KeylessPublicKey, KeylessSignature, type KeylessSigner, LedgerInfo, LedgerVersionArg, MAX_AUD_VAL_BYTES, MAX_COMMITED_EPK_BYTES, MAX_EXTRA_FIELD_BYTES, MAX_ISS_VAL_BYTES, MAX_JWT_HEADER_B64_BYTES, MAX_UID_KEY_BYTES, MAX_UID_VAL_BYTES, MimeType, ModuleId, MoveFunction, MoveFunctionGenericTypeParam, MoveFunctionId, MoveJWK, MoveModule, MoveModuleBytecode, MoveModuleId, MoveOption, MoveResource, MoveString, MoveStructId, MoveValue, MoveVector, MultiAgentRawTransaction, MultiAgentTransaction, MultiEd25519Account, MultiEd25519PublicKey, MultiEd25519Signature, type MultiEd25519SignerConstructorArgs, MultiKey, MultiKeyAccount, MultiKeySignature, MultiSig, MultiSigTransactionPayload, Network, OrderByArg, PaginationArgs, PendingTransactionResponse, type PostAptosRequestOptions, type PostRequestOptions, PrivateKey, type PrivateKeyFromDerivationPathArgs, type PrivateKeyInput, PrivateKeyVariants, ProcessorType, type ProofFetchCallback, type ProofFetchEvents, type ProofFetchFailure, type ProofFetchStatus, type ProofFetchSuccess, PublicKey, RAW_TRANSACTION_SALT, RAW_TRANSACTION_WITH_DATA_SALT, RawTransaction, RawTransactionWithData, RotationProofChallenge, Script, ScriptFunctionArgument, type ScriptFunctionArgumentTypes, Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature, Serializable, Serialized, Serializer, Signature, SignedTransaction, SigningScheme, SigningSchemeInput, type SimpleEntryFunctionArgumentTypes, SimpleTransaction, SingleKeyAccount, type SingleKeySigner, type SingleKeySignerConstructorArgs, type SingleKeySignerFromDerivationPathArgs, type SingleKeySignerGenerateArgs, type SingleKeySignerOrLegacyEd25519Account, StructTag, type SuccessEventData, TableItemRequest, TokenStandardArg, TransactionAndProof, TransactionArgument, TransactionAuthenticator, TransactionAuthenticatorEd25519, TransactionAuthenticatorFeePayer, TransactionAuthenticatorMultiAgent, TransactionAuthenticatorMultiEd25519, TransactionAuthenticatorSingleSender, TransactionPayload, TransactionPayloadEntryFunction, TransactionPayloadMultiSig, TransactionPayloadScript, TransactionResponse, TransactionWorker, type TransactionWorkerEvents, TransactionWorkerEventsEnum, type TypeArgument, TypeTag, TypeTagAddress, TypeTagBool, TypeTagGeneric, TypeTagParserError, TypeTagParserErrorType, TypeTagReference, TypeTagSigner, TypeTagStruct, TypeTagU128, TypeTagU16, TypeTagU256, TypeTagU32, TypeTagU64, TypeTagU8, TypeTagVector, U128, U16, U256, U32, U64, U8, Uint16, Uint32, Uint8, UserTransactionResponse, type VerifyEd25519SignatureArgs, type VerifyMultiEd25519SignatureArgs, type VerifyMultiKeySignatureArgs, type VerifySignatureArgs, type VerifySignatureAsyncArgs, type VerifySingleKeySignatureArgs, type ViewFunctionABI, type ViewFunctionJsonPayload, WaitForTransactionOptions, WhereArg, ZeroKnowledgeSig, ZkProof, ZkpVariant, aptosCoinStructTag, aptosRequest, base64UrlDecode, base64UrlToBytes, bigIntToBytesLE, buildTransaction, bytesToBigIntLE, checkOrConvertArgument, convertAmountFromHumanReadableToOnChain, convertAmountFromOnChainToHumanReadable, convertArgument, convertNumber, createObjectAddress, createResourceAddress, createTokenAddress, deriveKey, deriveTransactionType, deserializeFromScriptArgument, fetchEntryFunctionAbi, fetchFunctionAbi, fetchJWK, fetchModuleAbi, fetchMoveFunctionAbi, fetchViewFunctionAbi, findFirstNonSignerArg, floorToWholeHour, generateRawTransaction, generateSignedTransaction, generateSignedTransactionForSimulation, generateSigningMessage, generateSigningMessageForSerializable, generateSigningMessageForTransaction, generateTransactionPayload, generateTransactionPayloadWithABI, generateUserTransactionHash, generateViewFunctionPayload, generateViewFunctionPayloadWithABI, get, getAptosFullNode, getAptosPepperService, getAuthenticatorForSimulation, getErrorMessage, getFunctionParts, getIssAudAndUidVal, getKeylessConfig, getKeylessJWKs, getPageWithObfuscatedCursor, hashStrToField, hashValues, isBcsAddress, isBcsBool, isBcsFixedBytes, isBcsString, isBcsU128, isBcsU16, isBcsU256, isBcsU32, isBcsU64, isBcsU8, isBool, isCanonicalEd25519Signature, isEmptyOption, isEncodedEntryFunctionArgument, isEncodedStruct, isKeylessSigner, isLargeNumber, isNumber, isScriptDataInput, isSingleKeySigner, isString, isValidBIP44Path, isValidFunctionInfo, isValidHardenedPath, mnemonicToSeed, normalizeBundle, nowInSeconds, objectStructTag, optionStructTag, padAndPackBytesWithLen, paginateWithCursor, paginateWithObfuscatedCursor, pairedFaMetadataAddress, parseEncodedStruct, parseJwtHeader, parseTypeTag, poseidonHash, post, postAptosFaucet, postAptosFullNode, postAptosIndexer, postAptosPepperService, postAptosProvingService, promiseFulfilledStatus, request, sleep, splitPath, standardizeTypeTags, stringStructTag, throwTypeMismatch, truncateAddress, verifyKeylessSignature, verifyKeylessSignatureWithJwkAndConfig };