@aptos-labs/ts-sdk 1.35.0-zeta.0 → 1.35.0-zeta.2

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 (285) hide show
  1. package/dist/common/{accountAddress-D3UA_cOZ.d.ts → accountAddress-Ce4Cv60D.d.ts} +36 -2
  2. package/dist/common/{chunk-CSUBLTFA.js → chunk-JMOQXLED.js} +10 -2
  3. package/dist/common/chunk-JMOQXLED.js.map +1 -0
  4. package/dist/common/cli/index.d.ts +1 -1
  5. package/dist/common/cli/index.js +2 -2
  6. package/dist/common/index.d.ts +33 -19
  7. package/dist/common/index.js +1325 -1289
  8. package/dist/common/index.js.map +1 -1
  9. package/dist/esm/account/AbstractKeylessAccount.mjs +14 -14
  10. package/dist/esm/account/AbstractedAccount.mjs +17 -17
  11. package/dist/esm/account/Account.mjs +16 -16
  12. package/dist/esm/account/AccountUtils.mjs +21 -21
  13. package/dist/esm/account/Ed25519Account.mjs +14 -14
  14. package/dist/esm/account/EphemeralKeyPair.mjs +5 -5
  15. package/dist/esm/account/FederatedKeylessAccount.mjs +15 -15
  16. package/dist/esm/account/KeylessAccount.mjs +15 -15
  17. package/dist/esm/account/MultiEd25519Account.mjs +14 -14
  18. package/dist/esm/account/MultiKeyAccount.d.mts +1 -0
  19. package/dist/esm/account/MultiKeyAccount.mjs +17 -17
  20. package/dist/esm/account/SingleKeyAccount.mjs +14 -14
  21. package/dist/esm/account/index.mjs +24 -24
  22. package/dist/esm/account/utils.mjs +6 -6
  23. package/dist/esm/api/account/abstraction.mjs +36 -36
  24. package/dist/esm/api/account.mjs +40 -38
  25. package/dist/esm/api/ans.mjs +36 -36
  26. package/dist/esm/api/aptos.d.mts +0 -1
  27. package/dist/esm/api/aptos.mjs +71 -68
  28. package/dist/esm/api/coin.mjs +35 -34
  29. package/dist/esm/api/digitalAsset.mjs +36 -36
  30. package/dist/esm/api/event.mjs +10 -10
  31. package/dist/esm/api/experimental.mjs +23 -37
  32. package/dist/esm/api/faucet.mjs +9 -9
  33. package/dist/esm/api/fungibleAsset.mjs +36 -36
  34. package/dist/esm/api/general.d.mts +2 -2
  35. package/dist/esm/api/general.mjs +23 -37
  36. package/dist/esm/api/index.d.mts +0 -1
  37. package/dist/esm/api/index.mjs +71 -68
  38. package/dist/esm/api/keyless.mjs +37 -35
  39. package/dist/esm/api/object.mjs +10 -10
  40. package/dist/esm/api/staking.mjs +10 -10
  41. package/dist/esm/api/table.mjs +10 -10
  42. package/dist/esm/api/transaction.d.mts +30 -18
  43. package/dist/esm/api/transaction.mjs +43 -41
  44. package/dist/esm/api/transactionSubmission/build.mjs +34 -34
  45. package/dist/esm/api/transactionSubmission/management.mjs +38 -36
  46. package/dist/esm/api/transactionSubmission/sign.mjs +33 -33
  47. package/dist/esm/api/transactionSubmission/simulate.mjs +34 -34
  48. package/dist/esm/api/transactionSubmission/submit.mjs +34 -34
  49. package/dist/esm/api/utils.mjs +8 -8
  50. package/dist/esm/bcs/index.mjs +7 -7
  51. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  52. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  53. package/dist/esm/{chunk-XGUYC57L.mjs → chunk-2FTF6J7F.mjs} +3 -3
  54. package/dist/esm/{chunk-LHQJNJUB.mjs → chunk-2HL7JEFC.mjs} +9 -9
  55. package/dist/esm/{chunk-EFJAJFI3.mjs → chunk-2WBJAKBO.mjs} +2 -2
  56. package/dist/esm/{chunk-J7WQ42OC.mjs → chunk-3DAVHDK4.mjs} +2 -2
  57. package/dist/esm/{chunk-QN5BQMWP.mjs → chunk-56UCIGTO.mjs} +2 -2
  58. package/dist/esm/{chunk-I6QE3PKO.mjs → chunk-5ORUQZAR.mjs} +2 -2
  59. package/dist/esm/{chunk-P64LPFEC.mjs → chunk-62LC4PPC.mjs} +2 -2
  60. package/dist/esm/{chunk-ZWD4BJVD.mjs → chunk-6OFCIXWS.mjs} +3 -3
  61. package/dist/esm/chunk-6OFCIXWS.mjs.map +1 -0
  62. package/dist/esm/{chunk-LL4RQKIB.mjs → chunk-6T3V5LXK.mjs} +1 -2
  63. package/dist/esm/{chunk-LL4RQKIB.mjs.map → chunk-6T3V5LXK.mjs.map} +1 -1
  64. package/dist/esm/{chunk-UXAUOSSB.mjs → chunk-7F32C225.mjs} +6 -6
  65. package/dist/esm/{chunk-ESZLRZTK.mjs → chunk-7WW735TU.mjs} +3 -3
  66. package/dist/esm/{chunk-BQ5JTYXK.mjs → chunk-A33OBGVN.mjs} +3 -3
  67. package/dist/esm/{chunk-LFMXR5C2.mjs → chunk-A7LYGPFL.mjs} +3 -3
  68. package/dist/esm/{chunk-SDIZSFCQ.mjs → chunk-BU43ZFDJ.mjs} +2 -2
  69. package/dist/esm/{chunk-YIHVPGHN.mjs → chunk-C7EEG6SW.mjs} +4 -4
  70. package/dist/esm/{chunk-XGB3QLVI.mjs → chunk-D6RXVCE3.mjs} +3 -3
  71. package/dist/esm/{chunk-SGKF62FT.mjs → chunk-DGDZNHUJ.mjs} +5 -3
  72. package/dist/esm/{chunk-SGKF62FT.mjs.map → chunk-DGDZNHUJ.mjs.map} +1 -1
  73. package/dist/esm/{chunk-WEOK7WVL.mjs → chunk-EBFKT35C.mjs} +2 -2
  74. package/dist/esm/{chunk-JOVCSFQC.mjs → chunk-F4VI7BNX.mjs} +2 -2
  75. package/dist/esm/{chunk-VGI2LPO3.mjs → chunk-FDMI4BUL.mjs} +32 -25
  76. package/dist/esm/chunk-FDMI4BUL.mjs.map +1 -0
  77. package/dist/esm/chunk-FRLS4GRM.mjs +62 -0
  78. package/dist/esm/chunk-FRLS4GRM.mjs.map +1 -0
  79. package/dist/esm/chunk-G3MHXDYA.mjs +1 -0
  80. package/dist/esm/chunk-G3MHXDYA.mjs.map +1 -0
  81. package/dist/esm/{chunk-ZNGTK5IZ.mjs → chunk-G6R77JKO.mjs} +29 -29
  82. package/dist/esm/{chunk-6PMKDSGB.mjs → chunk-G7BB6K4B.mjs} +2 -2
  83. package/dist/esm/{chunk-ODG7T6OV.mjs → chunk-GCQK2S5Q.mjs} +2 -2
  84. package/dist/esm/{chunk-4BXAKN6A.mjs → chunk-HBXBODME.mjs} +3 -3
  85. package/dist/esm/{chunk-UKZP2GAB.mjs → chunk-HKQY5GXT.mjs} +7 -191
  86. package/dist/esm/chunk-HKQY5GXT.mjs.map +1 -0
  87. package/dist/esm/{chunk-NMYFY7WN.mjs → chunk-HL337SEM.mjs} +3 -3
  88. package/dist/esm/{chunk-K3CXNID3.mjs → chunk-HQDHSKVS.mjs} +2 -2
  89. package/dist/esm/{chunk-S56SMMAK.mjs → chunk-I5G7XFGT.mjs} +3 -3
  90. package/dist/esm/{chunk-HQ6A6TYS.mjs → chunk-IJ7XCPP3.mjs} +17 -12
  91. package/dist/esm/chunk-IJ7XCPP3.mjs.map +1 -0
  92. package/dist/esm/{chunk-46VPRC7E.mjs → chunk-ILTEOGFF.mjs} +2 -2
  93. package/dist/esm/{chunk-KLZCGNPI.mjs → chunk-IP7GATDH.mjs} +6 -6
  94. package/dist/esm/{chunk-KLZCGNPI.mjs.map → chunk-IP7GATDH.mjs.map} +1 -1
  95. package/dist/esm/{chunk-MHZVL3EA.mjs → chunk-IQVHXOD3.mjs} +8 -8
  96. package/dist/esm/{chunk-4WNIKKIV.mjs → chunk-JAZJE3OR.mjs} +3 -3
  97. package/dist/esm/{chunk-SN6KXHPA.mjs → chunk-JEVGHYEP.mjs} +2 -2
  98. package/dist/esm/{chunk-OQ6XT2GF.mjs → chunk-JFMFZ2IL.mjs} +3 -3
  99. package/dist/esm/{chunk-HQTQEHHZ.mjs → chunk-JQIRRM7G.mjs} +4 -4
  100. package/dist/esm/{chunk-MG6UFOJW.mjs → chunk-K5OCDM3W.mjs} +6 -6
  101. package/dist/esm/{chunk-MG6UFOJW.mjs.map → chunk-K5OCDM3W.mjs.map} +1 -1
  102. package/dist/esm/{chunk-MUSTBCQX.mjs → chunk-KW64NP2F.mjs} +2 -2
  103. package/dist/esm/{chunk-DUOU3SNQ.mjs → chunk-ORCQEMJL.mjs} +3 -3
  104. package/dist/esm/{chunk-LSIXUJ5T.mjs → chunk-QYNYDQE3.mjs} +4 -4
  105. package/dist/esm/{chunk-5E2IDRDF.mjs → chunk-R45SPK6Q.mjs} +2 -2
  106. package/dist/esm/{chunk-KAKSJSCR.mjs → chunk-RCXGTN36.mjs} +2 -2
  107. package/dist/esm/{chunk-3QMLVT4L.mjs → chunk-SPI2HO3E.mjs} +2 -2
  108. package/dist/esm/{chunk-KEZG4OGH.mjs → chunk-SPVJXZL5.mjs} +208 -68
  109. package/dist/esm/chunk-SPVJXZL5.mjs.map +1 -0
  110. package/dist/esm/{chunk-QW7RQDZ5.mjs → chunk-SQNS4SFV.mjs} +9 -1
  111. package/dist/esm/{chunk-QW7RQDZ5.mjs.map → chunk-SQNS4SFV.mjs.map} +1 -1
  112. package/dist/esm/{chunk-MIVDDJAH.mjs → chunk-SRXIHVZE.mjs} +2 -2
  113. package/dist/esm/{chunk-2ZOIVB2U.mjs → chunk-T4BFWV46.mjs} +2 -2
  114. package/dist/esm/{chunk-TQDWZXFD.mjs → chunk-TDLL7QX5.mjs} +7 -7
  115. package/dist/esm/{chunk-Y4FHNC5I.mjs → chunk-TJDF4CXI.mjs} +2 -2
  116. package/dist/esm/{chunk-HMHFKEHQ.mjs → chunk-TL4Z4KHK.mjs} +2 -2
  117. package/dist/esm/{chunk-Y7KAC4I4.mjs → chunk-UGFIWCJQ.mjs} +2 -2
  118. package/dist/esm/{chunk-EBEO4SA4.mjs → chunk-UGKZQUGE.mjs} +4 -4
  119. package/dist/esm/{chunk-KCV4HRSJ.mjs → chunk-UK7SPHIE.mjs} +4 -4
  120. package/dist/esm/{chunk-KEKNIJHE.mjs → chunk-WHSS6I7T.mjs} +3 -3
  121. package/dist/esm/{chunk-3SCNBHUA.mjs → chunk-WLTQHGIJ.mjs} +5 -5
  122. package/dist/esm/{chunk-I4OHHVRF.mjs → chunk-WUM247HF.mjs} +2 -2
  123. package/dist/esm/{chunk-A3TQLIEM.mjs → chunk-WXQUBQK4.mjs} +2 -2
  124. package/dist/esm/{chunk-WPV52HGD.mjs → chunk-X4N5BN3S.mjs} +3 -3
  125. package/dist/esm/{chunk-KPAICS4T.mjs → chunk-XX6C2QGI.mjs} +2 -2
  126. package/dist/esm/{chunk-XXLSA7W7.mjs → chunk-Y3M32DIB.mjs} +2 -2
  127. package/dist/esm/{chunk-HLTYSM7H.mjs → chunk-YK66QBML.mjs} +2 -2
  128. package/dist/esm/{chunk-EMKV5DFX.mjs → chunk-YT7V6AVJ.mjs} +3 -3
  129. package/dist/esm/chunk-ZRBUAZZD.mjs +36 -0
  130. package/dist/esm/chunk-ZRBUAZZD.mjs.map +1 -0
  131. package/dist/esm/cli/index.mjs +1 -1
  132. package/dist/esm/cli/localNode.mjs +1 -1
  133. package/dist/esm/client/core.mjs +4 -4
  134. package/dist/esm/client/get.mjs +4 -4
  135. package/dist/esm/client/index.mjs +5 -5
  136. package/dist/esm/client/post.mjs +5 -5
  137. package/dist/esm/core/account/index.mjs +1 -1
  138. package/dist/esm/core/account/utils/address.mjs +1 -1
  139. package/dist/esm/core/account/utils/index.mjs +1 -1
  140. package/dist/esm/core/accountAddress.mjs +1 -1
  141. package/dist/esm/core/authenticationKey.mjs +1 -1
  142. package/dist/esm/core/crypto/abstraction.mjs +3 -3
  143. package/dist/esm/core/crypto/ed25519.mjs +3 -3
  144. package/dist/esm/core/crypto/ephemeral.mjs +3 -3
  145. package/dist/esm/core/crypto/federatedKeyless.mjs +5 -5
  146. package/dist/esm/core/crypto/index.mjs +5 -5
  147. package/dist/esm/core/crypto/keyless.mjs +5 -5
  148. package/dist/esm/core/crypto/multiEd25519.mjs +5 -5
  149. package/dist/esm/core/crypto/multiKey.mjs +5 -5
  150. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  151. package/dist/esm/core/crypto/proof.mjs +3 -3
  152. package/dist/esm/core/crypto/publicKey.mjs +3 -3
  153. package/dist/esm/core/crypto/secp256k1.mjs +3 -3
  154. package/dist/esm/core/crypto/signature.mjs +3 -3
  155. package/dist/esm/core/crypto/singleKey.mjs +5 -5
  156. package/dist/esm/core/index.mjs +5 -5
  157. package/dist/esm/errors/index.mjs +2 -2
  158. package/dist/esm/index.d.mts +1 -1
  159. package/dist/esm/index.mjs +81 -74
  160. package/dist/esm/internal/abstraction.mjs +34 -34
  161. package/dist/esm/internal/account.d.mts +45 -5
  162. package/dist/esm/internal/account.mjs +44 -30
  163. package/dist/esm/internal/ans.mjs +35 -35
  164. package/dist/esm/internal/coin.mjs +34 -33
  165. package/dist/esm/internal/digitalAsset.mjs +34 -34
  166. package/dist/esm/internal/event.mjs +7 -7
  167. package/dist/esm/internal/experimental.mjs +22 -36
  168. package/dist/esm/internal/faucet.mjs +8 -8
  169. package/dist/esm/internal/fungibleAsset.mjs +34 -34
  170. package/dist/esm/internal/general.mjs +6 -6
  171. package/dist/esm/internal/keyless.mjs +36 -34
  172. package/dist/esm/internal/object.mjs +7 -7
  173. package/dist/esm/internal/staking.mjs +7 -7
  174. package/dist/esm/internal/table.mjs +7 -7
  175. package/dist/esm/internal/transaction.mjs +7 -7
  176. package/dist/esm/internal/transactionSubmission.d.mts +6 -36
  177. package/dist/esm/internal/transactionSubmission.mjs +33 -39
  178. package/dist/esm/internal/utils/index.d.mts +15 -0
  179. package/dist/esm/internal/utils/index.mjs +39 -0
  180. package/dist/esm/internal/utils/index.mjs.map +1 -0
  181. package/dist/esm/internal/utils/utils.d.mts +65 -0
  182. package/dist/esm/internal/utils/utils.mjs +38 -0
  183. package/dist/esm/internal/utils/utils.mjs.map +1 -0
  184. package/dist/esm/internal/view.mjs +22 -36
  185. package/dist/esm/transactions/authenticator/account.mjs +5 -5
  186. package/dist/esm/transactions/authenticator/index.mjs +5 -5
  187. package/dist/esm/transactions/authenticator/transaction.mjs +5 -5
  188. package/dist/esm/transactions/index.mjs +23 -37
  189. package/dist/esm/transactions/instances/index.mjs +14 -14
  190. package/dist/esm/transactions/instances/moduleId.mjs +5 -5
  191. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +9 -9
  192. package/dist/esm/transactions/instances/rawTransaction.mjs +8 -8
  193. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +3 -3
  194. package/dist/esm/transactions/instances/signedTransaction.mjs +9 -9
  195. package/dist/esm/transactions/instances/simpleTransaction.mjs +9 -9
  196. package/dist/esm/transactions/instances/transactionPayload.mjs +6 -6
  197. package/dist/esm/transactions/management/accountSequenceNumber.mjs +41 -29
  198. package/dist/esm/transactions/management/index.mjs +37 -35
  199. package/dist/esm/transactions/management/transactionWorker.mjs +37 -35
  200. package/dist/esm/transactions/scriptComposer/index.mjs +21 -35
  201. package/dist/esm/transactions/transactionBuilder/helpers.mjs +6 -6
  202. package/dist/esm/transactions/transactionBuilder/index.mjs +20 -34
  203. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +9 -40
  204. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +13 -13
  205. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +19 -34
  206. package/dist/esm/transactions/typeTag/index.mjs +5 -5
  207. package/dist/esm/transactions/typeTag/parser.mjs +5 -5
  208. package/dist/esm/types/index.d.mts +1 -1
  209. package/dist/esm/types/index.mjs +5 -1
  210. package/dist/esm/types/types.d.mts +36 -2
  211. package/dist/esm/types/types.mjs +5 -1
  212. package/dist/esm/utils/helpers.mjs +1 -1
  213. package/dist/esm/utils/index.mjs +4 -4
  214. package/dist/esm/utils/normalizeBundle.mjs +3 -3
  215. package/package.json +25 -24
  216. package/src/account/MultiKeyAccount.ts +3 -2
  217. package/src/api/general.ts +2 -2
  218. package/src/api/transaction.ts +30 -29
  219. package/src/client/post.ts +0 -1
  220. package/src/internal/account.ts +230 -71
  221. package/src/internal/transactionSubmission.ts +4 -202
  222. package/src/internal/utils/index.ts +4 -0
  223. package/src/internal/utils/utils.ts +116 -0
  224. package/src/transactions/scriptComposer/index.ts +3 -1
  225. package/src/transactions/transactionBuilder/remoteAbi.ts +1 -1
  226. package/src/transactions/transactionBuilder/transactionBuilder.ts +7 -2
  227. package/src/types/types.ts +38 -1
  228. package/dist/common/chunk-CSUBLTFA.js.map +0 -1
  229. package/dist/esm/chunk-HQ6A6TYS.mjs.map +0 -1
  230. package/dist/esm/chunk-KEZG4OGH.mjs.map +0 -1
  231. package/dist/esm/chunk-UKZP2GAB.mjs.map +0 -1
  232. package/dist/esm/chunk-VGI2LPO3.mjs.map +0 -1
  233. package/dist/esm/chunk-ZWD4BJVD.mjs.map +0 -1
  234. /package/dist/esm/{chunk-XGUYC57L.mjs.map → chunk-2FTF6J7F.mjs.map} +0 -0
  235. /package/dist/esm/{chunk-LHQJNJUB.mjs.map → chunk-2HL7JEFC.mjs.map} +0 -0
  236. /package/dist/esm/{chunk-EFJAJFI3.mjs.map → chunk-2WBJAKBO.mjs.map} +0 -0
  237. /package/dist/esm/{chunk-J7WQ42OC.mjs.map → chunk-3DAVHDK4.mjs.map} +0 -0
  238. /package/dist/esm/{chunk-QN5BQMWP.mjs.map → chunk-56UCIGTO.mjs.map} +0 -0
  239. /package/dist/esm/{chunk-I6QE3PKO.mjs.map → chunk-5ORUQZAR.mjs.map} +0 -0
  240. /package/dist/esm/{chunk-P64LPFEC.mjs.map → chunk-62LC4PPC.mjs.map} +0 -0
  241. /package/dist/esm/{chunk-UXAUOSSB.mjs.map → chunk-7F32C225.mjs.map} +0 -0
  242. /package/dist/esm/{chunk-ESZLRZTK.mjs.map → chunk-7WW735TU.mjs.map} +0 -0
  243. /package/dist/esm/{chunk-BQ5JTYXK.mjs.map → chunk-A33OBGVN.mjs.map} +0 -0
  244. /package/dist/esm/{chunk-LFMXR5C2.mjs.map → chunk-A7LYGPFL.mjs.map} +0 -0
  245. /package/dist/esm/{chunk-SDIZSFCQ.mjs.map → chunk-BU43ZFDJ.mjs.map} +0 -0
  246. /package/dist/esm/{chunk-YIHVPGHN.mjs.map → chunk-C7EEG6SW.mjs.map} +0 -0
  247. /package/dist/esm/{chunk-XGB3QLVI.mjs.map → chunk-D6RXVCE3.mjs.map} +0 -0
  248. /package/dist/esm/{chunk-WEOK7WVL.mjs.map → chunk-EBFKT35C.mjs.map} +0 -0
  249. /package/dist/esm/{chunk-JOVCSFQC.mjs.map → chunk-F4VI7BNX.mjs.map} +0 -0
  250. /package/dist/esm/{chunk-ZNGTK5IZ.mjs.map → chunk-G6R77JKO.mjs.map} +0 -0
  251. /package/dist/esm/{chunk-6PMKDSGB.mjs.map → chunk-G7BB6K4B.mjs.map} +0 -0
  252. /package/dist/esm/{chunk-ODG7T6OV.mjs.map → chunk-GCQK2S5Q.mjs.map} +0 -0
  253. /package/dist/esm/{chunk-4BXAKN6A.mjs.map → chunk-HBXBODME.mjs.map} +0 -0
  254. /package/dist/esm/{chunk-NMYFY7WN.mjs.map → chunk-HL337SEM.mjs.map} +0 -0
  255. /package/dist/esm/{chunk-K3CXNID3.mjs.map → chunk-HQDHSKVS.mjs.map} +0 -0
  256. /package/dist/esm/{chunk-S56SMMAK.mjs.map → chunk-I5G7XFGT.mjs.map} +0 -0
  257. /package/dist/esm/{chunk-46VPRC7E.mjs.map → chunk-ILTEOGFF.mjs.map} +0 -0
  258. /package/dist/esm/{chunk-MHZVL3EA.mjs.map → chunk-IQVHXOD3.mjs.map} +0 -0
  259. /package/dist/esm/{chunk-4WNIKKIV.mjs.map → chunk-JAZJE3OR.mjs.map} +0 -0
  260. /package/dist/esm/{chunk-SN6KXHPA.mjs.map → chunk-JEVGHYEP.mjs.map} +0 -0
  261. /package/dist/esm/{chunk-OQ6XT2GF.mjs.map → chunk-JFMFZ2IL.mjs.map} +0 -0
  262. /package/dist/esm/{chunk-HQTQEHHZ.mjs.map → chunk-JQIRRM7G.mjs.map} +0 -0
  263. /package/dist/esm/{chunk-MUSTBCQX.mjs.map → chunk-KW64NP2F.mjs.map} +0 -0
  264. /package/dist/esm/{chunk-DUOU3SNQ.mjs.map → chunk-ORCQEMJL.mjs.map} +0 -0
  265. /package/dist/esm/{chunk-LSIXUJ5T.mjs.map → chunk-QYNYDQE3.mjs.map} +0 -0
  266. /package/dist/esm/{chunk-5E2IDRDF.mjs.map → chunk-R45SPK6Q.mjs.map} +0 -0
  267. /package/dist/esm/{chunk-KAKSJSCR.mjs.map → chunk-RCXGTN36.mjs.map} +0 -0
  268. /package/dist/esm/{chunk-3QMLVT4L.mjs.map → chunk-SPI2HO3E.mjs.map} +0 -0
  269. /package/dist/esm/{chunk-MIVDDJAH.mjs.map → chunk-SRXIHVZE.mjs.map} +0 -0
  270. /package/dist/esm/{chunk-2ZOIVB2U.mjs.map → chunk-T4BFWV46.mjs.map} +0 -0
  271. /package/dist/esm/{chunk-TQDWZXFD.mjs.map → chunk-TDLL7QX5.mjs.map} +0 -0
  272. /package/dist/esm/{chunk-Y4FHNC5I.mjs.map → chunk-TJDF4CXI.mjs.map} +0 -0
  273. /package/dist/esm/{chunk-HMHFKEHQ.mjs.map → chunk-TL4Z4KHK.mjs.map} +0 -0
  274. /package/dist/esm/{chunk-Y7KAC4I4.mjs.map → chunk-UGFIWCJQ.mjs.map} +0 -0
  275. /package/dist/esm/{chunk-EBEO4SA4.mjs.map → chunk-UGKZQUGE.mjs.map} +0 -0
  276. /package/dist/esm/{chunk-KCV4HRSJ.mjs.map → chunk-UK7SPHIE.mjs.map} +0 -0
  277. /package/dist/esm/{chunk-KEKNIJHE.mjs.map → chunk-WHSS6I7T.mjs.map} +0 -0
  278. /package/dist/esm/{chunk-3SCNBHUA.mjs.map → chunk-WLTQHGIJ.mjs.map} +0 -0
  279. /package/dist/esm/{chunk-I4OHHVRF.mjs.map → chunk-WUM247HF.mjs.map} +0 -0
  280. /package/dist/esm/{chunk-A3TQLIEM.mjs.map → chunk-WXQUBQK4.mjs.map} +0 -0
  281. /package/dist/esm/{chunk-WPV52HGD.mjs.map → chunk-X4N5BN3S.mjs.map} +0 -0
  282. /package/dist/esm/{chunk-KPAICS4T.mjs.map → chunk-XX6C2QGI.mjs.map} +0 -0
  283. /package/dist/esm/{chunk-XXLSA7W7.mjs.map → chunk-Y3M32DIB.mjs.map} +0 -0
  284. /package/dist/esm/{chunk-HLTYSM7H.mjs.map → chunk-YK66QBML.mjs.map} +0 -0
  285. /package/dist/esm/{chunk-EMKV5DFX.mjs.map → chunk-YT7V6AVJ.mjs.map} +0 -0
@@ -64,7 +64,9 @@
64
64
 
65
65
 
66
66
 
67
- var _chunkCSUBLTFAjs = require('./chunk-CSUBLTFA.js');
67
+
68
+
69
+ var _chunkJMOQXLEDjs = require('./chunk-JMOQXLED.js');
68
70
 
69
71
  // src/bcs/deserializer.ts
70
72
  var Deserializer = class _Deserializer {
@@ -82,7 +84,7 @@ var Deserializer = class _Deserializer {
82
84
  this.offset = 0;
83
85
  }
84
86
  static fromHex(hex) {
85
- const data = _chunkCSUBLTFAjs.Hex.hexInputToUint8Array(hex);
87
+ const data = _chunkJMOQXLEDjs.Hex.hexInputToUint8Array(hex);
86
88
  return new _Deserializer(data);
87
89
  }
88
90
  /**
@@ -307,7 +309,7 @@ var Deserializer = class _Deserializer {
307
309
  deserializeUleb128AsU32() {
308
310
  let value = BigInt(0);
309
311
  let shift = 0;
310
- while (value < _chunkCSUBLTFAjs.MAX_U32_NUMBER) {
312
+ while (value < _chunkJMOQXLEDjs.MAX_U32_NUMBER) {
311
313
  const byte = this.deserializeU8();
312
314
  value |= BigInt(byte & 127) << BigInt(shift);
313
315
  if ((byte & 128) === 0) {
@@ -315,7 +317,7 @@ var Deserializer = class _Deserializer {
315
317
  }
316
318
  shift += 7;
317
319
  }
318
- if (value > _chunkCSUBLTFAjs.MAX_U32_NUMBER) {
320
+ if (value > _chunkJMOQXLEDjs.MAX_U32_NUMBER) {
319
321
  throw new Error("Overflow while parsing uleb128-encoded uint32 value");
320
322
  }
321
323
  return Number(value);
@@ -373,7 +375,7 @@ var Deserializer = class _Deserializer {
373
375
  };
374
376
 
375
377
  // src/bcs/serializable/fixedBytes.ts
376
- var FixedBytes = class _FixedBytes extends _chunkCSUBLTFAjs.Serializable {
378
+ var FixedBytes = class _FixedBytes extends _chunkJMOQXLEDjs.Serializable {
377
379
  /**
378
380
  * Creates an instance of the class with a specified hexadecimal input.
379
381
  * The value is converted from hexadecimal format to a Uint8Array.
@@ -384,7 +386,7 @@ var FixedBytes = class _FixedBytes extends _chunkCSUBLTFAjs.Serializable {
384
386
  */
385
387
  constructor(value) {
386
388
  super();
387
- this.value = _chunkCSUBLTFAjs.Hex.fromHexInput(value).toUint8Array();
389
+ this.value = _chunkJMOQXLEDjs.Hex.fromHexInput(value).toUint8Array();
388
390
  }
389
391
  /**
390
392
  * Serializes the fixed bytes value using the provided serializer.
@@ -435,7 +437,7 @@ var FixedBytes = class _FixedBytes extends _chunkCSUBLTFAjs.Serializable {
435
437
  };
436
438
 
437
439
  // src/bcs/serializable/entryFunctionBytes.ts
438
- var EntryFunctionBytes = class _EntryFunctionBytes extends _chunkCSUBLTFAjs.Serializable {
440
+ var EntryFunctionBytes = class _EntryFunctionBytes extends _chunkJMOQXLEDjs.Serializable {
439
441
  /**
440
442
  * Creates an instance of the class with a specified hexadecimal input value.
441
443
  *
@@ -501,7 +503,7 @@ var EntryFunctionBytes = class _EntryFunctionBytes extends _chunkCSUBLTFAjs.Seri
501
503
  };
502
504
 
503
505
  // src/bcs/serializable/movePrimitives.ts
504
- var Bool = class _Bool extends _chunkCSUBLTFAjs.Serializable {
506
+ var Bool = class _Bool extends _chunkJMOQXLEDjs.Serializable {
505
507
  /**
506
508
  * Constructs a new instance with a specified value.
507
509
  * This ensures that the value is validated to be within the acceptable range.
@@ -512,7 +514,7 @@ var Bool = class _Bool extends _chunkCSUBLTFAjs.Serializable {
512
514
  */
513
515
  constructor(value) {
514
516
  super();
515
- _chunkCSUBLTFAjs.ensureBoolean.call(void 0, value);
517
+ _chunkJMOQXLEDjs.ensureBoolean.call(void 0, value);
516
518
  this.value = value;
517
519
  }
518
520
  /**
@@ -565,10 +567,10 @@ var Bool = class _Bool extends _chunkCSUBLTFAjs.Serializable {
565
567
  return new _Bool(deserializer.deserializeBool());
566
568
  }
567
569
  };
568
- var U8 = class _U8 extends _chunkCSUBLTFAjs.Serializable {
570
+ var U8 = class _U8 extends _chunkJMOQXLEDjs.Serializable {
569
571
  constructor(value) {
570
572
  super();
571
- _chunkCSUBLTFAjs.validateNumberInRange.call(void 0, value, 0, _chunkCSUBLTFAjs.MAX_U8_NUMBER);
573
+ _chunkJMOQXLEDjs.validateNumberInRange.call(void 0, value, 0, _chunkJMOQXLEDjs.MAX_U8_NUMBER);
572
574
  this.value = value;
573
575
  }
574
576
  serialize(serializer) {
@@ -586,10 +588,10 @@ var U8 = class _U8 extends _chunkCSUBLTFAjs.Serializable {
586
588
  return new _U8(deserializer.deserializeU8());
587
589
  }
588
590
  };
589
- var U16 = class _U16 extends _chunkCSUBLTFAjs.Serializable {
591
+ var U16 = class _U16 extends _chunkJMOQXLEDjs.Serializable {
590
592
  constructor(value) {
591
593
  super();
592
- _chunkCSUBLTFAjs.validateNumberInRange.call(void 0, value, 0, _chunkCSUBLTFAjs.MAX_U16_NUMBER);
594
+ _chunkJMOQXLEDjs.validateNumberInRange.call(void 0, value, 0, _chunkJMOQXLEDjs.MAX_U16_NUMBER);
593
595
  this.value = value;
594
596
  }
595
597
  serialize(serializer) {
@@ -607,10 +609,10 @@ var U16 = class _U16 extends _chunkCSUBLTFAjs.Serializable {
607
609
  return new _U16(deserializer.deserializeU16());
608
610
  }
609
611
  };
610
- var U32 = class _U32 extends _chunkCSUBLTFAjs.Serializable {
612
+ var U32 = class _U32 extends _chunkJMOQXLEDjs.Serializable {
611
613
  constructor(value) {
612
614
  super();
613
- _chunkCSUBLTFAjs.validateNumberInRange.call(void 0, value, 0, _chunkCSUBLTFAjs.MAX_U32_NUMBER);
615
+ _chunkJMOQXLEDjs.validateNumberInRange.call(void 0, value, 0, _chunkJMOQXLEDjs.MAX_U32_NUMBER);
614
616
  this.value = value;
615
617
  }
616
618
  serialize(serializer) {
@@ -628,10 +630,10 @@ var U32 = class _U32 extends _chunkCSUBLTFAjs.Serializable {
628
630
  return new _U32(deserializer.deserializeU32());
629
631
  }
630
632
  };
631
- var U64 = class _U64 extends _chunkCSUBLTFAjs.Serializable {
633
+ var U64 = class _U64 extends _chunkJMOQXLEDjs.Serializable {
632
634
  constructor(value) {
633
635
  super();
634
- _chunkCSUBLTFAjs.validateNumberInRange.call(void 0, value, BigInt(0), _chunkCSUBLTFAjs.MAX_U64_BIG_INT);
636
+ _chunkJMOQXLEDjs.validateNumberInRange.call(void 0, value, BigInt(0), _chunkJMOQXLEDjs.MAX_U64_BIG_INT);
635
637
  this.value = BigInt(value);
636
638
  }
637
639
  serialize(serializer) {
@@ -649,10 +651,10 @@ var U64 = class _U64 extends _chunkCSUBLTFAjs.Serializable {
649
651
  return new _U64(deserializer.deserializeU64());
650
652
  }
651
653
  };
652
- var U128 = class _U128 extends _chunkCSUBLTFAjs.Serializable {
654
+ var U128 = class _U128 extends _chunkJMOQXLEDjs.Serializable {
653
655
  constructor(value) {
654
656
  super();
655
- _chunkCSUBLTFAjs.validateNumberInRange.call(void 0, value, BigInt(0), _chunkCSUBLTFAjs.MAX_U128_BIG_INT);
657
+ _chunkJMOQXLEDjs.validateNumberInRange.call(void 0, value, BigInt(0), _chunkJMOQXLEDjs.MAX_U128_BIG_INT);
656
658
  this.value = BigInt(value);
657
659
  }
658
660
  serialize(serializer) {
@@ -670,10 +672,10 @@ var U128 = class _U128 extends _chunkCSUBLTFAjs.Serializable {
670
672
  return new _U128(deserializer.deserializeU128());
671
673
  }
672
674
  };
673
- var U256 = class _U256 extends _chunkCSUBLTFAjs.Serializable {
675
+ var U256 = class _U256 extends _chunkJMOQXLEDjs.Serializable {
674
676
  constructor(value) {
675
677
  super();
676
- _chunkCSUBLTFAjs.validateNumberInRange.call(void 0, value, BigInt(0), _chunkCSUBLTFAjs.MAX_U256_BIG_INT);
678
+ _chunkJMOQXLEDjs.validateNumberInRange.call(void 0, value, BigInt(0), _chunkJMOQXLEDjs.MAX_U256_BIG_INT);
677
679
  this.value = BigInt(value);
678
680
  }
679
681
  serialize(serializer) {
@@ -693,7 +695,7 @@ var U256 = class _U256 extends _chunkCSUBLTFAjs.Serializable {
693
695
  };
694
696
 
695
697
  // src/bcs/serializable/moveStructs.ts
696
- var MoveVector = class _MoveVector extends _chunkCSUBLTFAjs.Serializable {
698
+ var MoveVector = class _MoveVector extends _chunkJMOQXLEDjs.Serializable {
697
699
  /**
698
700
  * Initializes a new instance of the class with an optional value.
699
701
  * This constructor sets up the internal vector based on the provided value.
@@ -763,7 +765,7 @@ var MoveVector = class _MoveVector extends _chunkCSUBLTFAjs.Serializable {
763
765
  } else if (Array.isArray(values) && typeof values[0] === "number") {
764
766
  numbers = values;
765
767
  } else if (typeof values === "string") {
766
- const hex = _chunkCSUBLTFAjs.Hex.fromHexInput(values);
768
+ const hex = _chunkJMOQXLEDjs.Hex.fromHexInput(values);
767
769
  numbers = Array.from(hex.toUint8Array());
768
770
  } else if (values instanceof Uint8Array) {
769
771
  numbers = Array.from(values);
@@ -928,10 +930,10 @@ var MoveVector = class _MoveVector extends _chunkCSUBLTFAjs.Serializable {
928
930
  return new _MoveVector(values);
929
931
  }
930
932
  };
931
- var Serialized = class _Serialized extends _chunkCSUBLTFAjs.Serializable {
933
+ var Serialized = class _Serialized extends _chunkJMOQXLEDjs.Serializable {
932
934
  constructor(value) {
933
935
  super();
934
- this.value = _chunkCSUBLTFAjs.Hex.fromHexInput(value).toUint8Array();
936
+ this.value = _chunkJMOQXLEDjs.Hex.fromHexInput(value).toUint8Array();
935
937
  }
936
938
  serialize(serializer) {
937
939
  serializer.serializeBytes(this.value);
@@ -961,7 +963,7 @@ var Serialized = class _Serialized extends _chunkCSUBLTFAjs.Serializable {
961
963
  return new MoveVector(vec);
962
964
  }
963
965
  };
964
- var MoveString = class _MoveString extends _chunkCSUBLTFAjs.Serializable {
966
+ var MoveString = class _MoveString extends _chunkJMOQXLEDjs.Serializable {
965
967
  constructor(value) {
966
968
  super();
967
969
  this.value = value;
@@ -983,7 +985,7 @@ var MoveString = class _MoveString extends _chunkCSUBLTFAjs.Serializable {
983
985
  return new _MoveString(deserializer.deserializeStr());
984
986
  }
985
987
  };
986
- var MoveOption = class _MoveOption extends _chunkCSUBLTFAjs.Serializable {
988
+ var MoveOption = class _MoveOption extends _chunkJMOQXLEDjs.Serializable {
987
989
  constructor(value) {
988
990
  super();
989
991
  if (typeof value !== "undefined" && value !== null) {
@@ -1173,7 +1175,7 @@ var _ed25519 = require('@noble/curves/ed25519');
1173
1175
 
1174
1176
  // src/core/authenticationKey.ts
1175
1177
  var _sha3 = require('@noble/hashes/sha3');
1176
- var _AuthenticationKey = class _AuthenticationKey extends _chunkCSUBLTFAjs.Serializable {
1178
+ var _AuthenticationKey = class _AuthenticationKey extends _chunkJMOQXLEDjs.Serializable {
1177
1179
  /**
1178
1180
  * Creates an instance of the AuthenticationKey using the provided hex input.
1179
1181
  * This ensures that the hex input is valid and conforms to the required length for an Authentication Key.
@@ -1188,7 +1190,7 @@ var _AuthenticationKey = class _AuthenticationKey extends _chunkCSUBLTFAjs.Seria
1188
1190
  constructor(args) {
1189
1191
  super();
1190
1192
  const { data } = args;
1191
- const hex = _chunkCSUBLTFAjs.Hex.fromHexInput(data);
1193
+ const hex = _chunkJMOQXLEDjs.Hex.fromHexInput(data);
1192
1194
  if (hex.toUint8Array().length !== _AuthenticationKey.LENGTH) {
1193
1195
  throw new Error(`Authentication Key length should be ${_AuthenticationKey.LENGTH}`);
1194
1196
  }
@@ -1240,7 +1242,7 @@ var _AuthenticationKey = class _AuthenticationKey extends _chunkCSUBLTFAjs.Seria
1240
1242
  */
1241
1243
  static fromSchemeAndBytes(args) {
1242
1244
  const { scheme, input } = args;
1243
- const inputBytes = _chunkCSUBLTFAjs.Hex.fromHexInput(input).toUint8Array();
1245
+ const inputBytes = _chunkJMOQXLEDjs.Hex.fromHexInput(input).toUint8Array();
1244
1246
  const hashInput = new Uint8Array([...inputBytes, scheme]);
1245
1247
  const hash = _sha3.sha3_256.create();
1246
1248
  hash.update(hashInput);
@@ -1282,7 +1284,7 @@ var _AuthenticationKey = class _AuthenticationKey extends _chunkCSUBLTFAjs.Seria
1282
1284
  * @category Serialization
1283
1285
  */
1284
1286
  derivedAddress() {
1285
- return new (0, _chunkCSUBLTFAjs.AccountAddress)(this.data.toUint8Array());
1287
+ return new (0, _chunkJMOQXLEDjs.AccountAddress)(this.data.toUint8Array());
1286
1288
  }
1287
1289
  };
1288
1290
  /**
@@ -1350,7 +1352,7 @@ var _PrivateKey = class _PrivateKey {
1350
1352
  if (typeof formattedPrivateKey === "string" && formattedPrivateKey.startsWith(aip80Prefix)) {
1351
1353
  formattedPrivateKey = formattedPrivateKey.split("-")[2];
1352
1354
  }
1353
- return `${aip80Prefix}${_chunkCSUBLTFAjs.Hex.fromHexInput(formattedPrivateKey).toString()}`;
1355
+ return `${aip80Prefix}${_chunkJMOQXLEDjs.Hex.fromHexInput(formattedPrivateKey).toString()}`;
1354
1356
  }
1355
1357
  /**
1356
1358
  * Parse a HexInput that may be a HexString, Uint8Array, or a AIP-80 compliant string to a Hex instance.
@@ -1366,14 +1368,14 @@ var _PrivateKey = class _PrivateKey {
1366
1368
  const aip80Prefix = _PrivateKey.AIP80_PREFIXES[type];
1367
1369
  if (typeof value === "string") {
1368
1370
  if (!strict && !value.startsWith(aip80Prefix)) {
1369
- data = _chunkCSUBLTFAjs.Hex.fromHexInput(value);
1371
+ data = _chunkJMOQXLEDjs.Hex.fromHexInput(value);
1370
1372
  if (strict !== false) {
1371
1373
  console.warn(
1372
1374
  "[Aptos SDK] It is recommended that private keys are AIP-80 compliant (https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md). You can fix the private key by formatting it with `PrivateKey.formatPrivateKey(privateKey: string, type: 'ed25519' | 'secp256k1'): string`."
1373
1375
  );
1374
1376
  }
1375
1377
  } else if (value.startsWith(aip80Prefix)) {
1376
- data = _chunkCSUBLTFAjs.Hex.fromHexString(value.split("-")[2]);
1378
+ data = _chunkJMOQXLEDjs.Hex.fromHexString(value.split("-")[2]);
1377
1379
  } else {
1378
1380
  if (strict) {
1379
1381
  throw new Error("Invalid HexString input while parsing private key. Must AIP-80 compliant string.");
@@ -1381,7 +1383,7 @@ var _PrivateKey = class _PrivateKey {
1381
1383
  throw new Error("Invalid HexString input while parsing private key.");
1382
1384
  }
1383
1385
  } else {
1384
- data = _chunkCSUBLTFAjs.Hex.fromHexInput(value);
1386
+ data = _chunkJMOQXLEDjs.Hex.fromHexInput(value);
1385
1387
  }
1386
1388
  return data;
1387
1389
  }
@@ -1399,7 +1401,7 @@ _PrivateKey.AIP80_PREFIXES = {
1399
1401
  var PrivateKey = _PrivateKey;
1400
1402
 
1401
1403
  // src/core/crypto/publicKey.ts
1402
- var PublicKey = class extends _chunkCSUBLTFAjs.Serializable {
1404
+ var PublicKey = class extends _chunkJMOQXLEDjs.Serializable {
1403
1405
  /**
1404
1406
  * Get the raw public key bytes
1405
1407
  * @group Implementation
@@ -1417,14 +1419,14 @@ var PublicKey = class extends _chunkCSUBLTFAjs.Serializable {
1417
1419
  */
1418
1420
  toString() {
1419
1421
  const bytes = this.toUint8Array();
1420
- return _chunkCSUBLTFAjs.Hex.fromHexInput(bytes).toString();
1422
+ return _chunkJMOQXLEDjs.Hex.fromHexInput(bytes).toString();
1421
1423
  }
1422
1424
  };
1423
1425
  var AccountPublicKey = class extends PublicKey {
1424
1426
  };
1425
1427
 
1426
1428
  // src/core/crypto/signature.ts
1427
- var Signature = class extends _chunkCSUBLTFAjs.Serializable {
1429
+ var Signature = class extends _chunkJMOQXLEDjs.Serializable {
1428
1430
  /**
1429
1431
  * Get the raw signature bytes
1430
1432
  * @group Implementation
@@ -1441,14 +1443,14 @@ var Signature = class extends _chunkCSUBLTFAjs.Serializable {
1441
1443
  */
1442
1444
  toString() {
1443
1445
  const bytes = this.toUint8Array();
1444
- return _chunkCSUBLTFAjs.Hex.fromHexInput(bytes).toString();
1446
+ return _chunkJMOQXLEDjs.Hex.fromHexInput(bytes).toString();
1445
1447
  }
1446
1448
  };
1447
1449
 
1448
1450
  // src/core/crypto/utils.ts
1449
1451
  var convertSigningMessage = (message) => {
1450
1452
  if (typeof message === "string") {
1451
- const isValid = _chunkCSUBLTFAjs.Hex.isValid(message);
1453
+ const isValid = _chunkJMOQXLEDjs.Hex.isValid(message);
1452
1454
  if (!isValid.valid) {
1453
1455
  return new TextEncoder().encode(message);
1454
1456
  }
@@ -1516,7 +1518,7 @@ var _Ed25519PublicKey = class _Ed25519PublicKey extends AccountPublicKey {
1516
1518
  */
1517
1519
  constructor(hexInput) {
1518
1520
  super();
1519
- const hex = _chunkCSUBLTFAjs.Hex.fromHexInput(hexInput);
1521
+ const hex = _chunkJMOQXLEDjs.Hex.fromHexInput(hexInput);
1520
1522
  if (hex.toUint8Array().length !== _Ed25519PublicKey.LENGTH) {
1521
1523
  throw new Error(`PublicKey length should be ${_Ed25519PublicKey.LENGTH}`);
1522
1524
  }
@@ -1538,7 +1540,7 @@ var _Ed25519PublicKey = class _Ed25519PublicKey extends AccountPublicKey {
1538
1540
  return false;
1539
1541
  }
1540
1542
  const messageToVerify = convertSigningMessage(message);
1541
- const messageBytes = _chunkCSUBLTFAjs.Hex.fromHexInput(messageToVerify).toUint8Array();
1543
+ const messageBytes = _chunkJMOQXLEDjs.Hex.fromHexInput(messageToVerify).toUint8Array();
1542
1544
  const signatureBytes = signature.toUint8Array();
1543
1545
  const publicKeyBytes = this.key.toUint8Array();
1544
1546
  return _ed25519.ed25519.verify(signatureBytes, messageBytes, publicKeyBytes);
@@ -1626,7 +1628,7 @@ var _Ed25519PublicKey = class _Ed25519PublicKey extends AccountPublicKey {
1626
1628
  */
1627
1629
  _Ed25519PublicKey.LENGTH = 32;
1628
1630
  var Ed25519PublicKey = _Ed25519PublicKey;
1629
- var _Ed25519PrivateKey = class _Ed25519PrivateKey extends _chunkCSUBLTFAjs.Serializable {
1631
+ var _Ed25519PrivateKey = class _Ed25519PrivateKey extends _chunkJMOQXLEDjs.Serializable {
1630
1632
  // region Constructors
1631
1633
  /**
1632
1634
  * Create a new PrivateKey instance from a Uint8Array or String.
@@ -1720,7 +1722,7 @@ var _Ed25519PrivateKey = class _Ed25519PrivateKey extends _chunkCSUBLTFAjs.Seria
1720
1722
  */
1721
1723
  sign(message) {
1722
1724
  const messageToSign = convertSigningMessage(message);
1723
- const messageBytes = _chunkCSUBLTFAjs.Hex.fromHexInput(messageToSign).toUint8Array();
1725
+ const messageBytes = _chunkJMOQXLEDjs.Hex.fromHexInput(messageToSign).toUint8Array();
1724
1726
  const signatureBytes = _ed25519.ed25519.sign(messageBytes, this.signingKey.toUint8Array());
1725
1727
  return new Ed25519Signature(signatureBytes);
1726
1728
  }
@@ -1804,7 +1806,7 @@ var _Ed25519Signature = class _Ed25519Signature extends Signature {
1804
1806
  // region Constructors
1805
1807
  constructor(hexInput) {
1806
1808
  super();
1807
- const data = _chunkCSUBLTFAjs.Hex.fromHexInput(hexInput);
1809
+ const data = _chunkJMOQXLEDjs.Hex.fromHexInput(hexInput);
1808
1810
  if (data.toUint8Array().length !== _Ed25519Signature.LENGTH) {
1809
1811
  throw new Error(`Signature length should be ${_Ed25519Signature.LENGTH}`);
1810
1812
  }
@@ -1850,13 +1852,13 @@ var _Secp256k1PublicKey = class _Secp256k1PublicKey extends PublicKey {
1850
1852
  */
1851
1853
  constructor(hexInput) {
1852
1854
  super();
1853
- const hex = _chunkCSUBLTFAjs.Hex.fromHexInput(hexInput);
1855
+ const hex = _chunkJMOQXLEDjs.Hex.fromHexInput(hexInput);
1854
1856
  const { length } = hex.toUint8Array();
1855
1857
  if (length === _Secp256k1PublicKey.LENGTH) {
1856
1858
  this.key = hex;
1857
1859
  } else if (length === _Secp256k1PublicKey.COMPRESSED_LENGTH) {
1858
1860
  const point = _secp256k1.secp256k1.ProjectivePoint.fromHex(hex.toUint8Array());
1859
- this.key = _chunkCSUBLTFAjs.Hex.fromHexInput(point.toRawBytes(false));
1861
+ this.key = _chunkJMOQXLEDjs.Hex.fromHexInput(point.toRawBytes(false));
1860
1862
  } else {
1861
1863
  throw new Error(
1862
1864
  `PublicKey length should be ${_Secp256k1PublicKey.LENGTH} or ${_Secp256k1PublicKey.COMPRESSED_LENGTH}, received ${length}`
@@ -1878,7 +1880,7 @@ var _Secp256k1PublicKey = class _Secp256k1PublicKey extends PublicKey {
1878
1880
  verifySignature(args) {
1879
1881
  const { message, signature } = args;
1880
1882
  const messageToVerify = convertSigningMessage(message);
1881
- const messageBytes = _chunkCSUBLTFAjs.Hex.fromHexInput(messageToVerify).toUint8Array();
1883
+ const messageBytes = _chunkJMOQXLEDjs.Hex.fromHexInput(messageToVerify).toUint8Array();
1882
1884
  const messageSha3Bytes = _sha3.sha3_256.call(void 0, messageBytes);
1883
1885
  const signatureBytes = signature.toUint8Array();
1884
1886
  return _secp256k1.secp256k1.verify(signatureBytes, messageSha3Bytes, this.key.toUint8Array(), { lowS: true });
@@ -1953,7 +1955,7 @@ _Secp256k1PublicKey.LENGTH = 65;
1953
1955
  // If it's compressed, it is only 33 bytes
1954
1956
  _Secp256k1PublicKey.COMPRESSED_LENGTH = 33;
1955
1957
  var Secp256k1PublicKey = _Secp256k1PublicKey;
1956
- var _Secp256k1PrivateKey = class _Secp256k1PrivateKey extends _chunkCSUBLTFAjs.Serializable {
1958
+ var _Secp256k1PrivateKey = class _Secp256k1PrivateKey extends _chunkJMOQXLEDjs.Serializable {
1957
1959
  // region Constructors
1958
1960
  /**
1959
1961
  * Create a new PrivateKey instance from a Uint8Array or String.
@@ -2033,7 +2035,7 @@ var _Secp256k1PrivateKey = class _Secp256k1PrivateKey extends _chunkCSUBLTFAjs.S
2033
2035
  */
2034
2036
  sign(message) {
2035
2037
  const messageToSign = convertSigningMessage(message);
2036
- const messageBytes = _chunkCSUBLTFAjs.Hex.fromHexInput(messageToSign);
2038
+ const messageBytes = _chunkJMOQXLEDjs.Hex.fromHexInput(messageToSign);
2037
2039
  const messageHashBytes = _sha3.sha3_256.call(void 0, messageBytes.toUint8Array());
2038
2040
  const signature = _secp256k1.secp256k1.sign(messageHashBytes, this.key.toUint8Array(), { lowS: true });
2039
2041
  return new Secp256k1Signature(signature.toCompactRawBytes());
@@ -2128,7 +2130,7 @@ var _Secp256k1Signature = class _Secp256k1Signature extends Signature {
2128
2130
  */
2129
2131
  constructor(hexInput) {
2130
2132
  super();
2131
- const data = _chunkCSUBLTFAjs.Hex.fromHexInput(hexInput);
2133
+ const data = _chunkJMOQXLEDjs.Hex.fromHexInput(hexInput);
2132
2134
  if (data.toUint8Array().length !== _Secp256k1Signature.LENGTH) {
2133
2135
  throw new Error(
2134
2136
  `Signature length should be ${_Secp256k1Signature.LENGTH}, received ${data.toUint8Array().length}`
@@ -2269,7 +2271,7 @@ var EphemeralSignature = class _EphemeralSignature extends Signature {
2269
2271
  * @category Serialization
2270
2272
  */
2271
2273
  static fromHex(hexInput) {
2272
- const data = _chunkCSUBLTFAjs.Hex.fromHexInput(hexInput);
2274
+ const data = _chunkJMOQXLEDjs.Hex.fromHexInput(hexInput);
2273
2275
  const deserializer = new Deserializer(data.toUint8Array());
2274
2276
  return _EphemeralSignature.deserialize(deserializer);
2275
2277
  }
@@ -2407,7 +2409,7 @@ function poseidonHash(inputs) {
2407
2409
  }
2408
2410
 
2409
2411
  // src/core/crypto/proof.ts
2410
- var Proof = class extends _chunkCSUBLTFAjs.Serializable {
2412
+ var Proof = class extends _chunkJMOQXLEDjs.Serializable {
2411
2413
  };
2412
2414
 
2413
2415
  // src/version.ts
@@ -2714,7 +2716,7 @@ Details: ${details}`;
2714
2716
  AptosApiError: ${innerError.message}`;
2715
2717
  } else if (innerError !== void 0) {
2716
2718
  result += `
2717
- Error: ${_chunkCSUBLTFAjs.getErrorMessage.call(void 0, innerError)}`;
2719
+ Error: ${_chunkJMOQXLEDjs.getErrorMessage.call(void 0, innerError)}`;
2718
2720
  }
2719
2721
  result += `
2720
2722
  KeylessErrorResolutionTip: ${tip}`;
@@ -3098,7 +3100,6 @@ async function postBinaryAptosFullNode(options) {
3098
3100
  }
3099
3101
  async function postAptosIndexer(options) {
3100
3102
  const { aptosConfig } = options;
3101
- console.log("request", JSON.stringify(options.body, null, 2));
3102
3103
  return post({
3103
3104
  ...options,
3104
3105
  type: "Indexer" /* INDEXER */,
@@ -3176,7 +3177,7 @@ var _KeylessPublicKey = class _KeylessPublicKey extends AccountPublicKey {
3176
3177
  // TODO: Fix the JSDoc for the below values
3177
3178
  constructor(iss, idCommitment) {
3178
3179
  super();
3179
- const idcBytes = _chunkCSUBLTFAjs.Hex.fromHexInput(idCommitment).toUint8Array();
3180
+ const idcBytes = _chunkJMOQXLEDjs.Hex.fromHexInput(idCommitment).toUint8Array();
3180
3181
  if (idcBytes.length !== _KeylessPublicKey.ID_COMMITMENT_LENGTH) {
3181
3182
  throw new Error(`Id Commitment length in bytes should be ${_KeylessPublicKey.ID_COMMITMENT_LENGTH}`);
3182
3183
  }
@@ -3191,7 +3192,7 @@ var _KeylessPublicKey = class _KeylessPublicKey extends AccountPublicKey {
3191
3192
  * @category Serialization
3192
3193
  */
3193
3194
  authKey() {
3194
- const serializer = new (0, _chunkCSUBLTFAjs.Serializer)();
3195
+ const serializer = new (0, _chunkJMOQXLEDjs.Serializer)();
3195
3196
  serializer.serializeU32AsUleb128(3 /* Keyless */);
3196
3197
  serializer.serializeFixedBytes(this.bcsToBytes());
3197
3198
  return AuthenticationKey.fromSchemeAndBytes({
@@ -3333,7 +3334,7 @@ var KeylessPublicKey = _KeylessPublicKey;
3333
3334
  function computeIdCommitment(args) {
3334
3335
  const { uidKey, uidVal, aud, pepper } = args;
3335
3336
  const fields = [
3336
- bytesToBigIntLE(_chunkCSUBLTFAjs.Hex.fromHexInput(pepper).toUint8Array()),
3337
+ bytesToBigIntLE(_chunkJMOQXLEDjs.Hex.fromHexInput(pepper).toUint8Array()),
3337
3338
  hashStrToField(aud, MAX_AUD_VAL_BYTES),
3338
3339
  hashStrToField(uidVal, MAX_UID_VAL_BYTES),
3339
3340
  hashStrToField(uidKey, MAX_UID_KEY_BYTES)
@@ -3431,10 +3432,10 @@ var EphemeralCertificate = class _EphemeralCertificate extends Signature {
3431
3432
  }
3432
3433
  }
3433
3434
  };
3434
- var G1Bytes = class _G1Bytes extends _chunkCSUBLTFAjs.Serializable {
3435
+ var G1Bytes = class _G1Bytes extends _chunkJMOQXLEDjs.Serializable {
3435
3436
  constructor(data) {
3436
3437
  super();
3437
- this.data = _chunkCSUBLTFAjs.Hex.fromHexInput(data).toUint8Array();
3438
+ this.data = _chunkJMOQXLEDjs.Hex.fromHexInput(data).toUint8Array();
3438
3439
  if (this.data.length !== 32) {
3439
3440
  throw new Error("Input needs to be 32 bytes");
3440
3441
  }
@@ -3447,10 +3448,10 @@ var G1Bytes = class _G1Bytes extends _chunkCSUBLTFAjs.Serializable {
3447
3448
  return new _G1Bytes(bytes);
3448
3449
  }
3449
3450
  };
3450
- var G2Bytes = class _G2Bytes extends _chunkCSUBLTFAjs.Serializable {
3451
+ var G2Bytes = class _G2Bytes extends _chunkJMOQXLEDjs.Serializable {
3451
3452
  constructor(data) {
3452
3453
  super();
3453
- this.data = _chunkCSUBLTFAjs.Hex.fromHexInput(data).toUint8Array();
3454
+ this.data = _chunkJMOQXLEDjs.Hex.fromHexInput(data).toUint8Array();
3454
3455
  if (this.data.length !== 64) {
3455
3456
  throw new Error("Input needs to be 64 bytes");
3456
3457
  }
@@ -3483,7 +3484,7 @@ var Groth16Zkp = class _Groth16Zkp extends Proof {
3483
3484
  return new _Groth16Zkp({ a, b, c });
3484
3485
  }
3485
3486
  };
3486
- var ZkProof = class _ZkProof extends _chunkCSUBLTFAjs.Serializable {
3487
+ var ZkProof = class _ZkProof extends _chunkJMOQXLEDjs.Serializable {
3487
3488
  constructor(proof, variant) {
3488
3489
  super();
3489
3490
  this.proof = proof;
@@ -3574,7 +3575,7 @@ var Groth16VerificationKey = class _Groth16VerificationKey {
3574
3575
  * @returns The SHA3-256 hash of the serialized verification key as a Uint8Array
3575
3576
  */
3576
3577
  hash() {
3577
- const serializer = new (0, _chunkCSUBLTFAjs.Serializer)();
3578
+ const serializer = new (0, _chunkJMOQXLEDjs.Serializer)();
3578
3579
  this.serialize(serializer);
3579
3580
  return _sha3.sha3_256.create().update(serializer.toUint8Array()).digest();
3580
3581
  }
@@ -3640,7 +3641,7 @@ function getIssAudAndUidVal(args) {
3640
3641
  } catch (error) {
3641
3642
  throw KeylessError.fromErrorType({
3642
3643
  type: 12 /* JWT_PARSING_ERROR */,
3643
- details: `Failed to parse JWT - ${_chunkCSUBLTFAjs.getErrorMessage.call(void 0, error)}`
3644
+ details: `Failed to parse JWT - ${_chunkJMOQXLEDjs.getErrorMessage.call(void 0, error)}`
3644
3645
  });
3645
3646
  }
3646
3647
  if (typeof jwtPayload.iss !== "string") {
@@ -3665,7 +3666,7 @@ async function getKeylessConfigurationResource(args) {
3665
3666
  const { data } = await getAptosFullNode({
3666
3667
  aptosConfig,
3667
3668
  originMethod: "getKeylessConfigurationResource",
3668
- path: `accounts/${_chunkCSUBLTFAjs.AccountAddress.from("0x1").toString()}/resource/${resourceType}`,
3669
+ path: `accounts/${_chunkJMOQXLEDjs.AccountAddress.from("0x1").toString()}/resource/${resourceType}`,
3669
3670
  params: { ledger_version: _optionalChain([options, 'optionalAccess', _57 => _57.ledgerVersion]) }
3670
3671
  });
3671
3672
  return data.data;
@@ -3683,7 +3684,7 @@ async function getGroth16VerificationKeyResource(args) {
3683
3684
  const { data } = await getAptosFullNode({
3684
3685
  aptosConfig,
3685
3686
  originMethod: "getGroth16VerificationKeyResource",
3686
- path: `accounts/${_chunkCSUBLTFAjs.AccountAddress.from("0x1").toString()}/resource/${resourceType}`,
3687
+ path: `accounts/${_chunkJMOQXLEDjs.AccountAddress.from("0x1").toString()}/resource/${resourceType}`,
3687
3688
  params: { ledger_version: _optionalChain([options, 'optionalAccess', _58 => _58.ledgerVersion]) }
3688
3689
  });
3689
3690
  return data.data;
@@ -3711,7 +3712,7 @@ async function getKeylessJWKs(args) {
3711
3712
  const { data } = await getAptosFullNode({
3712
3713
  aptosConfig,
3713
3714
  originMethod: "getKeylessJWKs",
3714
- path: `accounts/${_chunkCSUBLTFAjs.AccountAddress.from(jwkAddr).toString()}/resource/${resourceType}`,
3715
+ path: `accounts/${_chunkJMOQXLEDjs.AccountAddress.from(jwkAddr).toString()}/resource/${resourceType}`,
3715
3716
  params: { ledger_version: _optionalChain([options, 'optionalAccess', _60 => _60.ledgerVersion]) }
3716
3717
  });
3717
3718
  resource = data;
@@ -3721,15 +3722,15 @@ async function getKeylessJWKs(args) {
3721
3722
  const jwks = [];
3722
3723
  for (const jwkStruct of entry.jwks) {
3723
3724
  const { data: jwkData } = jwkStruct.variant;
3724
- const deserializer = new Deserializer(_chunkCSUBLTFAjs.Hex.fromHexInput(jwkData).toUint8Array());
3725
+ const deserializer = new Deserializer(_chunkJMOQXLEDjs.Hex.fromHexInput(jwkData).toUint8Array());
3725
3726
  const jwk = MoveJWK.deserialize(deserializer);
3726
3727
  jwks.push(jwk);
3727
3728
  }
3728
- jwkMap.set(_chunkCSUBLTFAjs.hexToAsciiString.call(void 0, entry.issuer), jwks);
3729
+ jwkMap.set(_chunkJMOQXLEDjs.hexToAsciiString.call(void 0, entry.issuer), jwks);
3729
3730
  }
3730
3731
  return jwkMap;
3731
3732
  }
3732
- var MoveJWK = class _MoveJWK extends _chunkCSUBLTFAjs.Serializable {
3733
+ var MoveJWK = class _MoveJWK extends _chunkJMOQXLEDjs.Serializable {
3733
3734
  constructor(args) {
3734
3735
  super();
3735
3736
  const { kid, kty, alg, e, n } = args;
@@ -3748,7 +3749,7 @@ var MoveJWK = class _MoveJWK extends _chunkCSUBLTFAjs.Serializable {
3748
3749
  }
3749
3750
  static fromMoveStruct(struct) {
3750
3751
  const { data } = struct.variant;
3751
- const deserializer = new Deserializer(_chunkCSUBLTFAjs.Hex.fromHexInput(data).toUint8Array());
3752
+ const deserializer = new Deserializer(_chunkJMOQXLEDjs.Hex.fromHexInput(data).toUint8Array());
3752
3753
  return _MoveJWK.deserialize(deserializer);
3753
3754
  }
3754
3755
  static deserialize(deserializer) {
@@ -3776,7 +3777,7 @@ function parseJwtHeader(jwtHeader) {
3776
3777
  var FederatedKeylessPublicKey = class _FederatedKeylessPublicKey extends AccountPublicKey {
3777
3778
  constructor(jwkAddress, keylessPublicKey) {
3778
3779
  super();
3779
- this.jwkAddress = _chunkCSUBLTFAjs.AccountAddress.from(jwkAddress);
3780
+ this.jwkAddress = _chunkJMOQXLEDjs.AccountAddress.from(jwkAddress);
3780
3781
  this.keylessPublicKey = keylessPublicKey;
3781
3782
  }
3782
3783
  /**
@@ -3787,7 +3788,7 @@ var FederatedKeylessPublicKey = class _FederatedKeylessPublicKey extends Account
3787
3788
  * @category Serialization
3788
3789
  */
3789
3790
  authKey() {
3790
- const serializer = new (0, _chunkCSUBLTFAjs.Serializer)();
3791
+ const serializer = new (0, _chunkJMOQXLEDjs.Serializer)();
3791
3792
  serializer.serializeU32AsUleb128(4 /* FederatedKeyless */);
3792
3793
  serializer.serializeFixedBytes(this.bcsToBytes());
3793
3794
  return AuthenticationKey.fromSchemeAndBytes({
@@ -3813,7 +3814,7 @@ var FederatedKeylessPublicKey = class _FederatedKeylessPublicKey extends Account
3813
3814
  this.keylessPublicKey.serialize(serializer);
3814
3815
  }
3815
3816
  static deserialize(deserializer) {
3816
- const jwkAddress = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
3817
+ const jwkAddress = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
3817
3818
  const keylessPublicKey = KeylessPublicKey.deserialize(deserializer);
3818
3819
  return new _FederatedKeylessPublicKey(jwkAddress, keylessPublicKey);
3819
3820
  }
@@ -3839,7 +3840,7 @@ var FederatedKeylessPublicKey = class _FederatedKeylessPublicKey extends Account
3839
3840
  return new _FederatedKeylessPublicKey(args.jwkAddress, KeylessPublicKey.fromJwtAndPepper(args));
3840
3841
  }
3841
3842
  static isInstance(publicKey) {
3842
- return "jwkAddress" in publicKey && publicKey.jwkAddress instanceof _chunkCSUBLTFAjs.AccountAddress && "keylessPublicKey" in publicKey && publicKey.keylessPublicKey instanceof KeylessPublicKey;
3843
+ return "jwkAddress" in publicKey && publicKey.jwkAddress instanceof _chunkJMOQXLEDjs.AccountAddress && "keylessPublicKey" in publicKey && publicKey.keylessPublicKey instanceof KeylessPublicKey;
3843
3844
  }
3844
3845
  };
3845
3846
 
@@ -4619,13 +4620,13 @@ var createObjectAddress = (creatorAddress, seed) => {
4619
4620
  const creatorBytes = creatorAddress.bcsToBytes();
4620
4621
  const seedBytes = typeof seed === "string" ? Buffer.from(seed, "utf8") : seed;
4621
4622
  const bytes = new Uint8Array([...creatorBytes, ...seedBytes, 254 /* DeriveObjectAddressFromSeed */]);
4622
- return new (0, _chunkCSUBLTFAjs.AccountAddress)(_sha3.sha3_256.call(void 0, bytes));
4623
+ return new (0, _chunkJMOQXLEDjs.AccountAddress)(_sha3.sha3_256.call(void 0, bytes));
4623
4624
  };
4624
4625
  var createResourceAddress = (creatorAddress, seed) => {
4625
4626
  const creatorBytes = creatorAddress.bcsToBytes();
4626
4627
  const seedBytes = typeof seed === "string" ? Buffer.from(seed, "utf8") : seed;
4627
4628
  const bytes = new Uint8Array([...creatorBytes, ...seedBytes, 255 /* DeriveResourceAccountAddress */]);
4628
- return new (0, _chunkCSUBLTFAjs.AccountAddress)(_sha3.sha3_256.call(void 0, bytes));
4629
+ return new (0, _chunkJMOQXLEDjs.AccountAddress)(_sha3.sha3_256.call(void 0, bytes));
4629
4630
  };
4630
4631
  var createTokenAddress = (creatorAddress, collectionName, tokenName) => {
4631
4632
  const seed = `${collectionName}::${tokenName}`;
@@ -4633,7 +4634,7 @@ var createTokenAddress = (creatorAddress, collectionName, tokenName) => {
4633
4634
  };
4634
4635
 
4635
4636
  // src/transactions/authenticator/account.ts
4636
- var AccountAuthenticator = class extends _chunkCSUBLTFAjs.Serializable {
4637
+ var AccountAuthenticator = class extends _chunkJMOQXLEDjs.Serializable {
4637
4638
  /**
4638
4639
  * Deserializes an AccountAuthenticator from the provided deserializer.
4639
4640
  * This function helps in reconstructing the AccountAuthenticator object based on the variant index.
@@ -4807,17 +4808,17 @@ var AccountAuthenticatorNoAccountAuthenticator = class _AccountAuthenticatorNoAc
4807
4808
  var AccountAuthenticatorAbstraction = class _AccountAuthenticatorAbstraction extends AccountAuthenticator {
4808
4809
  constructor(functionInfo, signingMessageDigest, authenticator) {
4809
4810
  super();
4810
- if (!_chunkCSUBLTFAjs.isValidFunctionInfo.call(void 0, functionInfo)) {
4811
+ if (!_chunkJMOQXLEDjs.isValidFunctionInfo.call(void 0, functionInfo)) {
4811
4812
  throw new Error(`Invalid function info ${functionInfo} passed into AccountAuthenticatorAbstraction`);
4812
4813
  }
4813
4814
  this.functionInfo = functionInfo;
4814
- this.authenticator = _chunkCSUBLTFAjs.Hex.fromHexInput(authenticator);
4815
- this.signingMessageDigest = _chunkCSUBLTFAjs.Hex.fromHexInput(_chunkCSUBLTFAjs.Hex.fromHexInput(signingMessageDigest).toUint8Array());
4815
+ this.authenticator = _chunkJMOQXLEDjs.Hex.fromHexInput(authenticator);
4816
+ this.signingMessageDigest = _chunkJMOQXLEDjs.Hex.fromHexInput(_chunkJMOQXLEDjs.Hex.fromHexInput(signingMessageDigest).toUint8Array());
4816
4817
  }
4817
4818
  serialize(serializer) {
4818
4819
  serializer.serializeU32AsUleb128(5 /* Abstraction */);
4819
- const { moduleAddress, moduleName, functionName } = _chunkCSUBLTFAjs.getFunctionParts.call(void 0, this.functionInfo);
4820
- _chunkCSUBLTFAjs.AccountAddress.fromString(moduleAddress).serialize(serializer);
4820
+ const { moduleAddress, moduleName, functionName } = _chunkJMOQXLEDjs.getFunctionParts.call(void 0, this.functionInfo);
4821
+ _chunkJMOQXLEDjs.AccountAddress.fromString(moduleAddress).serialize(serializer);
4821
4822
  serializer.serializeStr(moduleName);
4822
4823
  serializer.serializeStr(functionName);
4823
4824
  serializer.serializeU32AsUleb128(0 /* V1 */);
@@ -4825,7 +4826,7 @@ var AccountAuthenticatorAbstraction = class _AccountAuthenticatorAbstraction ext
4825
4826
  serializer.serializeFixedBytes(this.authenticator.toUint8Array());
4826
4827
  }
4827
4828
  static load(deserializer) {
4828
- const moduleAddress = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
4829
+ const moduleAddress = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
4829
4830
  const moduleName = deserializer.deserializeStr();
4830
4831
  const functionName = deserializer.deserializeStr();
4831
4832
  const variant = deserializer.deserializeUleb128AsU32();
@@ -4846,7 +4847,7 @@ var AccountAuthenticatorAbstraction = class _AccountAuthenticatorAbstraction ext
4846
4847
 
4847
4848
 
4848
4849
  // src/transactions/instances/chainId.ts
4849
- var ChainId = class _ChainId extends _chunkCSUBLTFAjs.Serializable {
4850
+ var ChainId = class _ChainId extends _chunkJMOQXLEDjs.Serializable {
4850
4851
  /**
4851
4852
  * Initializes a new instance of the class with the specified chain ID.
4852
4853
  *
@@ -4884,7 +4885,7 @@ var ChainId = class _ChainId extends _chunkCSUBLTFAjs.Serializable {
4884
4885
  };
4885
4886
 
4886
4887
  // src/transactions/instances/identifier.ts
4887
- var Identifier = class _Identifier extends _chunkCSUBLTFAjs.Serializable {
4888
+ var Identifier = class _Identifier extends _chunkJMOQXLEDjs.Serializable {
4888
4889
  /**
4889
4890
  * Creates an instance of the class with a specified identifier.
4890
4891
  *
@@ -4921,7 +4922,7 @@ var Identifier = class _Identifier extends _chunkCSUBLTFAjs.Serializable {
4921
4922
  };
4922
4923
 
4923
4924
  // src/transactions/instances/moduleId.ts
4924
- var ModuleId = class _ModuleId extends _chunkCSUBLTFAjs.Serializable {
4925
+ var ModuleId = class _ModuleId extends _chunkJMOQXLEDjs.Serializable {
4925
4926
  /**
4926
4927
  * Initializes a new instance of the module with the specified account address and name.
4927
4928
  *
@@ -4948,7 +4949,7 @@ var ModuleId = class _ModuleId extends _chunkCSUBLTFAjs.Serializable {
4948
4949
  if (parts.length !== 2) {
4949
4950
  throw new Error("Invalid module id.");
4950
4951
  }
4951
- return new _ModuleId(_chunkCSUBLTFAjs.AccountAddress.fromString(parts[0]), new Identifier(parts[1]));
4952
+ return new _ModuleId(_chunkJMOQXLEDjs.AccountAddress.fromString(parts[0]), new Identifier(parts[1]));
4952
4953
  }
4953
4954
  /**
4954
4955
  * Serializes the address and name properties using the provided serializer.
@@ -4971,14 +4972,14 @@ var ModuleId = class _ModuleId extends _chunkCSUBLTFAjs.Serializable {
4971
4972
  * @category Transactions
4972
4973
  */
4973
4974
  static deserialize(deserializer) {
4974
- const address = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
4975
+ const address = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
4975
4976
  const name = Identifier.deserialize(deserializer);
4976
4977
  return new _ModuleId(address, name);
4977
4978
  }
4978
4979
  };
4979
4980
 
4980
4981
  // src/transactions/typeTag/index.ts
4981
- var TypeTag = class _TypeTag extends _chunkCSUBLTFAjs.Serializable {
4982
+ var TypeTag = class _TypeTag extends _chunkJMOQXLEDjs.Serializable {
4982
4983
  /**
4983
4984
  * Deserializes a StructTag from the provided deserializer.
4984
4985
  * This function allows you to reconstruct a StructTag object from its serialized form.
@@ -4988,7 +4989,7 @@ var TypeTag = class _TypeTag extends _chunkCSUBLTFAjs.Serializable {
4988
4989
  * @category Transactions
4989
4990
  */
4990
4991
  deserialize(deserializer) {
4991
- const address = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
4992
+ const address = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
4992
4993
  const moduleName = Identifier.deserialize(deserializer);
4993
4994
  const name = Identifier.deserialize(deserializer);
4994
4995
  const typeArgs = deserializer.deserializeVector(_TypeTag);
@@ -5381,7 +5382,7 @@ var TypeTagStruct = class _TypeTagStruct extends TypeTag {
5381
5382
  * @category Transactions
5382
5383
  */
5383
5384
  isString() {
5384
- return this.isTypeTag(_chunkCSUBLTFAjs.AccountAddress.ONE, "string", "String");
5385
+ return this.isTypeTag(_chunkJMOQXLEDjs.AccountAddress.ONE, "string", "String");
5385
5386
  }
5386
5387
  /**
5387
5388
  * Checks if the specified account address is of type "option".
@@ -5391,7 +5392,7 @@ var TypeTagStruct = class _TypeTagStruct extends TypeTag {
5391
5392
  * @category Transactions
5392
5393
  */
5393
5394
  isOption() {
5394
- return this.isTypeTag(_chunkCSUBLTFAjs.AccountAddress.ONE, "option", "Option");
5395
+ return this.isTypeTag(_chunkJMOQXLEDjs.AccountAddress.ONE, "option", "Option");
5395
5396
  }
5396
5397
  /**
5397
5398
  * Checks if the provided value is of type 'object'.
@@ -5402,10 +5403,10 @@ var TypeTagStruct = class _TypeTagStruct extends TypeTag {
5402
5403
  * @category Transactions
5403
5404
  */
5404
5405
  isObject() {
5405
- return this.isTypeTag(_chunkCSUBLTFAjs.AccountAddress.ONE, "object", "Object");
5406
+ return this.isTypeTag(_chunkJMOQXLEDjs.AccountAddress.ONE, "object", "Object");
5406
5407
  }
5407
5408
  };
5408
- var StructTag = class _StructTag extends _chunkCSUBLTFAjs.Serializable {
5409
+ var StructTag = class _StructTag extends _chunkJMOQXLEDjs.Serializable {
5409
5410
  constructor(address, module_name, name, type_args) {
5410
5411
  super();
5411
5412
  this.address = address;
@@ -5420,7 +5421,7 @@ var StructTag = class _StructTag extends _chunkCSUBLTFAjs.Serializable {
5420
5421
  serializer.serializeVector(this.typeArgs);
5421
5422
  }
5422
5423
  static deserialize(deserializer) {
5423
- const address = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
5424
+ const address = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
5424
5425
  const moduleName = Identifier.deserialize(deserializer);
5425
5426
  const name = Identifier.deserialize(deserializer);
5426
5427
  const typeArgs = deserializer.deserializeVector(TypeTag);
@@ -5428,16 +5429,16 @@ var StructTag = class _StructTag extends _chunkCSUBLTFAjs.Serializable {
5428
5429
  }
5429
5430
  };
5430
5431
  function aptosCoinStructTag() {
5431
- return new StructTag(_chunkCSUBLTFAjs.AccountAddress.ONE, new Identifier("aptos_coin"), new Identifier("AptosCoin"), []);
5432
+ return new StructTag(_chunkJMOQXLEDjs.AccountAddress.ONE, new Identifier("aptos_coin"), new Identifier("AptosCoin"), []);
5432
5433
  }
5433
5434
  function stringStructTag() {
5434
- return new StructTag(_chunkCSUBLTFAjs.AccountAddress.ONE, new Identifier("string"), new Identifier("String"), []);
5435
+ return new StructTag(_chunkJMOQXLEDjs.AccountAddress.ONE, new Identifier("string"), new Identifier("String"), []);
5435
5436
  }
5436
5437
  function optionStructTag(typeArg) {
5437
- return new StructTag(_chunkCSUBLTFAjs.AccountAddress.ONE, new Identifier("option"), new Identifier("Option"), [typeArg]);
5438
+ return new StructTag(_chunkJMOQXLEDjs.AccountAddress.ONE, new Identifier("option"), new Identifier("Option"), [typeArg]);
5438
5439
  }
5439
5440
  function objectStructTag(typeArg) {
5440
- return new StructTag(_chunkCSUBLTFAjs.AccountAddress.ONE, new Identifier("object"), new Identifier("Object"), [typeArg]);
5441
+ return new StructTag(_chunkJMOQXLEDjs.AccountAddress.ONE, new Identifier("object"), new Identifier("Object"), [typeArg]);
5441
5442
  }
5442
5443
 
5443
5444
  // src/transactions/instances/transactionPayload.ts
@@ -5451,7 +5452,7 @@ function deserializeFromScriptArgument(deserializer) {
5451
5452
  case 2 /* U128 */:
5452
5453
  return U128.deserialize(deserializer);
5453
5454
  case 3 /* Address */:
5454
- return _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
5455
+ return _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
5455
5456
  case 4 /* U8Vector */:
5456
5457
  return MoveVector.deserialize(deserializer, U8);
5457
5458
  case 5 /* Bool */:
@@ -5468,7 +5469,7 @@ function deserializeFromScriptArgument(deserializer) {
5468
5469
  throw new Error(`Unknown variant index for ScriptTransactionArgument: ${index}`);
5469
5470
  }
5470
5471
  }
5471
- var TransactionPayload = class extends _chunkCSUBLTFAjs.Serializable {
5472
+ var TransactionPayload = class extends _chunkJMOQXLEDjs.Serializable {
5472
5473
  /**
5473
5474
  * Deserialize a Transaction Payload
5474
5475
  * @group Implementation
@@ -5730,7 +5731,7 @@ var MultiSig = class _MultiSig {
5730
5731
  }
5731
5732
  }
5732
5733
  static deserialize(deserializer) {
5733
- const multisig_address = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
5734
+ const multisig_address = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
5734
5735
  const payloadPresent = deserializer.deserializeBool();
5735
5736
  let transaction_payload;
5736
5737
  if (payloadPresent) {
@@ -5739,7 +5740,7 @@ var MultiSig = class _MultiSig {
5739
5740
  return new _MultiSig(multisig_address, transaction_payload);
5740
5741
  }
5741
5742
  };
5742
- var MultiSigTransactionPayload = class _MultiSigTransactionPayload extends _chunkCSUBLTFAjs.Serializable {
5743
+ var MultiSigTransactionPayload = class _MultiSigTransactionPayload extends _chunkJMOQXLEDjs.Serializable {
5743
5744
  /**
5744
5745
  * Contains the payload to run a multi-sig account transaction.
5745
5746
  *
@@ -5764,7 +5765,7 @@ var MultiSigTransactionPayload = class _MultiSigTransactionPayload extends _chun
5764
5765
  };
5765
5766
 
5766
5767
  // src/transactions/instances/rawTransaction.ts
5767
- var RawTransaction = class _RawTransaction extends _chunkCSUBLTFAjs.Serializable {
5768
+ var RawTransaction = class _RawTransaction extends _chunkJMOQXLEDjs.Serializable {
5768
5769
  /**
5769
5770
  * RawTransactions contain the metadata and payloads that can be submitted to Aptos chain for execution.
5770
5771
  * RawTransactions must be signed before Aptos chain can execute them.
@@ -5819,7 +5820,7 @@ var RawTransaction = class _RawTransaction extends _chunkCSUBLTFAjs.Serializable
5819
5820
  * @category Transactions
5820
5821
  */
5821
5822
  static deserialize(deserializer) {
5822
- const sender = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
5823
+ const sender = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
5823
5824
  const sequence_number = deserializer.deserializeU64();
5824
5825
  const payload = TransactionPayload.deserialize(deserializer);
5825
5826
  const max_gas_amount = deserializer.deserializeU64();
@@ -5837,7 +5838,7 @@ var RawTransaction = class _RawTransaction extends _chunkCSUBLTFAjs.Serializable
5837
5838
  );
5838
5839
  }
5839
5840
  };
5840
- var RawTransactionWithData = class extends _chunkCSUBLTFAjs.Serializable {
5841
+ var RawTransactionWithData = class extends _chunkJMOQXLEDjs.Serializable {
5841
5842
  /**
5842
5843
  * Deserialize a Raw Transaction With Data
5843
5844
  * @group Implementation
@@ -5878,7 +5879,7 @@ var MultiAgentRawTransaction = class _MultiAgentRawTransaction extends RawTransa
5878
5879
  */
5879
5880
  static load(deserializer) {
5880
5881
  const rawTxn = RawTransaction.deserialize(deserializer);
5881
- const secondarySignerAddresses = deserializer.deserializeVector(_chunkCSUBLTFAjs.AccountAddress);
5882
+ const secondarySignerAddresses = deserializer.deserializeVector(_chunkJMOQXLEDjs.AccountAddress);
5882
5883
  return new _MultiAgentRawTransaction(rawTxn, secondarySignerAddresses);
5883
5884
  }
5884
5885
  };
@@ -5897,14 +5898,14 @@ var FeePayerRawTransaction = class _FeePayerRawTransaction extends RawTransactio
5897
5898
  }
5898
5899
  static load(deserializer) {
5899
5900
  const rawTxn = RawTransaction.deserialize(deserializer);
5900
- const secondarySignerAddresses = deserializer.deserializeVector(_chunkCSUBLTFAjs.AccountAddress);
5901
- const feePayerAddress = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
5901
+ const secondarySignerAddresses = deserializer.deserializeVector(_chunkJMOQXLEDjs.AccountAddress);
5902
+ const feePayerAddress = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
5902
5903
  return new _FeePayerRawTransaction(rawTxn, secondarySignerAddresses, feePayerAddress);
5903
5904
  }
5904
5905
  };
5905
5906
 
5906
5907
  // src/transactions/instances/rotationProofChallenge.ts
5907
- var RotationProofChallenge = class extends _chunkCSUBLTFAjs.Serializable {
5908
+ var RotationProofChallenge = class extends _chunkJMOQXLEDjs.Serializable {
5908
5909
  /**
5909
5910
  * Initializes a new instance of the class with the specified parameters.
5910
5911
  * This constructor sets up the necessary attributes for managing account keys.
@@ -5920,7 +5921,7 @@ var RotationProofChallenge = class extends _chunkCSUBLTFAjs.Serializable {
5920
5921
  constructor(args) {
5921
5922
  super();
5922
5923
  // Resource account address
5923
- this.accountAddress = _chunkCSUBLTFAjs.AccountAddress.ONE;
5924
+ this.accountAddress = _chunkJMOQXLEDjs.AccountAddress.ONE;
5924
5925
  // Module name, i.e: 0x1::account
5925
5926
  this.moduleName = new MoveString("account");
5926
5927
  // The rotation proof challenge struct name that live under the module
@@ -5957,7 +5958,7 @@ var RotationProofChallenge = class extends _chunkCSUBLTFAjs.Serializable {
5957
5958
  };
5958
5959
 
5959
5960
  // src/transactions/authenticator/transaction.ts
5960
- var TransactionAuthenticator = class extends _chunkCSUBLTFAjs.Serializable {
5961
+ var TransactionAuthenticator = class extends _chunkJMOQXLEDjs.Serializable {
5961
5962
  /**
5962
5963
  * Deserializes a TransactionAuthenticator from the provided deserializer.
5963
5964
  * This function helps in reconstructing the TransactionAuthenticator based on the variant index found in the serialized data.
@@ -6071,7 +6072,7 @@ var TransactionAuthenticatorMultiAgent = class _TransactionAuthenticatorMultiAge
6071
6072
  }
6072
6073
  static load(deserializer) {
6073
6074
  const sender = AccountAuthenticator.deserialize(deserializer);
6074
- const secondary_signer_addresses = deserializer.deserializeVector(_chunkCSUBLTFAjs.AccountAddress);
6075
+ const secondary_signer_addresses = deserializer.deserializeVector(_chunkJMOQXLEDjs.AccountAddress);
6075
6076
  const secondary_signers = deserializer.deserializeVector(AccountAuthenticator);
6076
6077
  return new _TransactionAuthenticatorMultiAgent(sender, secondary_signer_addresses, secondary_signers);
6077
6078
  }
@@ -6094,9 +6095,9 @@ var TransactionAuthenticatorFeePayer = class _TransactionAuthenticatorFeePayer e
6094
6095
  }
6095
6096
  static load(deserializer) {
6096
6097
  const sender = AccountAuthenticator.deserialize(deserializer);
6097
- const secondary_signer_addresses = deserializer.deserializeVector(_chunkCSUBLTFAjs.AccountAddress);
6098
+ const secondary_signer_addresses = deserializer.deserializeVector(_chunkJMOQXLEDjs.AccountAddress);
6098
6099
  const secondary_signers = deserializer.deserializeVector(AccountAuthenticator);
6099
- const address = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
6100
+ const address = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
6100
6101
  const authenticator = AccountAuthenticator.deserialize(deserializer);
6101
6102
  const fee_payer = { address, authenticator };
6102
6103
  return new _TransactionAuthenticatorFeePayer(sender, secondary_signer_addresses, secondary_signers, fee_payer);
@@ -6118,7 +6119,7 @@ var TransactionAuthenticatorSingleSender = class _TransactionAuthenticatorSingle
6118
6119
  };
6119
6120
 
6120
6121
  // src/transactions/instances/signedTransaction.ts
6121
- var SignedTransaction = class _SignedTransaction extends _chunkCSUBLTFAjs.Serializable {
6122
+ var SignedTransaction = class _SignedTransaction extends _chunkJMOQXLEDjs.Serializable {
6122
6123
  /**
6123
6124
  * Represents a signed transaction that includes a raw transaction and an authenticator.
6124
6125
  * The authenticator contains a client's public key and the signature of the raw transaction,
@@ -6165,7 +6166,7 @@ var SignedTransaction = class _SignedTransaction extends _chunkCSUBLTFAjs.Serial
6165
6166
  };
6166
6167
 
6167
6168
  // src/transactions/instances/simpleTransaction.ts
6168
- var SimpleTransaction = class _SimpleTransaction extends _chunkCSUBLTFAjs.Serializable {
6169
+ var SimpleTransaction = class _SimpleTransaction extends _chunkJMOQXLEDjs.Serializable {
6169
6170
  /**
6170
6171
  * SimpleTransaction represents a transaction signed by a single account that
6171
6172
  * can be submitted to the Aptos chain for execution.
@@ -6210,14 +6211,14 @@ var SimpleTransaction = class _SimpleTransaction extends _chunkCSUBLTFAjs.Serial
6210
6211
  const feePayerPresent = deserializer.deserializeBool();
6211
6212
  let feePayerAddress;
6212
6213
  if (feePayerPresent) {
6213
- feePayerAddress = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
6214
+ feePayerAddress = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
6214
6215
  }
6215
6216
  return new _SimpleTransaction(rawTransaction, feePayerAddress);
6216
6217
  }
6217
6218
  };
6218
6219
 
6219
6220
  // src/transactions/instances/multiAgentTransaction.ts
6220
- var MultiAgentTransaction = class _MultiAgentTransaction extends _chunkCSUBLTFAjs.Serializable {
6221
+ var MultiAgentTransaction = class _MultiAgentTransaction extends _chunkJMOQXLEDjs.Serializable {
6221
6222
  /**
6222
6223
  * Represents a MultiAgentTransaction that can be submitted to the Aptos chain for execution.
6223
6224
  * This class encapsulates the raw transaction data, the secondary signer addresses, and an optional fee payer address.
@@ -6263,11 +6264,11 @@ var MultiAgentTransaction = class _MultiAgentTransaction extends _chunkCSUBLTFAj
6263
6264
  */
6264
6265
  static deserialize(deserializer) {
6265
6266
  const rawTransaction = RawTransaction.deserialize(deserializer);
6266
- const secondarySignerAddresses = deserializer.deserializeVector(_chunkCSUBLTFAjs.AccountAddress);
6267
+ const secondarySignerAddresses = deserializer.deserializeVector(_chunkJMOQXLEDjs.AccountAddress);
6267
6268
  const feePayerPresent = deserializer.deserializeBool();
6268
6269
  let feePayerAddress;
6269
6270
  if (feePayerPresent) {
6270
- feePayerAddress = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
6271
+ feePayerAddress = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
6271
6272
  }
6272
6273
  return new _MultiAgentTransaction(rawTransaction, secondarySignerAddresses, feePayerAddress);
6273
6274
  }
@@ -6332,7 +6333,7 @@ var Ed25519Account = class _Ed25519Account {
6332
6333
  const { privateKey, address } = args;
6333
6334
  this.privateKey = privateKey;
6334
6335
  this.publicKey = privateKey.publicKey();
6335
- this.accountAddress = address ? _chunkCSUBLTFAjs.AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();
6336
+ this.accountAddress = address ? _chunkJMOQXLEDjs.AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();
6336
6337
  }
6337
6338
  /**
6338
6339
  * Generates a new Ed25519 account using a randomly generated private key.
@@ -6445,7 +6446,7 @@ var SingleKeyAccount = class _SingleKeyAccount {
6445
6446
  const { privateKey, address } = args;
6446
6447
  this.privateKey = privateKey;
6447
6448
  this.publicKey = new AnyPublicKey(privateKey.publicKey());
6448
- this.accountAddress = address ? _chunkCSUBLTFAjs.AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();
6449
+ this.accountAddress = address ? _chunkJMOQXLEDjs.AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();
6449
6450
  }
6450
6451
  getAnyPublicKey() {
6451
6452
  return this.publicKey;
@@ -6646,7 +6647,7 @@ var Account = class {
6646
6647
  // src/account/EphemeralKeyPair.ts
6647
6648
  var _utils = require('@noble/hashes/utils');
6648
6649
  var TWO_WEEKS_IN_SECONDS = 1209600;
6649
- var _EphemeralKeyPair = class _EphemeralKeyPair extends _chunkCSUBLTFAjs.Serializable {
6650
+ var _EphemeralKeyPair = class _EphemeralKeyPair extends _chunkJMOQXLEDjs.Serializable {
6650
6651
  /**
6651
6652
  * Creates an instance of the class with a specified private key, optional expiry date, and optional blinder.
6652
6653
  * This constructor initializes the public key, sets the expiry date to a default value if not provided,
@@ -6664,8 +6665,8 @@ var _EphemeralKeyPair = class _EphemeralKeyPair extends _chunkCSUBLTFAjs.Seriali
6664
6665
  const { privateKey, expiryDateSecs, blinder } = args;
6665
6666
  this.privateKey = privateKey;
6666
6667
  this.publicKey = new EphemeralPublicKey(privateKey.publicKey());
6667
- this.expiryDateSecs = expiryDateSecs || _chunkCSUBLTFAjs.floorToWholeHour.call(void 0, _chunkCSUBLTFAjs.nowInSeconds.call(void 0, ) + TWO_WEEKS_IN_SECONDS);
6668
- this.blinder = blinder !== void 0 ? _chunkCSUBLTFAjs.Hex.fromHexInput(blinder).toUint8Array() : generateBlinder();
6668
+ this.expiryDateSecs = expiryDateSecs || _chunkJMOQXLEDjs.floorToWholeHour.call(void 0, _chunkJMOQXLEDjs.nowInSeconds.call(void 0, ) + TWO_WEEKS_IN_SECONDS);
6669
+ this.blinder = blinder !== void 0 ? _chunkJMOQXLEDjs.Hex.fromHexInput(blinder).toUint8Array() : generateBlinder();
6669
6670
  const fields = padAndPackBytesWithLen(this.publicKey.bcsToBytes(), 93);
6670
6671
  fields.push(BigInt(this.expiryDateSecs));
6671
6672
  fields.push(bytesToBigIntLE(this.blinder));
@@ -6787,7 +6788,7 @@ var _eventemitter3 = require('eventemitter3'); var _eventemitter32 = _interopReq
6787
6788
  function isKeylessSigner(obj) {
6788
6789
  return obj !== null && obj !== void 0 && typeof obj.checkKeylessAccountValidity === "function";
6789
6790
  }
6790
- var _AbstractKeylessAccount = class _AbstractKeylessAccount extends _chunkCSUBLTFAjs.Serializable {
6791
+ var _AbstractKeylessAccount = class _AbstractKeylessAccount extends _chunkJMOQXLEDjs.Serializable {
6791
6792
  /**
6792
6793
  * Use the static generator `create(...)` instead.
6793
6794
  * Creates an instance of the KeylessAccount with an optional proof.
@@ -6830,7 +6831,7 @@ var _AbstractKeylessAccount = class _AbstractKeylessAccount extends _chunkCSUBLT
6830
6831
  } = args;
6831
6832
  this.ephemeralKeyPair = ephemeralKeyPair;
6832
6833
  this.publicKey = publicKey;
6833
- this.accountAddress = address ? _chunkCSUBLTFAjs.AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();
6834
+ this.accountAddress = address ? _chunkJMOQXLEDjs.AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();
6834
6835
  this.uidKey = uidKey;
6835
6836
  this.uidVal = uidVal;
6836
6837
  this.aud = aud;
@@ -6849,16 +6850,16 @@ var _AbstractKeylessAccount = class _AbstractKeylessAccount extends _chunkCSUBLT
6849
6850
  });
6850
6851
  this.init(proof);
6851
6852
  }
6852
- const pepperBytes = _chunkCSUBLTFAjs.Hex.fromHexInput(pepper).toUint8Array();
6853
+ const pepperBytes = _chunkJMOQXLEDjs.Hex.fromHexInput(pepper).toUint8Array();
6853
6854
  if (pepperBytes.length !== _AbstractKeylessAccount.PEPPER_LENGTH) {
6854
6855
  throw new Error(`Pepper length in bytes should be ${_AbstractKeylessAccount.PEPPER_LENGTH}`);
6855
6856
  }
6856
6857
  this.pepper = pepperBytes;
6857
6858
  if (verificationKeyHash !== void 0) {
6858
- if (_chunkCSUBLTFAjs.Hex.hexInputToUint8Array(verificationKeyHash).length !== 32) {
6859
+ if (_chunkJMOQXLEDjs.Hex.hexInputToUint8Array(verificationKeyHash).length !== 32) {
6859
6860
  throw new Error("verificationKeyHash must be 32 bytes");
6860
6861
  }
6861
- this.verificationKeyHash = _chunkCSUBLTFAjs.Hex.hexInputToUint8Array(verificationKeyHash);
6862
+ this.verificationKeyHash = _chunkJMOQXLEDjs.Hex.hexInputToUint8Array(verificationKeyHash);
6862
6863
  }
6863
6864
  }
6864
6865
  getAnyPublicKey() {
@@ -6901,7 +6902,7 @@ var _AbstractKeylessAccount = class _AbstractKeylessAccount extends _chunkCSUBLT
6901
6902
  serializer.serializeOption(this.verificationKeyHash, 32);
6902
6903
  }
6903
6904
  static partialDeserialize(deserializer) {
6904
- const address = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
6905
+ const address = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
6905
6906
  const jwt = deserializer.deserializeStr();
6906
6907
  const uidKey = deserializer.deserializeStr();
6907
6908
  const pepper = deserializer.deserializeFixedBytes(31);
@@ -6980,7 +6981,7 @@ var _AbstractKeylessAccount = class _AbstractKeylessAccount extends _chunkCSUBLT
6980
6981
  }
6981
6982
  if (this.verificationKeyHash !== void 0) {
6982
6983
  const { verificationKey } = await getKeylessConfig({ aptosConfig });
6983
- if (_chunkCSUBLTFAjs.Hex.hexInputToString(verificationKey.hash()) !== _chunkCSUBLTFAjs.Hex.hexInputToString(this.verificationKeyHash)) {
6984
+ if (_chunkJMOQXLEDjs.Hex.hexInputToString(verificationKey.hash()) !== _chunkJMOQXLEDjs.Hex.hexInputToString(this.verificationKeyHash)) {
6984
6985
  throw KeylessError.fromErrorType({
6985
6986
  type: 4 /* INVALID_PROOF_VERIFICATION_KEY_NOT_FOUND */
6986
6987
  });
@@ -7015,7 +7016,7 @@ var _AbstractKeylessAccount = class _AbstractKeylessAccount extends _chunkCSUBLT
7015
7016
  const ephemeralPublicKey = this.ephemeralKeyPair.getPublicKey();
7016
7017
  const ephemeralSignature = this.ephemeralKeyPair.sign(message);
7017
7018
  return new KeylessSignature({
7018
- jwtHeader: _chunkCSUBLTFAjs.base64UrlDecode.call(void 0, this.jwt.split(".")[0]),
7019
+ jwtHeader: _chunkJMOQXLEDjs.base64UrlDecode.call(void 0, this.jwt.split(".")[0]),
7019
7020
  ephemeralCertificate: new EphemeralCertificate(this.proof, 0 /* ZkProof */),
7020
7021
  expiryDateSecs,
7021
7022
  ephemeralPublicKey,
@@ -7107,7 +7108,7 @@ var _AbstractKeylessAccount = class _AbstractKeylessAccount extends _chunkCSUBLT
7107
7108
  };
7108
7109
  _AbstractKeylessAccount.PEPPER_LENGTH = 31;
7109
7110
  var AbstractKeylessAccount = _AbstractKeylessAccount;
7110
- var TransactionAndProof = class extends _chunkCSUBLTFAjs.Serializable {
7111
+ var TransactionAndProof = class extends _chunkJMOQXLEDjs.Serializable {
7111
7112
  constructor(transaction, proof) {
7112
7113
  super();
7113
7114
  /**
@@ -7211,7 +7212,7 @@ var KeylessAccount = class _KeylessAccount extends AbstractKeylessAccount {
7211
7212
  * @returns
7212
7213
  */
7213
7214
  static fromBytes(bytes) {
7214
- return _KeylessAccount.deserialize(new Deserializer(_chunkCSUBLTFAjs.Hex.hexInputToUint8Array(bytes)));
7215
+ return _KeylessAccount.deserialize(new Deserializer(_chunkJMOQXLEDjs.Hex.hexInputToUint8Array(bytes)));
7215
7216
  }
7216
7217
  /**
7217
7218
  * Creates a KeylessAccount instance using the provided parameters.
@@ -7289,7 +7290,7 @@ var FederatedKeylessAccount = class _FederatedKeylessAccount extends AbstractKey
7289
7290
  */
7290
7291
  static deserialize(deserializer) {
7291
7292
  const { address, proof, ephemeralKeyPair, jwt, uidKey, pepper, verificationKeyHash } = AbstractKeylessAccount.partialDeserialize(deserializer);
7292
- const jwkAddress = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
7293
+ const jwkAddress = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
7293
7294
  const { iss, aud, uidVal } = getIssAudAndUidVal({ jwt, uidKey });
7294
7295
  return new _FederatedKeylessAccount({
7295
7296
  address,
@@ -7350,7 +7351,7 @@ var FederatedKeylessAccount = class _FederatedKeylessAccount extends AbstractKey
7350
7351
  uidVal,
7351
7352
  aud,
7352
7353
  pepper,
7353
- jwkAddress: _chunkCSUBLTFAjs.AccountAddress.from(jwkAddress),
7354
+ jwkAddress: _chunkJMOQXLEDjs.AccountAddress.from(jwkAddress),
7354
7355
  jwt,
7355
7356
  proofFetchCallback,
7356
7357
  verificationKeyHash: verificationKey ? verificationKey.hash() : void 0
@@ -7393,7 +7394,7 @@ var MultiKeyAccount = class _MultiKeyAccount {
7393
7394
  );
7394
7395
  }
7395
7396
  this.publicKey = multiKey;
7396
- this.accountAddress = address ? _chunkCSUBLTFAjs.AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();
7397
+ this.accountAddress = address ? _chunkJMOQXLEDjs.AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();
7397
7398
  const bitPositions = [];
7398
7399
  for (const signer of signers) {
7399
7400
  bitPositions.push(this.publicKey.getIndex(signer.getAnyPublicKey()));
@@ -7416,9 +7417,9 @@ var MultiKeyAccount = class _MultiKeyAccount {
7416
7417
  * @category Account (On-Chain Model)
7417
7418
  */
7418
7419
  static fromPublicKeysAndSigners(args) {
7419
- const { publicKeys, signaturesRequired, signers } = args;
7420
+ const { address, publicKeys, signaturesRequired, signers } = args;
7420
7421
  const multiKey = new MultiKey({ publicKeys, signaturesRequired });
7421
- return new _MultiKeyAccount({ multiKey, signers });
7422
+ return new _MultiKeyAccount({ multiKey, signers, address });
7422
7423
  }
7423
7424
  /**
7424
7425
  * Determines if the provided account is a multi-key account.
@@ -7548,7 +7549,7 @@ var MultiEd25519Account = class {
7548
7549
  this.signingScheme = 1 /* MultiEd25519 */;
7549
7550
  const { signers, publicKey, address } = args;
7550
7551
  this.publicKey = publicKey;
7551
- this.accountAddress = address ? _chunkCSUBLTFAjs.AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();
7552
+ this.accountAddress = address ? _chunkJMOQXLEDjs.AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();
7552
7553
  if (publicKey.threshold > signers.length) {
7553
7554
  throw new Error(
7554
7555
  // eslint-disable-next-line max-len
@@ -7627,10 +7628,10 @@ var MultiEd25519Account = class {
7627
7628
  // src/account/utils.ts
7628
7629
  function deserializeSchemeAndAddress(deserializer) {
7629
7630
  const signingScheme = deserializer.deserializeUleb128AsU32();
7630
- if (!Object.values(_chunkCSUBLTFAjs.SigningScheme).includes(signingScheme)) {
7631
+ if (!Object.values(_chunkJMOQXLEDjs.SigningScheme).includes(signingScheme)) {
7631
7632
  throw new Error(`Deserialization of Account failed: SigningScheme variant ${signingScheme} is invalid`);
7632
7633
  }
7633
- const address = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
7634
+ const address = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
7634
7635
  return { address, signingScheme };
7635
7636
  }
7636
7637
 
@@ -7658,7 +7659,7 @@ function deserializeKeylessAccountCommon(deserializer) {
7658
7659
  var AccountUtils;
7659
7660
  ((AccountUtils2) => {
7660
7661
  function toBytes(account) {
7661
- const serializer = new (0, _chunkCSUBLTFAjs.Serializer)();
7662
+ const serializer = new (0, _chunkJMOQXLEDjs.Serializer)();
7662
7663
  serializer.serializeU32AsUleb128(account.signingScheme);
7663
7664
  account.accountAddress.serialize(serializer);
7664
7665
  switch (account.signingScheme) {
@@ -7710,11 +7711,11 @@ var AccountUtils;
7710
7711
  }
7711
7712
  AccountUtils2.toBytes = toBytes;
7712
7713
  function toHexStringWithoutPrefix(account) {
7713
- return _chunkCSUBLTFAjs.Hex.hexInputToStringWithoutPrefix(toBytes(account));
7714
+ return _chunkJMOQXLEDjs.Hex.hexInputToStringWithoutPrefix(toBytes(account));
7714
7715
  }
7715
7716
  AccountUtils2.toHexStringWithoutPrefix = toHexStringWithoutPrefix;
7716
7717
  function toHexString(account) {
7717
- return _chunkCSUBLTFAjs.Hex.hexInputToString(toBytes(account));
7718
+ return _chunkJMOQXLEDjs.Hex.hexInputToString(toBytes(account));
7718
7719
  }
7719
7720
  AccountUtils2.toHexString = toHexString;
7720
7721
  function deserialize(deserializer) {
@@ -7742,7 +7743,7 @@ var AccountUtils;
7742
7743
  }
7743
7744
  case 4 /* FederatedKeyless */: {
7744
7745
  const keylessComponents = deserializeKeylessAccountCommon(deserializer);
7745
- const jwkAddress = _chunkCSUBLTFAjs.AccountAddress.deserialize(deserializer);
7746
+ const jwkAddress = _chunkJMOQXLEDjs.AccountAddress.deserialize(deserializer);
7746
7747
  const audless = deserializer.deserializeBool();
7747
7748
  const jwtClaims = getIssAudAndUidVal(keylessComponents);
7748
7749
  return new FederatedKeylessAccount({ ...keylessComponents, ...jwtClaims, jwkAddress, audless });
@@ -7828,7 +7829,7 @@ var AccountUtils;
7828
7829
  var AbstractSignature = class _AbstractSignature extends Signature {
7829
7830
  constructor(value) {
7830
7831
  super();
7831
- this.value = _chunkCSUBLTFAjs.Hex.fromHexInput(value);
7832
+ this.value = _chunkJMOQXLEDjs.Hex.fromHexInput(value);
7832
7833
  }
7833
7834
  serialize(serializer) {
7834
7835
  serializer.serializeBytes(this.value.toUint8Array());
@@ -7860,7 +7861,7 @@ var AbstractedAccount = class _AbstractedAccount extends Account {
7860
7861
  constructor({ signer, accountAddress, authenticationFunction }) {
7861
7862
  super();
7862
7863
  this.signingScheme = 2 /* SingleKey */;
7863
- if (!_chunkCSUBLTFAjs.isValidFunctionInfo.call(void 0, authenticationFunction)) {
7864
+ if (!_chunkJMOQXLEDjs.isValidFunctionInfo.call(void 0, authenticationFunction)) {
7864
7865
  throw new Error(`Invalid authentication function ${authenticationFunction} passed into AbstractedAccount`);
7865
7866
  }
7866
7867
  this.authenticationFunction = authenticationFunction;
@@ -7881,7 +7882,7 @@ var AbstractedAccount = class _AbstractedAccount extends Account {
7881
7882
  }) {
7882
7883
  return new _AbstractedAccount({
7883
7884
  signer: (digest) => {
7884
- const serializer = new (0, _chunkCSUBLTFAjs.Serializer)();
7885
+ const serializer = new (0, _chunkJMOQXLEDjs.Serializer)();
7885
7886
  signer.publicKey.serialize(serializer);
7886
7887
  signer.sign(digest).serialize(serializer);
7887
7888
  return serializer.toUint8Array();
@@ -8534,6 +8535,51 @@ async function getProcessorStatus(args) {
8534
8535
  return data.processor_status[0];
8535
8536
  }
8536
8537
 
8538
+ // src/internal/utils/utils.ts
8539
+ async function getModules(args) {
8540
+ const { aptosConfig, accountAddress, options } = args;
8541
+ return paginateWithObfuscatedCursor({
8542
+ aptosConfig,
8543
+ originMethod: "getModules",
8544
+ path: `accounts/${_chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toString()}/modules`,
8545
+ params: {
8546
+ ledger_version: _optionalChain([options, 'optionalAccess', _63 => _63.ledgerVersion]),
8547
+ offset: _optionalChain([options, 'optionalAccess', _64 => _64.offset]),
8548
+ limit: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _65 => _65.limit]), () => ( 1e3))
8549
+ }
8550
+ });
8551
+ }
8552
+ async function getInfo(args) {
8553
+ const { aptosConfig, accountAddress } = args;
8554
+ const { data } = await getAptosFullNode({
8555
+ aptosConfig,
8556
+ originMethod: "getInfo",
8557
+ path: `accounts/${_chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toString()}`
8558
+ });
8559
+ return data;
8560
+ }
8561
+ async function getModule(args) {
8562
+ if (_optionalChain([args, 'access', _66 => _66.options, 'optionalAccess', _67 => _67.ledgerVersion]) !== void 0) {
8563
+ return getModuleInner(args);
8564
+ }
8565
+ return memoizeAsync(
8566
+ async () => getModuleInner(args),
8567
+ `module-${args.accountAddress}-${args.moduleName}`,
8568
+ 1e3 * 60 * 5
8569
+ // 5 minutes
8570
+ )();
8571
+ }
8572
+ async function getModuleInner(args) {
8573
+ const { aptosConfig, accountAddress, moduleName, options } = args;
8574
+ const { data } = await getAptosFullNode({
8575
+ aptosConfig,
8576
+ originMethod: "getModule",
8577
+ path: `accounts/${_chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toString()}/module/${moduleName}`,
8578
+ params: { ledger_version: _optionalChain([options, 'optionalAccess', _68 => _68.ledgerVersion]) }
8579
+ });
8580
+ return data;
8581
+ }
8582
+
8537
8583
  // src/internal/table.ts
8538
8584
  async function getTableItem(args) {
8539
8585
  const { aptosConfig, handle, data, options } = args;
@@ -8541,7 +8587,7 @@ async function getTableItem(args) {
8541
8587
  aptosConfig,
8542
8588
  originMethod: "getTableItem",
8543
8589
  path: `tables/${handle}/item`,
8544
- params: { ledger_version: _optionalChain([options, 'optionalAccess', _63 => _63.ledgerVersion]) },
8590
+ params: { ledger_version: _optionalChain([options, 'optionalAccess', _69 => _69.ledgerVersion]) },
8545
8591
  body: data
8546
8592
  });
8547
8593
  return response.data;
@@ -8551,10 +8597,10 @@ async function getTableItemsData(args) {
8551
8597
  const graphqlQuery = {
8552
8598
  query: GetTableItemsData,
8553
8599
  variables: {
8554
- where_condition: _optionalChain([options, 'optionalAccess', _64 => _64.where]),
8555
- offset: _optionalChain([options, 'optionalAccess', _65 => _65.offset]),
8556
- limit: _optionalChain([options, 'optionalAccess', _66 => _66.limit]),
8557
- order_by: _optionalChain([options, 'optionalAccess', _67 => _67.orderBy])
8600
+ where_condition: _optionalChain([options, 'optionalAccess', _70 => _70.where]),
8601
+ offset: _optionalChain([options, 'optionalAccess', _71 => _71.offset]),
8602
+ limit: _optionalChain([options, 'optionalAccess', _72 => _72.limit]),
8603
+ order_by: _optionalChain([options, 'optionalAccess', _73 => _73.orderBy])
8558
8604
  }
8559
8605
  };
8560
8606
  const data = await queryIndexer({
@@ -8569,10 +8615,10 @@ async function getTableItemsMetadata(args) {
8569
8615
  const graphqlQuery = {
8570
8616
  query: GetTableItemsMetadata,
8571
8617
  variables: {
8572
- where_condition: _optionalChain([options, 'optionalAccess', _68 => _68.where]),
8573
- offset: _optionalChain([options, 'optionalAccess', _69 => _69.offset]),
8574
- limit: _optionalChain([options, 'optionalAccess', _70 => _70.limit]),
8575
- order_by: _optionalChain([options, 'optionalAccess', _71 => _71.orderBy])
8618
+ where_condition: _optionalChain([options, 'optionalAccess', _74 => _74.where]),
8619
+ offset: _optionalChain([options, 'optionalAccess', _75 => _75.offset]),
8620
+ limit: _optionalChain([options, 'optionalAccess', _76 => _76.limit]),
8621
+ order_by: _optionalChain([options, 'optionalAccess', _77 => _77.orderBy])
8576
8622
  }
8577
8623
  };
8578
8624
  const data = await queryIndexer({
@@ -8590,7 +8636,7 @@ async function getTransactions(args) {
8590
8636
  aptosConfig,
8591
8637
  originMethod: "getTransactions",
8592
8638
  path: "transactions",
8593
- params: { start: _optionalChain([options, 'optionalAccess', _72 => _72.offset]), limit: _optionalChain([options, 'optionalAccess', _73 => _73.limit]) }
8639
+ params: { start: _optionalChain([options, 'optionalAccess', _78 => _78.offset]), limit: _optionalChain([options, 'optionalAccess', _79 => _79.limit]) }
8594
8640
  });
8595
8641
  }
8596
8642
  async function getGasPriceEstimation(args) {
@@ -8633,7 +8679,7 @@ async function isTransactionPending(args) {
8633
8679
  const transaction = await getTransactionByHash({ aptosConfig, transactionHash });
8634
8680
  return transaction.type === "pending_transaction" /* Pending */;
8635
8681
  } catch (e) {
8636
- if (_optionalChain([e, 'optionalAccess', _74 => _74.status]) === 404) {
8682
+ if (_optionalChain([e, 'optionalAccess', _80 => _80.status]) === 404) {
8637
8683
  return true;
8638
8684
  }
8639
8685
  throw e;
@@ -8650,8 +8696,8 @@ async function longWaitForTransaction(args) {
8650
8696
  }
8651
8697
  async function waitForTransaction(args) {
8652
8698
  const { aptosConfig, transactionHash, options } = args;
8653
- const timeoutSecs = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _75 => _75.timeoutSecs]), () => ( DEFAULT_TXN_TIMEOUT_SEC));
8654
- const checkSuccess = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _76 => _76.checkSuccess]), () => ( true));
8699
+ const timeoutSecs = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _81 => _81.timeoutSecs]), () => ( DEFAULT_TXN_TIMEOUT_SEC));
8700
+ const checkSuccess = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _82 => _82.checkSuccess]), () => ( true));
8655
8701
  let isPending = true;
8656
8702
  let timeElapsed = 0;
8657
8703
  let lastTxn;
@@ -8698,7 +8744,7 @@ async function waitForTransaction(args) {
8698
8744
  } catch (e) {
8699
8745
  handleAPIError(e);
8700
8746
  }
8701
- await _chunkCSUBLTFAjs.sleep.call(void 0, backoffIntervalMs);
8747
+ await _chunkJMOQXLEDjs.sleep.call(void 0, backoffIntervalMs);
8702
8748
  timeElapsed += backoffIntervalMs / 1e3;
8703
8749
  backoffIntervalMs *= backoffMultiplier;
8704
8750
  }
@@ -8748,7 +8794,7 @@ async function waitForIndexer(args) {
8748
8794
  if (indexerVersion >= minimumLedgerVersion) {
8749
8795
  break;
8750
8796
  }
8751
- await _chunkCSUBLTFAjs.sleep.call(void 0, 200);
8797
+ await _chunkJMOQXLEDjs.sleep.call(void 0, 200);
8752
8798
  }
8753
8799
  }
8754
8800
  var WaitForTransactionError = class extends Error {
@@ -8776,7 +8822,7 @@ async function getBlockByVersion(args) {
8776
8822
  aptosConfig,
8777
8823
  originMethod: "getBlockByVersion",
8778
8824
  path: `blocks/by_version/${ledgerVersion}`,
8779
- params: { with_transactions: _optionalChain([options, 'optionalAccess', _77 => _77.withTransactions]) }
8825
+ params: { with_transactions: _optionalChain([options, 'optionalAccess', _83 => _83.withTransactions]) }
8780
8826
  });
8781
8827
  return fillBlockTransactions({ block, ...args });
8782
8828
  }
@@ -8786,18 +8832,18 @@ async function getBlockByHeight(args) {
8786
8832
  aptosConfig,
8787
8833
  originMethod: "getBlockByHeight",
8788
8834
  path: `blocks/by_height/${blockHeight}`,
8789
- params: { with_transactions: _optionalChain([options, 'optionalAccess', _78 => _78.withTransactions]) }
8835
+ params: { with_transactions: _optionalChain([options, 'optionalAccess', _84 => _84.withTransactions]) }
8790
8836
  });
8791
8837
  return fillBlockTransactions({ block, ...args });
8792
8838
  }
8793
8839
  async function fillBlockTransactions(args) {
8794
8840
  const { aptosConfig, block, options } = args;
8795
- if (_optionalChain([options, 'optionalAccess', _79 => _79.withTransactions])) {
8841
+ if (_optionalChain([options, 'optionalAccess', _85 => _85.withTransactions])) {
8796
8842
  block.transactions = _nullishCoalesce(block.transactions, () => ( []));
8797
8843
  const lastTxn = block.transactions[block.transactions.length - 1];
8798
8844
  const firstVersion = BigInt(block.first_version);
8799
8845
  const lastVersion = BigInt(block.last_version);
8800
- const curVersion = _optionalChain([lastTxn, 'optionalAccess', _80 => _80.version]);
8846
+ const curVersion = _optionalChain([lastTxn, 'optionalAccess', _86 => _86.version]);
8801
8847
  let latestVersion;
8802
8848
  if (curVersion === void 0) {
8803
8849
  latestVersion = firstVersion - 1n;
@@ -8828,813 +8874,81 @@ async function fillBlockTransactions(args) {
8828
8874
  return block;
8829
8875
  }
8830
8876
 
8831
- // src/internal/account.ts
8832
- async function getInfo(args) {
8833
- const { aptosConfig, accountAddress } = args;
8834
- const { data } = await getAptosFullNode({
8835
- aptosConfig,
8836
- originMethod: "getInfo",
8837
- path: `accounts/${_chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toString()}`
8838
- });
8839
- return data;
8840
- }
8841
- async function getModules(args) {
8842
- const { aptosConfig, accountAddress, options } = args;
8843
- return paginateWithObfuscatedCursor({
8844
- aptosConfig,
8845
- originMethod: "getModules",
8846
- path: `accounts/${_chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toString()}/modules`,
8847
- params: {
8848
- ledger_version: _optionalChain([options, 'optionalAccess', _81 => _81.ledgerVersion]),
8849
- offset: _optionalChain([options, 'optionalAccess', _82 => _82.offset]),
8850
- limit: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _83 => _83.limit]), () => ( 1e3))
8851
- }
8852
- });
8853
- }
8854
- async function getModule(args) {
8855
- if (_optionalChain([args, 'access', _84 => _84.options, 'optionalAccess', _85 => _85.ledgerVersion]) !== void 0) {
8856
- return getModuleInner(args);
8857
- }
8858
- return memoizeAsync(
8859
- async () => getModuleInner(args),
8860
- `module-${args.accountAddress}-${args.moduleName}`,
8861
- 1e3 * 60 * 5
8862
- // 5 minutes
8863
- )();
8864
- }
8865
- async function getModuleInner(args) {
8866
- const { aptosConfig, accountAddress, moduleName, options } = args;
8867
- const { data } = await getAptosFullNode({
8868
- aptosConfig,
8869
- originMethod: "getModule",
8870
- path: `accounts/${_chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toString()}/module/${moduleName}`,
8871
- params: { ledger_version: _optionalChain([options, 'optionalAccess', _86 => _86.ledgerVersion]) }
8872
- });
8873
- return data;
8877
+ // src/transactions/transactionBuilder/transactionBuilder.ts
8878
+
8879
+
8880
+ // src/transactions/typeTag/parser.ts
8881
+ function isValidIdentifier(str) {
8882
+ return !!str.match(/^[_a-zA-Z0-9]+$/);
8874
8883
  }
8875
- async function getTransactions2(args) {
8876
- const { aptosConfig, accountAddress, options } = args;
8877
- return paginateWithCursor({
8878
- aptosConfig,
8879
- originMethod: "getTransactions",
8880
- path: `accounts/${_chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toString()}/transactions`,
8881
- params: { start: _optionalChain([options, 'optionalAccess', _87 => _87.offset]), limit: _optionalChain([options, 'optionalAccess', _88 => _88.limit]) }
8882
- });
8884
+ function isValidWhitespaceCharacter(char) {
8885
+ return !!char.match(/\s/);
8883
8886
  }
8884
- async function getResources(args) {
8885
- const { aptosConfig, accountAddress, options } = args;
8886
- return paginateWithObfuscatedCursor({
8887
- aptosConfig,
8888
- originMethod: "getResources",
8889
- path: `accounts/${_chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toString()}/resources`,
8890
- params: {
8891
- ledger_version: _optionalChain([options, 'optionalAccess', _89 => _89.ledgerVersion]),
8892
- offset: _optionalChain([options, 'optionalAccess', _90 => _90.offset]),
8893
- limit: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _91 => _91.limit]), () => ( 999))
8894
- }
8895
- });
8887
+ function isGeneric(str) {
8888
+ return !!str.match(/^T[0-9]+$/);
8896
8889
  }
8897
- async function getResource(args) {
8898
- const { aptosConfig, accountAddress, resourceType, options } = args;
8899
- const { data } = await getAptosFullNode({
8900
- aptosConfig,
8901
- originMethod: "getResource",
8902
- path: `accounts/${_chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toString()}/resource/${resourceType}`,
8903
- params: { ledger_version: _optionalChain([options, 'optionalAccess', _92 => _92.ledgerVersion]) }
8904
- });
8905
- return data.data;
8890
+ function isRef(str) {
8891
+ return !!str.match(/^&.+$/);
8906
8892
  }
8907
- async function lookupOriginalAccountAddress(args) {
8908
- const { aptosConfig, authenticationKey, options } = args;
8909
- const resource = await getResource({
8910
- aptosConfig,
8911
- accountAddress: "0x1",
8912
- resourceType: "0x1::account::OriginatingAddress",
8913
- options
8914
- });
8915
- const {
8916
- address_map: { handle }
8917
- } = resource;
8918
- const authKeyAddress = _chunkCSUBLTFAjs.AccountAddress.from(authenticationKey);
8919
- try {
8920
- const originalAddress = await getTableItem({
8921
- aptosConfig,
8922
- handle,
8923
- data: {
8924
- key: authKeyAddress.toString(),
8925
- key_type: "address",
8926
- value_type: "address"
8927
- },
8928
- options
8929
- });
8930
- return _chunkCSUBLTFAjs.AccountAddress.from(originalAddress);
8931
- } catch (err) {
8932
- if (err instanceof AptosApiError && err.data.error_code === "table_item_not_found") {
8933
- return authKeyAddress;
8934
- }
8935
- throw err;
8893
+ function isPrimitive(str) {
8894
+ switch (str) {
8895
+ case "signer":
8896
+ case "address":
8897
+ case "bool":
8898
+ case "u8":
8899
+ case "u16":
8900
+ case "u32":
8901
+ case "u64":
8902
+ case "u128":
8903
+ case "u256":
8904
+ return true;
8905
+ default:
8906
+ return false;
8936
8907
  }
8937
8908
  }
8938
- async function getAccountTokensCount(args) {
8939
- const { aptosConfig, accountAddress } = args;
8940
- const address = _chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toStringLong();
8941
- const whereCondition = {
8942
- owner_address: { _eq: address },
8943
- amount: { _gt: 0 }
8944
- };
8945
- const graphqlQuery = {
8946
- query: GetAccountTokensCount,
8947
- variables: { where_condition: whereCondition }
8948
- };
8949
- const data = await queryIndexer({
8950
- aptosConfig,
8951
- query: graphqlQuery,
8952
- originMethod: "getAccountTokensCount"
8953
- });
8954
- return data.current_token_ownerships_v2_aggregate.aggregate ? data.current_token_ownerships_v2_aggregate.aggregate.count : 0;
8955
- }
8956
- async function getAccountOwnedTokens(args) {
8957
- const { aptosConfig, accountAddress, options } = args;
8958
- const address = _chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toStringLong();
8959
- const whereCondition = {
8960
- owner_address: { _eq: address },
8961
- amount: { _gt: 0 }
8962
- };
8963
- if (_optionalChain([options, 'optionalAccess', _93 => _93.tokenStandard])) {
8964
- whereCondition.token_standard = { _eq: _optionalChain([options, 'optionalAccess', _94 => _94.tokenStandard]) };
8965
- }
8966
- const graphqlQuery = {
8967
- query: GetAccountOwnedTokens,
8968
- variables: {
8969
- where_condition: whereCondition,
8970
- offset: _optionalChain([options, 'optionalAccess', _95 => _95.offset]),
8971
- limit: _optionalChain([options, 'optionalAccess', _96 => _96.limit]),
8972
- order_by: _optionalChain([options, 'optionalAccess', _97 => _97.orderBy])
8909
+ function consumeWhitespace(tagStr, pos) {
8910
+ let i = pos;
8911
+ for (; i < tagStr.length; i += 1) {
8912
+ const innerChar = tagStr[i];
8913
+ if (!isValidWhitespaceCharacter(innerChar)) {
8914
+ break;
8973
8915
  }
8974
- };
8975
- const data = await queryIndexer({
8976
- aptosConfig,
8977
- query: graphqlQuery,
8978
- originMethod: "getAccountOwnedTokens"
8979
- });
8980
- return data.current_token_ownerships_v2;
8981
- }
8982
- async function getAccountOwnedTokensFromCollectionAddress(args) {
8983
- const { aptosConfig, accountAddress, collectionAddress, options } = args;
8984
- const ownerAddress = _chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toStringLong();
8985
- const collAddress = _chunkCSUBLTFAjs.AccountAddress.from(collectionAddress).toStringLong();
8986
- const whereCondition = {
8987
- owner_address: { _eq: ownerAddress },
8988
- current_token_data: { collection_id: { _eq: collAddress } },
8989
- amount: { _gt: 0 }
8990
- };
8991
- if (_optionalChain([options, 'optionalAccess', _98 => _98.tokenStandard])) {
8992
- whereCondition.token_standard = { _eq: _optionalChain([options, 'optionalAccess', _99 => _99.tokenStandard]) };
8993
8916
  }
8994
- const graphqlQuery = {
8995
- query: GetAccountOwnedTokensFromCollection,
8996
- variables: {
8997
- where_condition: whereCondition,
8998
- offset: _optionalChain([options, 'optionalAccess', _100 => _100.offset]),
8999
- limit: _optionalChain([options, 'optionalAccess', _101 => _101.limit]),
9000
- order_by: _optionalChain([options, 'optionalAccess', _102 => _102.orderBy])
9001
- }
9002
- };
9003
- const data = await queryIndexer({
9004
- aptosConfig,
9005
- query: graphqlQuery,
9006
- originMethod: "getAccountOwnedTokensFromCollectionAddress"
9007
- });
9008
- return data.current_token_ownerships_v2;
8917
+ return i;
9009
8918
  }
9010
- async function getAccountCollectionsWithOwnedTokens(args) {
9011
- const { aptosConfig, accountAddress, options } = args;
9012
- const address = _chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toStringLong();
9013
- const whereCondition = {
9014
- owner_address: { _eq: address }
9015
- };
9016
- if (_optionalChain([options, 'optionalAccess', _103 => _103.tokenStandard])) {
9017
- whereCondition.current_collection = {
9018
- token_standard: { _eq: _optionalChain([options, 'optionalAccess', _104 => _104.tokenStandard]) }
9019
- };
9020
- }
9021
- const graphqlQuery = {
9022
- query: GetAccountCollectionsWithOwnedTokens,
9023
- variables: {
9024
- where_condition: whereCondition,
9025
- offset: _optionalChain([options, 'optionalAccess', _105 => _105.offset]),
9026
- limit: _optionalChain([options, 'optionalAccess', _106 => _106.limit]),
9027
- order_by: _optionalChain([options, 'optionalAccess', _107 => _107.orderBy])
9028
- }
9029
- };
9030
- const data = await queryIndexer({
9031
- aptosConfig,
9032
- query: graphqlQuery,
9033
- originMethod: "getAccountCollectionsWithOwnedTokens"
9034
- });
9035
- return data.current_collection_ownership_v2_view;
9036
- }
9037
- async function getAccountTransactionsCount(args) {
9038
- const { aptosConfig, accountAddress } = args;
9039
- const address = _chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toStringLong();
9040
- const graphqlQuery = {
9041
- query: GetAccountTransactionsCount,
9042
- variables: { address }
9043
- };
9044
- const data = await queryIndexer({
9045
- aptosConfig,
9046
- query: graphqlQuery,
9047
- originMethod: "getAccountTransactionsCount"
9048
- });
9049
- return data.account_transactions_aggregate.aggregate ? data.account_transactions_aggregate.aggregate.count : 0;
9050
- }
9051
- async function getAccountCoinsData(args) {
9052
- const { aptosConfig, accountAddress, options } = args;
9053
- const address = _chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toStringLong();
9054
- const whereCondition = {
9055
- ..._optionalChain([options, 'optionalAccess', _108 => _108.where]),
9056
- owner_address: { _eq: address }
9057
- };
9058
- const graphqlQuery = {
9059
- query: GetAccountCoinsData,
9060
- variables: {
9061
- where_condition: whereCondition,
9062
- offset: _optionalChain([options, 'optionalAccess', _109 => _109.offset]),
9063
- limit: _optionalChain([options, 'optionalAccess', _110 => _110.limit]),
9064
- order_by: _optionalChain([options, 'optionalAccess', _111 => _111.orderBy])
9065
- }
9066
- };
9067
- const data = await queryIndexer({
9068
- aptosConfig,
9069
- query: graphqlQuery,
9070
- originMethod: "getAccountCoinsData"
9071
- });
9072
- return data.current_fungible_asset_balances;
9073
- }
9074
- async function getAccountCoinsCount(args) {
9075
- const { aptosConfig, accountAddress } = args;
9076
- const address = _chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toStringLong();
9077
- const graphqlQuery = {
9078
- query: GetAccountCoinsCount,
9079
- variables: { address }
9080
- };
9081
- const data = await queryIndexer({
9082
- aptosConfig,
9083
- query: graphqlQuery,
9084
- originMethod: "getAccountCoinsCount"
9085
- });
9086
- if (!data.current_fungible_asset_balances_aggregate.aggregate) {
9087
- throw Error("Failed to get the count of account coins");
9088
- }
9089
- return data.current_fungible_asset_balances_aggregate.aggregate.count;
9090
- }
9091
- async function getAccountOwnedObjects(args) {
9092
- const { aptosConfig, accountAddress, options } = args;
9093
- const address = _chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toStringLong();
9094
- const whereCondition = {
9095
- owner_address: { _eq: address }
9096
- };
9097
- const graphqlQuery = {
9098
- query: GetObjectData,
9099
- variables: {
9100
- where_condition: whereCondition,
9101
- offset: _optionalChain([options, 'optionalAccess', _112 => _112.offset]),
9102
- limit: _optionalChain([options, 'optionalAccess', _113 => _113.limit]),
9103
- order_by: _optionalChain([options, 'optionalAccess', _114 => _114.orderBy])
9104
- }
9105
- };
9106
- const data = await queryIndexer({
9107
- aptosConfig,
9108
- query: graphqlQuery,
9109
- originMethod: "getAccountOwnedObjects"
9110
- });
9111
- return data.current_objects;
9112
- }
9113
- async function deriveAccountFromPrivateKey(args) {
9114
- const { aptosConfig, privateKey } = args;
9115
- const publicKey = new AnyPublicKey(privateKey.publicKey());
9116
- if (privateKey instanceof Secp256k1PrivateKey) {
9117
- const authKey = AuthenticationKey.fromPublicKey({ publicKey });
9118
- const address = authKey.derivedAddress();
9119
- return Account.fromPrivateKey({ privateKey, address });
9120
- }
9121
- if (privateKey instanceof Ed25519PrivateKey) {
9122
- const singleSenderTransactionAuthenticatorAuthKey = AuthenticationKey.fromPublicKey({
9123
- publicKey
9124
- });
9125
- const isSingleSenderTransactionAuthenticator = await isAccountExist({
9126
- authKey: singleSenderTransactionAuthenticatorAuthKey,
9127
- aptosConfig
9128
- });
9129
- if (isSingleSenderTransactionAuthenticator) {
9130
- const address = singleSenderTransactionAuthenticatorAuthKey.derivedAddress();
9131
- return Account.fromPrivateKey({ privateKey, address, legacy: false });
9132
- }
9133
- const legacyAuthKey = AuthenticationKey.fromPublicKey({
9134
- publicKey: publicKey.publicKey
9135
- });
9136
- const isLegacyEd25519 = await isAccountExist({ authKey: legacyAuthKey, aptosConfig });
9137
- if (isLegacyEd25519) {
9138
- const address = legacyAuthKey.derivedAddress();
9139
- return Account.fromPrivateKey({ privateKey, address, legacy: true });
9140
- }
9141
- }
9142
- throw new Error(`Can't derive account from private key ${privateKey}`);
9143
- }
9144
- async function isAccountExist(args) {
9145
- const { aptosConfig, authKey } = args;
9146
- const accountAddress = await lookupOriginalAccountAddress({
9147
- aptosConfig,
9148
- authenticationKey: authKey.derivedAddress()
9149
- });
9150
- try {
9151
- await getInfo({
9152
- aptosConfig,
9153
- accountAddress
9154
- });
9155
- return true;
9156
- } catch (error) {
9157
- if (error.status === 404) {
9158
- return false;
9159
- }
9160
- throw new Error(`Error while looking for an account info ${accountAddress.toString()}`);
9161
- }
9162
- }
9163
- async function getMultiKeysForAuthenticationKeys(args) {
9164
- const { aptosConfig, authKeys } = args;
9165
- if (authKeys.length === 0) {
9166
- throw new Error("No authentication keys provided");
9167
- }
9168
- const whereCondition = {
9169
- auth_key: { _in: authKeys.map((authKey) => authKey.toString()) }
9170
- };
9171
- const graphqlQuery = {
9172
- query: GetMultiKeyForAuthKey,
9173
- variables: {
9174
- where_condition: whereCondition
9175
- }
9176
- };
9177
- const { auth_key_multikey_layout: data } = await queryIndexer({
9178
- aptosConfig,
9179
- query: graphqlQuery,
9180
- originMethod: "getMultiKeysForAuthenticationKeys"
9181
- });
9182
- const authKeyToMultiKey = new Map(data.map((entry) => [entry.auth_key, entry]));
9183
- const result = [];
9184
- for (let i = 0; i < authKeys.length; i += 1) {
9185
- const entry = authKeyToMultiKey.get(authKeys[i].toString());
9186
- if (!entry) {
9187
- throw new Error(`Failed to find multikey for authentication key ${authKeys[i]}`);
9188
- }
9189
- const publicKey = extractMultiKeyFromData(entry);
9190
- result.push({ authKey: authKeys[i], publicKey });
9191
- }
9192
- return result;
9193
- }
9194
- function extractMultiKeyFromData(data) {
9195
- const signaturesRequired = data.signatures_required;
9196
- const multikeyLayout = data.multikey_layout_with_prefixes;
9197
- const multikeyType = data.multikey_type;
9198
- if (multikeyType === "multi_ed25519") {
9199
- const ed25519PublicKeys = [];
9200
- for (const key of multikeyLayout) {
9201
- ed25519PublicKeys.push(new Ed25519PublicKey(key));
9202
- }
9203
- return new MultiEd25519PublicKey({
9204
- publicKeys: ed25519PublicKeys,
9205
- threshold: signaturesRequired
9206
- });
9207
- }
9208
- if (multikeyType === "multi_key") {
9209
- const publicKeys = [];
9210
- for (const key of multikeyLayout) {
9211
- const deserializer = Deserializer.fromHex(key);
9212
- const variantIndex = deserializer.deserializeUleb128AsU32();
9213
- let publicKey;
9214
- switch (variantIndex) {
9215
- case 0 /* Ed25519 */:
9216
- publicKey = new Ed25519PublicKey(deserializer.deserializeFixedBytes(32));
9217
- break;
9218
- case 1 /* Secp256k1 */:
9219
- publicKey = new Secp256k1PublicKey(deserializer.deserializeFixedBytes(65));
9220
- break;
9221
- case 3 /* Keyless */:
9222
- publicKey = KeylessPublicKey.deserialize(deserializer);
9223
- break;
9224
- case 4 /* FederatedKeyless */:
9225
- publicKey = FederatedKeylessPublicKey.deserialize(deserializer);
9226
- break;
9227
- default:
9228
- throw new Error(`Unknown variant index for AnyPublicKey: ${variantIndex}`);
9229
- }
9230
- publicKeys.push(new AnyPublicKey(publicKey));
9231
- }
9232
- return new MultiKey({
9233
- publicKeys,
9234
- signaturesRequired
9235
- });
9236
- }
9237
- throw new Error("Unknown multikey type");
9238
- }
9239
- async function getAuthKeysForPublicKey(args) {
9240
- const { aptosConfig, publicKey, options } = args;
9241
- const verified = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _115 => _115.verified]), () => ( true));
9242
- let baseKey = publicKey;
9243
- if (publicKey instanceof AnyPublicKey) {
9244
- baseKey = publicKey.publicKey;
9245
- }
9246
- const whereCondition = {
9247
- public_key: { _eq: baseKey.toString() },
9248
- verified: { _eq: verified }
9249
- };
9250
- const graphqlQuery = {
9251
- query: GetAuthKeysForPublicKey,
9252
- variables: {
9253
- where_condition: whereCondition
9254
- }
9255
- };
9256
- const { public_key_auth_keys: data } = await queryIndexer({
9257
- aptosConfig,
9258
- query: graphqlQuery,
9259
- originMethod: "getAuthKeysForPublicKey"
9260
- });
9261
- const sortedData = data.sort((a, b) => Number(b.last_transaction_version) - Number(a.last_transaction_version));
9262
- const authKeys = sortedData.map((entry) => new AuthenticationKey({ data: entry.auth_key }));
9263
- return authKeys;
9264
- }
9265
- async function getLastestTransactionVersionForAddress(args) {
9266
- const { aptosConfig, accountAddress } = args;
9267
- const address = _chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toString();
9268
- const whereCondition = {
9269
- signer: { _eq: accountAddress.toString() }
9270
- };
9271
- const graphqlQuery = {
9272
- query: GetSignatures,
9273
- variables: {
9274
- where_condition: whereCondition,
9275
- limit: 1
9276
- }
9277
- };
9278
- const { signatures: data } = await queryIndexer({
9279
- aptosConfig,
9280
- query: graphqlQuery,
9281
- originMethod: "getSignatures"
9282
- });
9283
- if (data.length !== 1) {
9284
- throw new Error(`Expected 1 account address for address ${address}, got ${data.length}`);
9285
- }
9286
- return Number(data[0].transaction_version);
9287
- }
9288
- async function getAccountAddressesForAuthKeys(args) {
9289
- const { aptosConfig, options, authKeys } = args;
9290
- const verified = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _116 => _116.verified]), () => ( true));
9291
- if (authKeys.length === 0) {
9292
- throw new Error("No authentication keys provided");
9293
- }
9294
- const whereCondition = {
9295
- auth_key: { _in: authKeys.map((authKey) => authKey.toString()) },
9296
- verified: { _eq: verified }
9297
- };
9298
- const graphqlQuery = {
9299
- query: GetAccountAddressesForAuthKey,
9300
- variables: {
9301
- where_condition: whereCondition
9302
- }
9303
- };
9304
- const { auth_key_account_addresses: data } = await queryIndexer({
9305
- aptosConfig,
9306
- query: graphqlQuery,
9307
- originMethod: "getAccountAddressesForAuthKeys"
9308
- });
9309
- return data.map((entry) => ({
9310
- authKey: new AuthenticationKey({ data: entry.auth_key }),
9311
- accountAddress: new (0, _chunkCSUBLTFAjs.AccountAddress)(_chunkCSUBLTFAjs.Hex.hexInputToUint8Array(entry.address)),
9312
- verified: entry.verified,
9313
- lastTransactionVersion: Number(entry.last_transaction_version)
9314
- }));
9315
- }
9316
- async function getAccountsForPublicKey(args) {
9317
- const { aptosConfig, publicKey } = args;
9318
- let baseKey = publicKey;
9319
- if (publicKey instanceof AnyPublicKey) {
9320
- baseKey = publicKey.publicKey;
9321
- }
9322
- const singleKeyPublicKeys = [];
9323
- if (baseKey instanceof Ed25519PublicKey) {
9324
- singleKeyPublicKeys.push(baseKey);
9325
- }
9326
- const anyPublicKey = new AnyPublicKey(baseKey);
9327
- singleKeyPublicKeys.push(anyPublicKey);
9328
- const singleKeyAuthKeyPublicKeyPairs = singleKeyPublicKeys.map((pubKey) => {
9329
- const authKey = pubKey.authKey();
9330
- return { authKey, publicKey: pubKey };
9331
- });
9332
- const multiKeyAuthKeys = await getAuthKeysForPublicKey({ aptosConfig, publicKey });
9333
- const [multiKeyPairs, authKeyAccountAddressPairs] = await Promise.all([
9334
- getMultiKeysForAuthenticationKeys({ aptosConfig, authKeys: multiKeyAuthKeys }),
9335
- getAccountAddressesForAuthKeys({
9336
- aptosConfig,
9337
- authKeys: multiKeyAuthKeys.concat(singleKeyAuthKeyPublicKeyPairs.map((pair) => pair.publicKey.authKey()))
9338
- })
9339
- ]);
9340
- const authKeyPublicKeyPairs = singleKeyAuthKeyPublicKeyPairs.concat(multiKeyPairs);
9341
- const result = [];
9342
- const authKeyToPublicKey = new Map(authKeyPublicKeyPairs.map((pair) => [pair.authKey.toString(), pair.publicKey]));
9343
- for (const authKeyAccountAddressPair of authKeyAccountAddressPairs) {
9344
- if (!authKeyToPublicKey.has(authKeyAccountAddressPair.authKey.toString())) {
9345
- throw new Error(`No publicKey found for authentication key ${authKeyAccountAddressPair.authKey}.`);
9346
- }
9347
- result.push({
9348
- accountAddress: authKeyAccountAddressPair.accountAddress,
9349
- publicKey: authKeyToPublicKey.get(authKeyAccountAddressPair.authKey.toString()),
9350
- verified: authKeyAccountAddressPair.verified,
9351
- lastTransactionVersion: authKeyAccountAddressPair.lastTransactionVersion
9352
- });
9353
- }
9354
- return result;
9355
- }
9356
- async function getPublicKeyFromAccountAddress(args) {
9357
- const { aptosConfig, accountAddress } = args;
9358
- const accountData = await getInfo({ aptosConfig, accountAddress });
9359
- const lastTransactionVersion = await getLastestTransactionVersionForAddress({
9360
- aptosConfig,
9361
- accountAddress
9362
- });
9363
- const transaction = await getTransactionByVersion({ aptosConfig, ledgerVersion: lastTransactionVersion });
9364
- if (!_chunkCSUBLTFAjs.isUserTransactionResponse.call(void 0, transaction)) {
9365
- throw new Error("Transaction is not a user transaction");
9366
- }
9367
- const { signature } = transaction;
9368
- if (!signature) {
9369
- throw new Error("Transaction has no signature");
9370
- }
9371
- let publicKey;
9372
- if (_chunkCSUBLTFAjs.isEd25519Signature.call(void 0, signature)) {
9373
- publicKey = new Ed25519PublicKey(signature.public_key);
9374
- } else if (_chunkCSUBLTFAjs.isMultiEd25519Signature.call(void 0, signature)) {
9375
- publicKey = new MultiEd25519PublicKey({
9376
- publicKeys: signature.public_keys.map((pk) => new Ed25519PublicKey(pk)),
9377
- threshold: signature.threshold
9378
- });
9379
- } else if (_chunkCSUBLTFAjs.isSingleSenderSignature.call(void 0, signature)) {
9380
- if (signature.public_key.type === "keyless") {
9381
- const deserializer = Deserializer.fromHex(signature.public_key.value);
9382
- publicKey = new AnyPublicKey(KeylessPublicKey.deserialize(deserializer));
9383
- } else if (signature.public_key.type === "ed25519") {
9384
- publicKey = new AnyPublicKey(new Ed25519PublicKey(signature.public_key.value));
9385
- } else if (signature.public_key.type === "secp256k1_ecdsa") {
9386
- publicKey = new AnyPublicKey(new Secp256k1PublicKey(signature.public_key.value));
9387
- } else {
9388
- throw new Error("Unknown public key type");
9389
- }
9390
- } else {
9391
- throw new Error("Unknown signature type");
9392
- }
9393
- if (publicKey.authKey().toString() !== accountData.authentication_key) {
9394
- throw new Error(
9395
- "Derived public key does not match authentication key. The most recent signature was likely a key rotation."
9396
- );
9397
- }
9398
- return publicKey;
9399
- }
9400
-
9401
- // src/api/utils.ts
9402
- async function waitForIndexerOnVersion(args) {
9403
- if (args.minimumLedgerVersion !== void 0) {
9404
- await waitForIndexer({
9405
- aptosConfig: args.config,
9406
- minimumLedgerVersion: args.minimumLedgerVersion,
9407
- processorType: args.processorType
9408
- });
9409
- }
9410
- }
9411
-
9412
- // src/transactions/transactionBuilder/helpers.ts
9413
- function isBool(arg) {
9414
- return typeof arg === "boolean";
9415
- }
9416
- function isString(arg) {
9417
- return typeof arg === "string";
9418
- }
9419
- function isNumber(arg) {
9420
- return typeof arg === "number";
9421
- }
9422
- function convertNumber(arg) {
9423
- if (isNumber(arg)) {
9424
- return arg;
9425
- }
9426
- if (isString(arg) && arg !== "") {
9427
- return Number.parseInt(arg, 10);
9428
- }
9429
- return void 0;
9430
- }
9431
- function isLargeNumber(arg) {
9432
- return typeof arg === "number" || typeof arg === "bigint" || typeof arg === "string";
9433
- }
9434
- function isEmptyOption(arg) {
9435
- return arg === null || arg === void 0;
9436
- }
9437
- function isEncodedEntryFunctionArgument(arg) {
9438
- return (
9439
- /**
9440
- * Determines if the provided argument is an instance of the Bool class.
9441
- *
9442
- * @param arg - The argument to check, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9443
- * @group Implementation
9444
- * @category Transactions
9445
- */
9446
- isBcsBool(arg) || /**
9447
- * Determines if the provided argument is an instance of U8.
9448
- * This function helps validate the type of the argument passed to ensure it is a U8 type.
9449
- *
9450
- * @param arg - The argument to be checked, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9451
- * @group Implementation
9452
- * @category Transactions
9453
- */
9454
- isBcsU8(arg) || /**
9455
- * Determines if the provided argument is an instance of U16.
9456
- *
9457
- * @param arg - The argument to check, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9458
- * @group Implementation
9459
- * @category Transactions
9460
- */
9461
- isBcsU16(arg) || /**
9462
- * Determines if the provided argument is an instance of U32.
9463
- *
9464
- * @param arg - The argument to check, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9465
- * @returns A boolean indicating whether the argument is a U32 instance.
9466
- * @group Implementation
9467
- * @category Transactions
9468
- */
9469
- isBcsU32(arg) || /**
9470
- * Determine if the provided argument is an instance of U64.
9471
- * This function helps validate that the argument conforms to the expected U64 type.
9472
- *
9473
- * @param arg - The argument to check, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9474
- * @group Implementation
9475
- * @category Transactions
9476
- */
9477
- isBcsU64(arg) || /**
9478
- * Determines if the provided argument is an instance of U128.
9479
- * This function helps validate the type of the argument passed to ensure it is a U128 type.
9480
- *
9481
- * @param arg - The argument to be checked, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9482
- * @group Implementation
9483
- * @category Transactions
9484
- */
9485
- isBcsU128(arg) || /**
9486
- * Determines if the provided argument is an instance of U256.
9487
- *
9488
- * @param arg - The argument to check, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9489
- * @returns A boolean indicating whether the argument is a U256 instance.
9490
- * @group Implementation
9491
- * @category Transactions
9492
- */
9493
- isBcsU256(arg) || /**
9494
- * Determines if the provided argument is an instance of AccountAddress.
9495
- * This function helps validate whether a given input corresponds to a valid BCS address type.
9496
- *
9497
- * @param arg - The argument to check, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9498
- * @group Implementation
9499
- * @category Transactions
9500
- */
9501
- isBcsAddress(arg) || /**
9502
- * Determine if the provided argument is an instance of MoveString.
9503
- *
9504
- * @param arg - The argument to check, which can be of types EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9505
- * @group Implementation
9506
- * @category Transactions
9507
- */
9508
- isBcsString(arg) || /**
9509
- * Determine if the provided argument is an instance of FixedBytes.
9510
- * This function helps to validate the type of the argument being passed.
9511
- *
9512
- * @param arg - The argument to check, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9513
- * @group Implementation
9514
- * @category Transactions
9515
- */
9516
- isBcsFixedBytes(arg) || arg instanceof MoveVector || arg instanceof MoveOption
9517
- );
9518
- }
9519
- function isBcsBool(arg) {
9520
- return arg instanceof Bool;
9521
- }
9522
- function isBcsAddress(arg) {
9523
- return arg instanceof _chunkCSUBLTFAjs.AccountAddress;
9524
- }
9525
- function isBcsString(arg) {
9526
- return arg instanceof MoveString;
9527
- }
9528
- function isBcsFixedBytes(arg) {
9529
- return arg instanceof FixedBytes;
9530
- }
9531
- function isBcsU8(arg) {
9532
- return arg instanceof U8;
9533
- }
9534
- function isBcsU16(arg) {
9535
- return arg instanceof U16;
9536
- }
9537
- function isBcsU32(arg) {
9538
- return arg instanceof U32;
9539
- }
9540
- function isBcsU64(arg) {
9541
- return arg instanceof U64;
9542
- }
9543
- function isBcsU128(arg) {
9544
- return arg instanceof U128;
9545
- }
9546
- function isBcsU256(arg) {
9547
- return arg instanceof U256;
9548
- }
9549
- function isScriptDataInput(arg) {
9550
- return "bytecode" in arg;
9551
- }
9552
- function throwTypeMismatch(expectedType, position) {
9553
- throw new Error(`Type mismatch for argument ${position}, expected '${expectedType}'`);
9554
- }
9555
- function findFirstNonSignerArg(functionAbi) {
9556
- const index = functionAbi.params.findIndex((param) => param !== "signer" && param !== "&signer");
9557
- if (index < 0) {
9558
- return functionAbi.params.length;
9559
- }
9560
- return index;
9561
- }
9562
-
9563
- // src/transactions/transactionBuilder/transactionBuilder.ts
9564
-
9565
-
9566
- // src/transactions/typeTag/parser.ts
9567
- function isValidIdentifier(str) {
9568
- return !!str.match(/^[_a-zA-Z0-9]+$/);
9569
- }
9570
- function isValidWhitespaceCharacter(char) {
9571
- return !!char.match(/\s/);
9572
- }
9573
- function isGeneric(str) {
9574
- return !!str.match(/^T[0-9]+$/);
9575
- }
9576
- function isRef(str) {
9577
- return !!str.match(/^&.+$/);
9578
- }
9579
- function isPrimitive(str) {
9580
- switch (str) {
9581
- case "signer":
9582
- case "address":
9583
- case "bool":
9584
- case "u8":
9585
- case "u16":
9586
- case "u32":
9587
- case "u64":
9588
- case "u128":
9589
- case "u256":
9590
- return true;
9591
- default:
9592
- return false;
9593
- }
9594
- }
9595
- function consumeWhitespace(tagStr, pos) {
9596
- let i = pos;
9597
- for (; i < tagStr.length; i += 1) {
9598
- const innerChar = tagStr[i];
9599
- if (!isValidWhitespaceCharacter(innerChar)) {
9600
- break;
9601
- }
9602
- }
9603
- return i;
9604
- }
9605
- var TypeTagParserErrorType = /* @__PURE__ */ ((TypeTagParserErrorType2) => {
9606
- TypeTagParserErrorType2["InvalidTypeTag"] = "unknown type";
9607
- TypeTagParserErrorType2["UnexpectedGenericType"] = "unexpected generic type";
9608
- TypeTagParserErrorType2["UnexpectedTypeArgumentClose"] = "unexpected '>'";
9609
- TypeTagParserErrorType2["UnexpectedWhitespaceCharacter"] = "unexpected whitespace character";
9610
- TypeTagParserErrorType2["UnexpectedComma"] = "unexpected ','";
9611
- TypeTagParserErrorType2["TypeArgumentCountMismatch"] = "type argument count doesn't match expected amount";
9612
- TypeTagParserErrorType2["MissingTypeArgumentClose"] = "no matching '>' for '<'";
9613
- TypeTagParserErrorType2["MissingTypeArgument"] = "no type argument before ','";
9614
- TypeTagParserErrorType2["UnexpectedPrimitiveTypeArguments"] = "primitive types not expected to have type arguments";
9615
- TypeTagParserErrorType2["UnexpectedVectorTypeArgumentCount"] = "vector type expected to have exactly one type argument";
9616
- TypeTagParserErrorType2["UnexpectedStructFormat"] = "unexpected struct format, must be of the form 0xaddress::module_name::struct_name";
9617
- TypeTagParserErrorType2["InvalidModuleNameCharacter"] = "module name must only contain alphanumeric or '_' characters";
9618
- TypeTagParserErrorType2["InvalidStructNameCharacter"] = "struct name must only contain alphanumeric or '_' characters";
9619
- TypeTagParserErrorType2["InvalidAddress"] = "struct address must be valid";
9620
- return TypeTagParserErrorType2;
9621
- })(TypeTagParserErrorType || {});
9622
- var TypeTagParserError = class extends Error {
9623
- /**
9624
- * Constructs an error indicating a failure to parse a type tag.
9625
- * This error provides details about the specific type tag that could not be parsed and the reason for the failure.
9626
- *
9627
- * @param typeTagStr - The string representation of the type tag that failed to parse.
9628
- * @param invalidReason - The reason why the type tag is considered invalid.
9629
- * @group Implementation
9630
- * @category Transactions
9631
- */
9632
- constructor(typeTagStr, invalidReason) {
9633
- super(`Failed to parse typeTag '${typeTagStr}', ${invalidReason}`);
8919
+ var TypeTagParserErrorType = /* @__PURE__ */ ((TypeTagParserErrorType2) => {
8920
+ TypeTagParserErrorType2["InvalidTypeTag"] = "unknown type";
8921
+ TypeTagParserErrorType2["UnexpectedGenericType"] = "unexpected generic type";
8922
+ TypeTagParserErrorType2["UnexpectedTypeArgumentClose"] = "unexpected '>'";
8923
+ TypeTagParserErrorType2["UnexpectedWhitespaceCharacter"] = "unexpected whitespace character";
8924
+ TypeTagParserErrorType2["UnexpectedComma"] = "unexpected ','";
8925
+ TypeTagParserErrorType2["TypeArgumentCountMismatch"] = "type argument count doesn't match expected amount";
8926
+ TypeTagParserErrorType2["MissingTypeArgumentClose"] = "no matching '>' for '<'";
8927
+ TypeTagParserErrorType2["MissingTypeArgument"] = "no type argument before ','";
8928
+ TypeTagParserErrorType2["UnexpectedPrimitiveTypeArguments"] = "primitive types not expected to have type arguments";
8929
+ TypeTagParserErrorType2["UnexpectedVectorTypeArgumentCount"] = "vector type expected to have exactly one type argument";
8930
+ TypeTagParserErrorType2["UnexpectedStructFormat"] = "unexpected struct format, must be of the form 0xaddress::module_name::struct_name";
8931
+ TypeTagParserErrorType2["InvalidModuleNameCharacter"] = "module name must only contain alphanumeric or '_' characters";
8932
+ TypeTagParserErrorType2["InvalidStructNameCharacter"] = "struct name must only contain alphanumeric or '_' characters";
8933
+ TypeTagParserErrorType2["InvalidAddress"] = "struct address must be valid";
8934
+ return TypeTagParserErrorType2;
8935
+ })(TypeTagParserErrorType || {});
8936
+ var TypeTagParserError = class extends Error {
8937
+ /**
8938
+ * Constructs an error indicating a failure to parse a type tag.
8939
+ * This error provides details about the specific type tag that could not be parsed and the reason for the failure.
8940
+ *
8941
+ * @param typeTagStr - The string representation of the type tag that failed to parse.
8942
+ * @param invalidReason - The reason why the type tag is considered invalid.
8943
+ * @group Implementation
8944
+ * @category Transactions
8945
+ */
8946
+ constructor(typeTagStr, invalidReason) {
8947
+ super(`Failed to parse typeTag '${typeTagStr}', ${invalidReason}`);
9634
8948
  }
9635
8949
  };
9636
8950
  function parseTypeTag(typeStr, options) {
9637
- const allowGenerics = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _117 => _117.allowGenerics]), () => ( false));
8951
+ const allowGenerics = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _87 => _87.allowGenerics]), () => ( false));
9638
8952
  const saved = [];
9639
8953
  let innerTypes = [];
9640
8954
  let curTypes = [];
@@ -9768,7 +9082,7 @@ function parseTypeTagInner(str, types, allowGenerics) {
9768
9082
  }
9769
9083
  let address;
9770
9084
  try {
9771
- address = _chunkCSUBLTFAjs.AccountAddress.fromString(structParts[0]);
9085
+ address = _chunkJMOQXLEDjs.AccountAddress.fromString(structParts[0]);
9772
9086
  } catch (error) {
9773
9087
  throw new TypeTagParserError(str, "struct address must be valid" /* InvalidAddress */);
9774
9088
  }
@@ -9784,10 +9098,161 @@ function parseTypeTagInner(str, types, allowGenerics) {
9784
9098
  }
9785
9099
  }
9786
9100
 
9101
+ // src/transactions/transactionBuilder/helpers.ts
9102
+ function isBool(arg) {
9103
+ return typeof arg === "boolean";
9104
+ }
9105
+ function isString(arg) {
9106
+ return typeof arg === "string";
9107
+ }
9108
+ function isNumber(arg) {
9109
+ return typeof arg === "number";
9110
+ }
9111
+ function convertNumber(arg) {
9112
+ if (isNumber(arg)) {
9113
+ return arg;
9114
+ }
9115
+ if (isString(arg) && arg !== "") {
9116
+ return Number.parseInt(arg, 10);
9117
+ }
9118
+ return void 0;
9119
+ }
9120
+ function isLargeNumber(arg) {
9121
+ return typeof arg === "number" || typeof arg === "bigint" || typeof arg === "string";
9122
+ }
9123
+ function isEmptyOption(arg) {
9124
+ return arg === null || arg === void 0;
9125
+ }
9126
+ function isEncodedEntryFunctionArgument(arg) {
9127
+ return (
9128
+ /**
9129
+ * Determines if the provided argument is an instance of the Bool class.
9130
+ *
9131
+ * @param arg - The argument to check, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9132
+ * @group Implementation
9133
+ * @category Transactions
9134
+ */
9135
+ isBcsBool(arg) || /**
9136
+ * Determines if the provided argument is an instance of U8.
9137
+ * This function helps validate the type of the argument passed to ensure it is a U8 type.
9138
+ *
9139
+ * @param arg - The argument to be checked, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9140
+ * @group Implementation
9141
+ * @category Transactions
9142
+ */
9143
+ isBcsU8(arg) || /**
9144
+ * Determines if the provided argument is an instance of U16.
9145
+ *
9146
+ * @param arg - The argument to check, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9147
+ * @group Implementation
9148
+ * @category Transactions
9149
+ */
9150
+ isBcsU16(arg) || /**
9151
+ * Determines if the provided argument is an instance of U32.
9152
+ *
9153
+ * @param arg - The argument to check, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9154
+ * @returns A boolean indicating whether the argument is a U32 instance.
9155
+ * @group Implementation
9156
+ * @category Transactions
9157
+ */
9158
+ isBcsU32(arg) || /**
9159
+ * Determine if the provided argument is an instance of U64.
9160
+ * This function helps validate that the argument conforms to the expected U64 type.
9161
+ *
9162
+ * @param arg - The argument to check, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9163
+ * @group Implementation
9164
+ * @category Transactions
9165
+ */
9166
+ isBcsU64(arg) || /**
9167
+ * Determines if the provided argument is an instance of U128.
9168
+ * This function helps validate the type of the argument passed to ensure it is a U128 type.
9169
+ *
9170
+ * @param arg - The argument to be checked, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9171
+ * @group Implementation
9172
+ * @category Transactions
9173
+ */
9174
+ isBcsU128(arg) || /**
9175
+ * Determines if the provided argument is an instance of U256.
9176
+ *
9177
+ * @param arg - The argument to check, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9178
+ * @returns A boolean indicating whether the argument is a U256 instance.
9179
+ * @group Implementation
9180
+ * @category Transactions
9181
+ */
9182
+ isBcsU256(arg) || /**
9183
+ * Determines if the provided argument is an instance of AccountAddress.
9184
+ * This function helps validate whether a given input corresponds to a valid BCS address type.
9185
+ *
9186
+ * @param arg - The argument to check, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9187
+ * @group Implementation
9188
+ * @category Transactions
9189
+ */
9190
+ isBcsAddress(arg) || /**
9191
+ * Determine if the provided argument is an instance of MoveString.
9192
+ *
9193
+ * @param arg - The argument to check, which can be of types EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9194
+ * @group Implementation
9195
+ * @category Transactions
9196
+ */
9197
+ isBcsString(arg) || /**
9198
+ * Determine if the provided argument is an instance of FixedBytes.
9199
+ * This function helps to validate the type of the argument being passed.
9200
+ *
9201
+ * @param arg - The argument to check, which can be of type EntryFunctionArgumentTypes or SimpleEntryFunctionArgumentTypes.
9202
+ * @group Implementation
9203
+ * @category Transactions
9204
+ */
9205
+ isBcsFixedBytes(arg) || arg instanceof MoveVector || arg instanceof MoveOption
9206
+ );
9207
+ }
9208
+ function isBcsBool(arg) {
9209
+ return arg instanceof Bool;
9210
+ }
9211
+ function isBcsAddress(arg) {
9212
+ return arg instanceof _chunkJMOQXLEDjs.AccountAddress;
9213
+ }
9214
+ function isBcsString(arg) {
9215
+ return arg instanceof MoveString;
9216
+ }
9217
+ function isBcsFixedBytes(arg) {
9218
+ return arg instanceof FixedBytes;
9219
+ }
9220
+ function isBcsU8(arg) {
9221
+ return arg instanceof U8;
9222
+ }
9223
+ function isBcsU16(arg) {
9224
+ return arg instanceof U16;
9225
+ }
9226
+ function isBcsU32(arg) {
9227
+ return arg instanceof U32;
9228
+ }
9229
+ function isBcsU64(arg) {
9230
+ return arg instanceof U64;
9231
+ }
9232
+ function isBcsU128(arg) {
9233
+ return arg instanceof U128;
9234
+ }
9235
+ function isBcsU256(arg) {
9236
+ return arg instanceof U256;
9237
+ }
9238
+ function isScriptDataInput(arg) {
9239
+ return "bytecode" in arg;
9240
+ }
9241
+ function throwTypeMismatch(expectedType, position) {
9242
+ throw new Error(`Type mismatch for argument ${position}, expected '${expectedType}'`);
9243
+ }
9244
+ function findFirstNonSignerArg(functionAbi) {
9245
+ const index = functionAbi.params.findIndex((param) => param !== "signer" && param !== "&signer");
9246
+ if (index < 0) {
9247
+ return functionAbi.params.length;
9248
+ }
9249
+ return index;
9250
+ }
9251
+
9787
9252
  // src/transactions/transactionBuilder/remoteAbi.ts
9788
9253
  var TEXT_ENCODER = new TextEncoder();
9789
9254
  function standardizeTypeTags(typeArguments) {
9790
- return _nullishCoalesce(_optionalChain([typeArguments, 'optionalAccess', _118 => _118.map, 'call', _119 => _119((typeArg) => {
9255
+ return _nullishCoalesce(_optionalChain([typeArguments, 'optionalAccess', _88 => _88.map, 'call', _89 => _89((typeArg) => {
9791
9256
  if (isString(typeArg)) {
9792
9257
  return parseTypeTag(typeArg);
9793
9258
  }
@@ -9857,10 +9322,10 @@ async function fetchViewFunctionAbi(moduleAddress, moduleName, functionName, apt
9857
9322
  };
9858
9323
  }
9859
9324
  function convertCallArgument(argument, functionName, functionAbi, position, genericTypeParams) {
9860
- if (argument instanceof _chunkCSUBLTFAjs.CallArgument) {
9325
+ if (argument instanceof _chunkJMOQXLEDjs.CallArgument) {
9861
9326
  return argument;
9862
9327
  }
9863
- return _chunkCSUBLTFAjs.CallArgument.newBytes(
9328
+ return _chunkJMOQXLEDjs.CallArgument.newBytes(
9864
9329
  convertArgument(functionName, functionAbi, argument, position, genericTypeParams).bcsToBytes()
9865
9330
  );
9866
9331
  }
@@ -9891,7 +9356,7 @@ function parseArg(arg, param, position, genericTypeParams) {
9891
9356
  }
9892
9357
  if (param.isAddress()) {
9893
9358
  if (isString(arg)) {
9894
- return _chunkCSUBLTFAjs.AccountAddress.fromString(arg);
9359
+ return _chunkJMOQXLEDjs.AccountAddress.fromString(arg);
9895
9360
  }
9896
9361
  throwTypeMismatch("string | AccountAddress", position);
9897
9362
  }
@@ -9972,7 +9437,7 @@ function parseArg(arg, param, position, genericTypeParams) {
9972
9437
  }
9973
9438
  if (param.isObject()) {
9974
9439
  if (isString(arg)) {
9975
- return _chunkCSUBLTFAjs.AccountAddress.fromString(arg);
9440
+ return _chunkJMOQXLEDjs.AccountAddress.fromString(arg);
9976
9441
  }
9977
9442
  throwTypeMismatch("string | AccountAddress", position);
9978
9443
  }
@@ -10100,7 +9565,7 @@ async function generateTransactionPayload(args) {
10100
9565
  if (isScriptDataInput(args)) {
10101
9566
  return generateTransactionPayloadScript(args);
10102
9567
  }
10103
- const { moduleAddress, moduleName, functionName } = _chunkCSUBLTFAjs.getFunctionParts.call(void 0, args.function);
9568
+ const { moduleAddress, moduleName, functionName } = _chunkJMOQXLEDjs.getFunctionParts.call(void 0, args.function);
10104
9569
  const functionAbi = await fetchAbi({
10105
9570
  key: "entry-function",
10106
9571
  moduleAddress,
@@ -10114,7 +9579,7 @@ async function generateTransactionPayload(args) {
10114
9579
  }
10115
9580
  function generateTransactionPayloadWithABI(args) {
10116
9581
  const functionAbi = args.abi;
10117
- const { moduleAddress, moduleName, functionName } = _chunkCSUBLTFAjs.getFunctionParts.call(void 0, args.function);
9582
+ const { moduleAddress, moduleName, functionName } = _chunkJMOQXLEDjs.getFunctionParts.call(void 0, args.function);
10118
9583
  const typeArguments = standardizeTypeTags(args.typeArguments);
10119
9584
  if (typeArguments.length !== functionAbi.typeParameters.length) {
10120
9585
  throw new Error(
@@ -10153,7 +9618,7 @@ function generateTransactionPayloadWithABI(args) {
10153
9618
  functionArguments
10154
9619
  );
10155
9620
  if ("multisigAddress" in args) {
10156
- const multisigAddress = _chunkCSUBLTFAjs.AccountAddress.from(args.multisigAddress);
9621
+ const multisigAddress = _chunkJMOQXLEDjs.AccountAddress.from(args.multisigAddress);
10157
9622
  return new TransactionPayloadMultiSig(
10158
9623
  new MultiSig(multisigAddress, new MultiSigTransactionPayload(entryFunctionPayload))
10159
9624
  );
@@ -10161,7 +9626,7 @@ function generateTransactionPayloadWithABI(args) {
10161
9626
  return new TransactionPayloadEntryFunction(entryFunctionPayload);
10162
9627
  }
10163
9628
  async function generateViewFunctionPayload(args) {
10164
- const { moduleAddress, moduleName, functionName } = _chunkCSUBLTFAjs.getFunctionParts.call(void 0, args.function);
9629
+ const { moduleAddress, moduleName, functionName } = _chunkJMOQXLEDjs.getFunctionParts.call(void 0, args.function);
10165
9630
  const functionAbi = await fetchAbi({
10166
9631
  key: "view-function",
10167
9632
  moduleAddress,
@@ -10175,14 +9640,14 @@ async function generateViewFunctionPayload(args) {
10175
9640
  }
10176
9641
  function generateViewFunctionPayloadWithABI(args) {
10177
9642
  const functionAbi = args.abi;
10178
- const { moduleAddress, moduleName, functionName } = _chunkCSUBLTFAjs.getFunctionParts.call(void 0, args.function);
9643
+ const { moduleAddress, moduleName, functionName } = _chunkJMOQXLEDjs.getFunctionParts.call(void 0, args.function);
10179
9644
  const typeArguments = standardizeTypeTags(args.typeArguments);
10180
9645
  if (typeArguments.length !== functionAbi.typeParameters.length) {
10181
9646
  throw new Error(
10182
9647
  `Type argument count mismatch, expected ${functionAbi.typeParameters.length}, received ${typeArguments.length}`
10183
9648
  );
10184
9649
  }
10185
- const functionArguments = _nullishCoalesce(_optionalChain([args, 'optionalAccess', _120 => _120.functionArguments, 'optionalAccess', _121 => _121.map, 'call', _122 => _122((arg, i) => convertArgument(args.function, functionAbi, arg, i, typeArguments))]), () => ( []));
9650
+ const functionArguments = _nullishCoalesce(_optionalChain([args, 'optionalAccess', _90 => _90.functionArguments, 'optionalAccess', _91 => _91.map, 'call', _92 => _92((arg, i) => convertArgument(args.function, functionAbi, arg, i, typeArguments))]), () => ( []));
10186
9651
  if (functionArguments.length !== functionAbi.parameters.length) {
10187
9652
  throw new Error(
10188
9653
  // eslint-disable-next-line max-len
@@ -10194,7 +9659,7 @@ function generateViewFunctionPayloadWithABI(args) {
10194
9659
  function generateTransactionPayloadScript(args) {
10195
9660
  return new TransactionPayloadScript(
10196
9661
  new Script(
10197
- _chunkCSUBLTFAjs.Hex.fromHexInput(args.bytecode).toUint8Array(),
9662
+ _chunkJMOQXLEDjs.Hex.fromHexInput(args.bytecode).toUint8Array(),
10198
9663
  standardizeTypeTags(args.typeArguments),
10199
9664
  args.functionArguments
10200
9665
  )
@@ -10210,7 +9675,7 @@ async function generateRawTransaction(args) {
10210
9675
  return { chainId: info.chain_id };
10211
9676
  };
10212
9677
  const getGasUnitPrice = async () => {
10213
- if (_optionalChain([options, 'optionalAccess', _123 => _123.gasUnitPrice])) {
9678
+ if (_optionalChain([options, 'optionalAccess', _93 => _93.gasUnitPrice])) {
10214
9679
  return { gasEstimate: options.gasUnitPrice };
10215
9680
  }
10216
9681
  const estimation = await getGasPriceEstimation({ aptosConfig });
@@ -10218,12 +9683,12 @@ async function generateRawTransaction(args) {
10218
9683
  };
10219
9684
  const getSequenceNumberForAny = async () => {
10220
9685
  const getSequenceNumber = async () => {
10221
- if (_optionalChain([options, 'optionalAccess', _124 => _124.accountSequenceNumber]) !== void 0) {
9686
+ if (_optionalChain([options, 'optionalAccess', _94 => _94.accountSequenceNumber]) !== void 0) {
10222
9687
  return options.accountSequenceNumber;
10223
9688
  }
10224
9689
  return (await getInfo({ aptosConfig, accountAddress: sender })).sequence_number;
10225
9690
  };
10226
- if (feePayerAddress && _chunkCSUBLTFAjs.AccountAddress.from(feePayerAddress).equals(_chunkCSUBLTFAjs.AccountAddress.ZERO)) {
9691
+ if (feePayerAddress && _chunkJMOQXLEDjs.AccountAddress.from(feePayerAddress).equals(_chunkJMOQXLEDjs.AccountAddress.ZERO)) {
10227
9692
  try {
10228
9693
  return await getSequenceNumber();
10229
9694
  } catch (e) {
@@ -10239,12 +9704,12 @@ async function generateRawTransaction(args) {
10239
9704
  getSequenceNumberForAny()
10240
9705
  ]);
10241
9706
  const { maxGasAmount, gasUnitPrice, expireTimestamp } = {
10242
- maxGasAmount: _optionalChain([options, 'optionalAccess', _125 => _125.maxGasAmount]) ? BigInt(options.maxGasAmount) : BigInt(DEFAULT_MAX_GAS_AMOUNT),
10243
- gasUnitPrice: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _126 => _126.gasUnitPrice]), () => ( BigInt(gasEstimate))),
10244
- expireTimestamp: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _127 => _127.expireTimestamp]), () => ( BigInt(Math.floor(Date.now() / 1e3) + DEFAULT_TXN_EXP_SEC_FROM_NOW)))
9707
+ maxGasAmount: _optionalChain([options, 'optionalAccess', _95 => _95.maxGasAmount]) ? BigInt(options.maxGasAmount) : BigInt(DEFAULT_MAX_GAS_AMOUNT),
9708
+ gasUnitPrice: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _96 => _96.gasUnitPrice]), () => ( BigInt(gasEstimate))),
9709
+ expireTimestamp: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _97 => _97.expireTimestamp]), () => ( BigInt(Math.floor(Date.now() / 1e3) + DEFAULT_TXN_EXP_SEC_FROM_NOW)))
10245
9710
  };
10246
9711
  return new RawTransaction(
10247
- _chunkCSUBLTFAjs.AccountAddress.from(sender),
9712
+ _chunkJMOQXLEDjs.AccountAddress.from(sender),
10248
9713
  BigInt(sequenceNumber),
10249
9714
  payload,
10250
9715
  BigInt(maxGasAmount),
@@ -10263,14 +9728,14 @@ async function buildTransaction(args) {
10263
9728
  feePayerAddress
10264
9729
  });
10265
9730
  if ("secondarySignerAddresses" in args) {
10266
- const signers = _nullishCoalesce(_optionalChain([args, 'access', _128 => _128.secondarySignerAddresses, 'optionalAccess', _129 => _129.map, 'call', _130 => _130((signer) => _chunkCSUBLTFAjs.AccountAddress.from(signer))]), () => ( []));
9731
+ const signers = _nullishCoalesce(_optionalChain([args, 'access', _98 => _98.secondarySignerAddresses, 'optionalAccess', _99 => _99.map, 'call', _100 => _100((signer) => _chunkJMOQXLEDjs.AccountAddress.from(signer))]), () => ( []));
10267
9732
  return new MultiAgentTransaction(
10268
9733
  rawTxn,
10269
9734
  signers,
10270
- args.feePayerAddress ? _chunkCSUBLTFAjs.AccountAddress.from(args.feePayerAddress) : void 0
9735
+ args.feePayerAddress ? _chunkJMOQXLEDjs.AccountAddress.from(args.feePayerAddress) : void 0
10271
9736
  );
10272
9737
  }
10273
- return new SimpleTransaction(rawTxn, args.feePayerAddress ? _chunkCSUBLTFAjs.AccountAddress.from(args.feePayerAddress) : void 0);
9738
+ return new SimpleTransaction(rawTxn, args.feePayerAddress ? _chunkJMOQXLEDjs.AccountAddress.from(args.feePayerAddress) : void 0);
10274
9739
  }
10275
9740
  function generateSignedTransactionForSimulation(args) {
10276
9741
  const { signerPublicKey, transaction, secondarySignersPublicKeys, feePayerPublicKey } = args;
@@ -10367,7 +9832,12 @@ function getAuthenticatorForSimulation(publicKey) {
10367
9832
  return new AccountAuthenticatorMultiKey(
10368
9833
  accountPublicKey,
10369
9834
  new MultiKeySignature({
10370
- signatures: accountPublicKey.publicKeys.map(() => new AnySignature(invalidSignature)),
9835
+ signatures: accountPublicKey.publicKeys.map((pubKey) => {
9836
+ if (KeylessPublicKey.isInstance(pubKey.publicKey) || FederatedKeylessPublicKey.isInstance(pubKey.publicKey)) {
9837
+ return new AnySignature(KeylessSignature.getSimulationSignature());
9838
+ }
9839
+ return new AnySignature(invalidSignature);
9840
+ }),
10371
9841
  bitmap: accountPublicKey.createBitmap({
10372
9842
  bits: Array(accountPublicKey.publicKeys.length).fill(0).map((_, i) => i)
10373
9843
  })
@@ -10429,7 +9899,7 @@ function hashValues(input) {
10429
9899
  var TRANSACTION_PREFIX = hashValues(["APTOS::Transaction"]);
10430
9900
  function generateUserTransactionHash(args) {
10431
9901
  const signedTransaction = generateSignedTransaction(args);
10432
- return new (0, _chunkCSUBLTFAjs.Hex)(hashValues([TRANSACTION_PREFIX, new Uint8Array([0]), signedTransaction])).toString();
9902
+ return new (0, _chunkJMOQXLEDjs.Hex)(hashValues([TRANSACTION_PREFIX, new Uint8Array([0]), signedTransaction])).toString();
10433
9903
  }
10434
9904
  async function fetchAbi({
10435
9905
  key,
@@ -10480,11 +9950,13 @@ var AptosScriptComposer = class _AptosScriptComposer {
10480
9950
  //
10481
9951
  // The function would also return a list of `CallArgument` that can be passed on to future calls.
10482
9952
  async addBatchedCalls(input) {
10483
- const { moduleAddress, moduleName, functionName } = _chunkCSUBLTFAjs.getFunctionParts.call(void 0, input.function);
9953
+ const { moduleAddress, moduleName, functionName } = _chunkJMOQXLEDjs.getFunctionParts.call(void 0, input.function);
10484
9954
  const nodeUrl = this.config.getRequestUrl("Fullnode" /* FULLNODE */);
10485
9955
  await this.builder.load_module(nodeUrl, `${moduleAddress}::${moduleName}`);
10486
9956
  if (input.typeArguments !== void 0) {
10487
- await Promise.all(input.typeArguments.map((typeTag) => this.builder.load_type_tag(nodeUrl, typeTag.toString())));
9957
+ for (const typeArgument of input.typeArguments) {
9958
+ await this.builder.load_type_tag(nodeUrl, typeArgument.toString());
9959
+ }
10488
9960
  }
10489
9961
  const typeArguments = standardizeTypeTags(input.typeArguments);
10490
9962
  const functionAbi = await fetchMoveFunctionAbi(moduleAddress, moduleName, functionName, this.config);
@@ -10504,66 +9976,9 @@ var AptosScriptComposer = class _AptosScriptComposer {
10504
9976
  );
10505
9977
  }
10506
9978
  build() {
10507
- return this.builder.generate_batched_calls(true);
10508
- }
10509
- };
10510
-
10511
- // src/internal/view.ts
10512
- async function view(args) {
10513
- const { aptosConfig, payload, options } = args;
10514
- const viewFunctionPayload = await generateViewFunctionPayload({
10515
- ...payload,
10516
- aptosConfig
10517
- });
10518
- const serializer = new (0, _chunkCSUBLTFAjs.Serializer)();
10519
- viewFunctionPayload.serialize(serializer);
10520
- const bytes = serializer.toUint8Array();
10521
- const { data } = await postAptosFullNode({
10522
- aptosConfig,
10523
- path: "view",
10524
- originMethod: "view",
10525
- contentType: "application/x.aptos.view_function+bcs" /* BCS_VIEW_FUNCTION */,
10526
- params: { ledger_version: _optionalChain([options, 'optionalAccess', _131 => _131.ledgerVersion]) },
10527
- body: bytes
10528
- });
10529
- return data;
10530
- }
10531
- async function viewJson(args) {
10532
- const { aptosConfig, payload, options } = args;
10533
- const { data } = await postAptosFullNode({
10534
- aptosConfig,
10535
- originMethod: "viewJson",
10536
- path: "view",
10537
- params: { ledger_version: _optionalChain([options, 'optionalAccess', _132 => _132.ledgerVersion]) },
10538
- body: {
10539
- function: payload.function,
10540
- type_arguments: _nullishCoalesce(payload.typeArguments, () => ( [])),
10541
- arguments: _nullishCoalesce(payload.functionArguments, () => ( []))
10542
- }
10543
- });
10544
- return data;
10545
- }
10546
-
10547
- // src/internal/coin.ts
10548
- var coinTransferAbi = {
10549
- typeParameters: [{ constraints: [] }],
10550
- parameters: [new TypeTagAddress(), new TypeTagU64()]
9979
+ return this.builder.generate_batched_calls(true);
9980
+ }
10551
9981
  };
10552
- async function transferCoinTransaction(args) {
10553
- const { aptosConfig, sender, recipient, amount, coinType, options } = args;
10554
- const coinStructType = _nullishCoalesce(coinType, () => ( APTOS_COIN));
10555
- return generateTransaction({
10556
- aptosConfig,
10557
- sender,
10558
- data: {
10559
- function: "0x1::aptos_account::transfer_coins",
10560
- typeArguments: [coinStructType],
10561
- functionArguments: [recipient, amount],
10562
- abi: coinTransferAbi
10563
- },
10564
- options
10565
- });
10566
- }
10567
9982
 
10568
9983
  // src/internal/transactionSubmission.ts
10569
9984
  async function generateTransaction(args) {
@@ -10602,7 +10017,7 @@ async function buildRawTransaction(args, payload) {
10602
10017
  const { aptosConfig, sender, options } = args;
10603
10018
  let feePayerAddress;
10604
10019
  if (isFeePayerTransactionInput(args)) {
10605
- feePayerAddress = _chunkCSUBLTFAjs.AccountAddress.ZERO.toString();
10020
+ feePayerAddress = _chunkJMOQXLEDjs.AccountAddress.ZERO.toString();
10606
10021
  }
10607
10022
  if (isMultiAgentTransactionInput(args)) {
10608
10023
  const { secondarySignerAddresses } = args;
@@ -10662,86 +10077,385 @@ async function simulateTransaction(args) {
10662
10077
  body: signedTransaction,
10663
10078
  path: "transactions/simulate",
10664
10079
  params: {
10665
- estimate_gas_unit_price: _nullishCoalesce(_optionalChain([args, 'access', _133 => _133.options, 'optionalAccess', _134 => _134.estimateGasUnitPrice]), () => ( false)),
10666
- estimate_max_gas_amount: _nullishCoalesce(_optionalChain([args, 'access', _135 => _135.options, 'optionalAccess', _136 => _136.estimateMaxGasAmount]), () => ( false)),
10667
- estimate_prioritized_gas_unit_price: _nullishCoalesce(_optionalChain([args, 'access', _137 => _137.options, 'optionalAccess', _138 => _138.estimatePrioritizedGasUnitPrice]), () => ( false))
10080
+ estimate_gas_unit_price: _nullishCoalesce(_optionalChain([args, 'access', _101 => _101.options, 'optionalAccess', _102 => _102.estimateGasUnitPrice]), () => ( false)),
10081
+ estimate_max_gas_amount: _nullishCoalesce(_optionalChain([args, 'access', _103 => _103.options, 'optionalAccess', _104 => _104.estimateMaxGasAmount]), () => ( false)),
10082
+ estimate_prioritized_gas_unit_price: _nullishCoalesce(_optionalChain([args, 'access', _105 => _105.options, 'optionalAccess', _106 => _106.estimatePrioritizedGasUnitPrice]), () => ( false))
10668
10083
  },
10669
10084
  originMethod: "simulateTransaction",
10670
10085
  contentType: "application/x.aptos.signed_transaction+bcs" /* BCS_SIGNED_TRANSACTION */
10671
10086
  });
10672
- return data;
10087
+ return data;
10088
+ }
10089
+ async function submitTransaction(args) {
10090
+ const { aptosConfig } = args;
10091
+ const signedTransaction = generateSignedTransaction({ ...args });
10092
+ try {
10093
+ const { data } = await postAptosFullNode({
10094
+ aptosConfig,
10095
+ body: signedTransaction,
10096
+ path: "transactions",
10097
+ originMethod: "submitTransaction",
10098
+ contentType: "application/x.aptos.signed_transaction+bcs" /* BCS_SIGNED_TRANSACTION */
10099
+ });
10100
+ return data;
10101
+ } catch (e) {
10102
+ const signedTxn = SignedTransaction.deserialize(new Deserializer(signedTransaction));
10103
+ if (signedTxn.authenticator.isSingleSender() && signedTxn.authenticator.sender.isSingleKey() && (signedTxn.authenticator.sender.public_key.publicKey instanceof KeylessPublicKey || signedTxn.authenticator.sender.public_key.publicKey instanceof FederatedKeylessPublicKey)) {
10104
+ await AbstractKeylessAccount.fetchJWK({
10105
+ aptosConfig,
10106
+ publicKey: signedTxn.authenticator.sender.public_key.publicKey,
10107
+ kid: signedTxn.authenticator.sender.signature.signature.getJwkKid()
10108
+ });
10109
+ }
10110
+ throw e;
10111
+ }
10112
+ }
10113
+ async function signAndSubmitTransaction(args) {
10114
+ const { aptosConfig, signer, feePayer, transaction } = args;
10115
+ if (isKeylessSigner(signer)) {
10116
+ await signer.checkKeylessAccountValidity(aptosConfig);
10117
+ }
10118
+ if (isKeylessSigner(feePayer)) {
10119
+ await feePayer.checkKeylessAccountValidity(aptosConfig);
10120
+ }
10121
+ const feePayerAuthenticator = args.feePayerAuthenticator || feePayer && signAsFeePayer({ signer: feePayer, transaction });
10122
+ const senderAuthenticator = signTransaction({ signer, transaction });
10123
+ return submitTransaction({
10124
+ aptosConfig,
10125
+ transaction,
10126
+ senderAuthenticator,
10127
+ feePayerAuthenticator
10128
+ });
10129
+ }
10130
+ async function signAndSubmitAsFeePayer(args) {
10131
+ const { aptosConfig, senderAuthenticator, feePayer, transaction } = args;
10132
+ if (isKeylessSigner(feePayer)) {
10133
+ await feePayer.checkKeylessAccountValidity(aptosConfig);
10134
+ }
10135
+ const feePayerAuthenticator = signAsFeePayer({ signer: feePayer, transaction });
10136
+ return submitTransaction({
10137
+ aptosConfig,
10138
+ transaction,
10139
+ senderAuthenticator,
10140
+ feePayerAuthenticator
10141
+ });
10142
+ }
10143
+ var packagePublishAbi = {
10144
+ typeParameters: [],
10145
+ parameters: [TypeTagVector.u8(), new TypeTagVector(TypeTagVector.u8())]
10146
+ };
10147
+ async function publicPackageTransaction(args) {
10148
+ const { aptosConfig, account, metadataBytes, moduleBytecode, options } = args;
10149
+ const totalByteCode = moduleBytecode.map((bytecode) => MoveVector.U8(bytecode));
10150
+ return generateTransaction({
10151
+ aptosConfig,
10152
+ sender: _chunkJMOQXLEDjs.AccountAddress.from(account),
10153
+ data: {
10154
+ function: "0x1::code::publish_package_txn",
10155
+ functionArguments: [MoveVector.U8(metadataBytes), new MoveVector(totalByteCode)],
10156
+ abi: packagePublishAbi
10157
+ },
10158
+ options
10159
+ });
10160
+ }
10161
+
10162
+ // src/internal/account.ts
10163
+ async function getInfo2(args) {
10164
+ return getInfo(args);
10165
+ }
10166
+ async function getModules2(args) {
10167
+ return getModules(args);
10168
+ }
10169
+ async function getModule2(args) {
10170
+ return getModule(args);
10171
+ }
10172
+ async function getTransactions2(args) {
10173
+ const { aptosConfig, accountAddress, options } = args;
10174
+ return paginateWithCursor({
10175
+ aptosConfig,
10176
+ originMethod: "getTransactions",
10177
+ path: `accounts/${_chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toString()}/transactions`,
10178
+ params: { start: _optionalChain([options, 'optionalAccess', _107 => _107.offset]), limit: _optionalChain([options, 'optionalAccess', _108 => _108.limit]) }
10179
+ });
10180
+ }
10181
+ async function getResources(args) {
10182
+ const { aptosConfig, accountAddress, options } = args;
10183
+ return paginateWithObfuscatedCursor({
10184
+ aptosConfig,
10185
+ originMethod: "getResources",
10186
+ path: `accounts/${_chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toString()}/resources`,
10187
+ params: {
10188
+ ledger_version: _optionalChain([options, 'optionalAccess', _109 => _109.ledgerVersion]),
10189
+ offset: _optionalChain([options, 'optionalAccess', _110 => _110.offset]),
10190
+ limit: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _111 => _111.limit]), () => ( 999))
10191
+ }
10192
+ });
10193
+ }
10194
+ async function getResource(args) {
10195
+ const { aptosConfig, accountAddress, resourceType, options } = args;
10196
+ const { data } = await getAptosFullNode({
10197
+ aptosConfig,
10198
+ originMethod: "getResource",
10199
+ path: `accounts/${_chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toString()}/resource/${resourceType}`,
10200
+ params: { ledger_version: _optionalChain([options, 'optionalAccess', _112 => _112.ledgerVersion]) }
10201
+ });
10202
+ return data.data;
10203
+ }
10204
+ async function lookupOriginalAccountAddress(args) {
10205
+ const { aptosConfig, authenticationKey, options } = args;
10206
+ const resource = await getResource({
10207
+ aptosConfig,
10208
+ accountAddress: "0x1",
10209
+ resourceType: "0x1::account::OriginatingAddress",
10210
+ options
10211
+ });
10212
+ const {
10213
+ address_map: { handle }
10214
+ } = resource;
10215
+ const authKeyAddress = _chunkJMOQXLEDjs.AccountAddress.from(authenticationKey);
10216
+ try {
10217
+ const originalAddress = await getTableItem({
10218
+ aptosConfig,
10219
+ handle,
10220
+ data: {
10221
+ key: authKeyAddress.toString(),
10222
+ key_type: "address",
10223
+ value_type: "address"
10224
+ },
10225
+ options
10226
+ });
10227
+ return _chunkJMOQXLEDjs.AccountAddress.from(originalAddress);
10228
+ } catch (err) {
10229
+ if (err instanceof AptosApiError && err.data.error_code === "table_item_not_found") {
10230
+ return authKeyAddress;
10231
+ }
10232
+ throw err;
10233
+ }
10234
+ }
10235
+ async function getAccountTokensCount(args) {
10236
+ const { aptosConfig, accountAddress } = args;
10237
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toStringLong();
10238
+ const whereCondition = {
10239
+ owner_address: { _eq: address },
10240
+ amount: { _gt: 0 }
10241
+ };
10242
+ const graphqlQuery = {
10243
+ query: GetAccountTokensCount,
10244
+ variables: { where_condition: whereCondition }
10245
+ };
10246
+ const data = await queryIndexer({
10247
+ aptosConfig,
10248
+ query: graphqlQuery,
10249
+ originMethod: "getAccountTokensCount"
10250
+ });
10251
+ return data.current_token_ownerships_v2_aggregate.aggregate ? data.current_token_ownerships_v2_aggregate.aggregate.count : 0;
10252
+ }
10253
+ async function getAccountOwnedTokens(args) {
10254
+ const { aptosConfig, accountAddress, options } = args;
10255
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toStringLong();
10256
+ const whereCondition = {
10257
+ owner_address: { _eq: address },
10258
+ amount: { _gt: 0 }
10259
+ };
10260
+ if (_optionalChain([options, 'optionalAccess', _113 => _113.tokenStandard])) {
10261
+ whereCondition.token_standard = { _eq: _optionalChain([options, 'optionalAccess', _114 => _114.tokenStandard]) };
10262
+ }
10263
+ const graphqlQuery = {
10264
+ query: GetAccountOwnedTokens,
10265
+ variables: {
10266
+ where_condition: whereCondition,
10267
+ offset: _optionalChain([options, 'optionalAccess', _115 => _115.offset]),
10268
+ limit: _optionalChain([options, 'optionalAccess', _116 => _116.limit]),
10269
+ order_by: _optionalChain([options, 'optionalAccess', _117 => _117.orderBy])
10270
+ }
10271
+ };
10272
+ const data = await queryIndexer({
10273
+ aptosConfig,
10274
+ query: graphqlQuery,
10275
+ originMethod: "getAccountOwnedTokens"
10276
+ });
10277
+ return data.current_token_ownerships_v2;
10278
+ }
10279
+ async function getAccountOwnedTokensFromCollectionAddress(args) {
10280
+ const { aptosConfig, accountAddress, collectionAddress, options } = args;
10281
+ const ownerAddress = _chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toStringLong();
10282
+ const collAddress = _chunkJMOQXLEDjs.AccountAddress.from(collectionAddress).toStringLong();
10283
+ const whereCondition = {
10284
+ owner_address: { _eq: ownerAddress },
10285
+ current_token_data: { collection_id: { _eq: collAddress } },
10286
+ amount: { _gt: 0 }
10287
+ };
10288
+ if (_optionalChain([options, 'optionalAccess', _118 => _118.tokenStandard])) {
10289
+ whereCondition.token_standard = { _eq: _optionalChain([options, 'optionalAccess', _119 => _119.tokenStandard]) };
10290
+ }
10291
+ const graphqlQuery = {
10292
+ query: GetAccountOwnedTokensFromCollection,
10293
+ variables: {
10294
+ where_condition: whereCondition,
10295
+ offset: _optionalChain([options, 'optionalAccess', _120 => _120.offset]),
10296
+ limit: _optionalChain([options, 'optionalAccess', _121 => _121.limit]),
10297
+ order_by: _optionalChain([options, 'optionalAccess', _122 => _122.orderBy])
10298
+ }
10299
+ };
10300
+ const data = await queryIndexer({
10301
+ aptosConfig,
10302
+ query: graphqlQuery,
10303
+ originMethod: "getAccountOwnedTokensFromCollectionAddress"
10304
+ });
10305
+ return data.current_token_ownerships_v2;
10306
+ }
10307
+ async function getAccountCollectionsWithOwnedTokens(args) {
10308
+ const { aptosConfig, accountAddress, options } = args;
10309
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toStringLong();
10310
+ const whereCondition = {
10311
+ owner_address: { _eq: address }
10312
+ };
10313
+ if (_optionalChain([options, 'optionalAccess', _123 => _123.tokenStandard])) {
10314
+ whereCondition.current_collection = {
10315
+ token_standard: { _eq: _optionalChain([options, 'optionalAccess', _124 => _124.tokenStandard]) }
10316
+ };
10317
+ }
10318
+ const graphqlQuery = {
10319
+ query: GetAccountCollectionsWithOwnedTokens,
10320
+ variables: {
10321
+ where_condition: whereCondition,
10322
+ offset: _optionalChain([options, 'optionalAccess', _125 => _125.offset]),
10323
+ limit: _optionalChain([options, 'optionalAccess', _126 => _126.limit]),
10324
+ order_by: _optionalChain([options, 'optionalAccess', _127 => _127.orderBy])
10325
+ }
10326
+ };
10327
+ const data = await queryIndexer({
10328
+ aptosConfig,
10329
+ query: graphqlQuery,
10330
+ originMethod: "getAccountCollectionsWithOwnedTokens"
10331
+ });
10332
+ return data.current_collection_ownership_v2_view;
10333
+ }
10334
+ async function getAccountTransactionsCount(args) {
10335
+ const { aptosConfig, accountAddress } = args;
10336
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toStringLong();
10337
+ const graphqlQuery = {
10338
+ query: GetAccountTransactionsCount,
10339
+ variables: { address }
10340
+ };
10341
+ const data = await queryIndexer({
10342
+ aptosConfig,
10343
+ query: graphqlQuery,
10344
+ originMethod: "getAccountTransactionsCount"
10345
+ });
10346
+ return data.account_transactions_aggregate.aggregate ? data.account_transactions_aggregate.aggregate.count : 0;
10347
+ }
10348
+ async function getAccountCoinsData(args) {
10349
+ const { aptosConfig, accountAddress, options } = args;
10350
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toStringLong();
10351
+ const whereCondition = {
10352
+ ..._optionalChain([options, 'optionalAccess', _128 => _128.where]),
10353
+ owner_address: { _eq: address }
10354
+ };
10355
+ const graphqlQuery = {
10356
+ query: GetAccountCoinsData,
10357
+ variables: {
10358
+ where_condition: whereCondition,
10359
+ offset: _optionalChain([options, 'optionalAccess', _129 => _129.offset]),
10360
+ limit: _optionalChain([options, 'optionalAccess', _130 => _130.limit]),
10361
+ order_by: _optionalChain([options, 'optionalAccess', _131 => _131.orderBy])
10362
+ }
10363
+ };
10364
+ const data = await queryIndexer({
10365
+ aptosConfig,
10366
+ query: graphqlQuery,
10367
+ originMethod: "getAccountCoinsData"
10368
+ });
10369
+ return data.current_fungible_asset_balances;
10673
10370
  }
10674
- async function submitTransaction(args) {
10675
- const { aptosConfig } = args;
10676
- const signedTransaction = generateSignedTransaction({ ...args });
10677
- try {
10678
- const { data } = await postAptosFullNode({
10679
- aptosConfig,
10680
- body: signedTransaction,
10681
- path: "transactions",
10682
- originMethod: "submitTransaction",
10683
- contentType: "application/x.aptos.signed_transaction+bcs" /* BCS_SIGNED_TRANSACTION */
10684
- });
10685
- return data;
10686
- } catch (e) {
10687
- const signedTxn = SignedTransaction.deserialize(new Deserializer(signedTransaction));
10688
- if (signedTxn.authenticator.isSingleSender() && signedTxn.authenticator.sender.isSingleKey() && (signedTxn.authenticator.sender.public_key.publicKey instanceof KeylessPublicKey || signedTxn.authenticator.sender.public_key.publicKey instanceof FederatedKeylessPublicKey)) {
10689
- await AbstractKeylessAccount.fetchJWK({
10690
- aptosConfig,
10691
- publicKey: signedTxn.authenticator.sender.public_key.publicKey,
10692
- kid: signedTxn.authenticator.sender.signature.signature.getJwkKid()
10693
- });
10694
- }
10695
- throw e;
10371
+ async function getAccountCoinsCount(args) {
10372
+ const { aptosConfig, accountAddress } = args;
10373
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toStringLong();
10374
+ const graphqlQuery = {
10375
+ query: GetAccountCoinsCount,
10376
+ variables: { address }
10377
+ };
10378
+ const data = await queryIndexer({
10379
+ aptosConfig,
10380
+ query: graphqlQuery,
10381
+ originMethod: "getAccountCoinsCount"
10382
+ });
10383
+ if (!data.current_fungible_asset_balances_aggregate.aggregate) {
10384
+ throw Error("Failed to get the count of account coins");
10696
10385
  }
10386
+ return data.current_fungible_asset_balances_aggregate.aggregate.count;
10697
10387
  }
10698
- async function signAndSubmitTransaction(args) {
10699
- const { aptosConfig, signer, feePayer, transaction } = args;
10700
- if (isKeylessSigner(signer)) {
10701
- await signer.checkKeylessAccountValidity(aptosConfig);
10702
- }
10703
- if (isKeylessSigner(feePayer)) {
10704
- await feePayer.checkKeylessAccountValidity(aptosConfig);
10705
- }
10706
- const feePayerAuthenticator = args.feePayerAuthenticator || feePayer && signAsFeePayer({ signer: feePayer, transaction });
10707
- const senderAuthenticator = signTransaction({ signer, transaction });
10708
- return submitTransaction({
10388
+ async function getAccountOwnedObjects(args) {
10389
+ const { aptosConfig, accountAddress, options } = args;
10390
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toStringLong();
10391
+ const whereCondition = {
10392
+ owner_address: { _eq: address }
10393
+ };
10394
+ const graphqlQuery = {
10395
+ query: GetObjectData,
10396
+ variables: {
10397
+ where_condition: whereCondition,
10398
+ offset: _optionalChain([options, 'optionalAccess', _132 => _132.offset]),
10399
+ limit: _optionalChain([options, 'optionalAccess', _133 => _133.limit]),
10400
+ order_by: _optionalChain([options, 'optionalAccess', _134 => _134.orderBy])
10401
+ }
10402
+ };
10403
+ const data = await queryIndexer({
10709
10404
  aptosConfig,
10710
- transaction,
10711
- senderAuthenticator,
10712
- feePayerAuthenticator
10405
+ query: graphqlQuery,
10406
+ originMethod: "getAccountOwnedObjects"
10713
10407
  });
10408
+ return data.current_objects;
10714
10409
  }
10715
- async function signAndSubmitAsFeePayer(args) {
10716
- const { aptosConfig, senderAuthenticator, feePayer, transaction } = args;
10717
- if (isKeylessSigner(feePayer)) {
10718
- await feePayer.checkKeylessAccountValidity(aptosConfig);
10410
+ async function deriveAccountFromPrivateKey(args) {
10411
+ const { aptosConfig, privateKey } = args;
10412
+ const publicKey = new AnyPublicKey(privateKey.publicKey());
10413
+ if (privateKey instanceof Secp256k1PrivateKey) {
10414
+ const authKey = AuthenticationKey.fromPublicKey({ publicKey });
10415
+ const address = authKey.derivedAddress();
10416
+ return Account.fromPrivateKey({ privateKey, address });
10719
10417
  }
10720
- const feePayerAuthenticator = signAsFeePayer({ signer: feePayer, transaction });
10721
- return submitTransaction({
10722
- aptosConfig,
10723
- transaction,
10724
- senderAuthenticator,
10725
- feePayerAuthenticator
10726
- });
10418
+ if (privateKey instanceof Ed25519PrivateKey) {
10419
+ const singleSenderTransactionAuthenticatorAuthKey = AuthenticationKey.fromPublicKey({
10420
+ publicKey
10421
+ });
10422
+ const isSingleSenderTransactionAuthenticator = await isAccountExist({
10423
+ authKey: singleSenderTransactionAuthenticatorAuthKey,
10424
+ aptosConfig
10425
+ });
10426
+ if (isSingleSenderTransactionAuthenticator) {
10427
+ const address = singleSenderTransactionAuthenticatorAuthKey.derivedAddress();
10428
+ return Account.fromPrivateKey({ privateKey, address, legacy: false });
10429
+ }
10430
+ const legacyAuthKey = AuthenticationKey.fromPublicKey({
10431
+ publicKey: publicKey.publicKey
10432
+ });
10433
+ const isLegacyEd25519 = await isAccountExist({ authKey: legacyAuthKey, aptosConfig });
10434
+ if (isLegacyEd25519) {
10435
+ const address = legacyAuthKey.derivedAddress();
10436
+ return Account.fromPrivateKey({ privateKey, address, legacy: true });
10437
+ }
10438
+ }
10439
+ throw new Error(`Can't derive account from private key ${privateKey}`);
10727
10440
  }
10728
- var packagePublishAbi = {
10729
- typeParameters: [],
10730
- parameters: [TypeTagVector.u8(), new TypeTagVector(TypeTagVector.u8())]
10731
- };
10732
- async function publicPackageTransaction(args) {
10733
- const { aptosConfig, account, metadataBytes, moduleBytecode, options } = args;
10734
- const totalByteCode = moduleBytecode.map((bytecode) => MoveVector.U8(bytecode));
10735
- return generateTransaction({
10441
+ async function isAccountExist(args) {
10442
+ const { aptosConfig, authKey } = args;
10443
+ const accountAddress = await lookupOriginalAccountAddress({
10736
10444
  aptosConfig,
10737
- sender: _chunkCSUBLTFAjs.AccountAddress.from(account),
10738
- data: {
10739
- function: "0x1::code::publish_package_txn",
10740
- functionArguments: [MoveVector.U8(metadataBytes), new MoveVector(totalByteCode)],
10741
- abi: packagePublishAbi
10742
- },
10743
- options
10445
+ authenticationKey: authKey.derivedAddress()
10744
10446
  });
10447
+ try {
10448
+ await getInfo2({
10449
+ aptosConfig,
10450
+ accountAddress
10451
+ });
10452
+ return true;
10453
+ } catch (error) {
10454
+ if (error.status === 404) {
10455
+ return false;
10456
+ }
10457
+ throw new Error(`Error while looking for an account info ${accountAddress.toString()}`);
10458
+ }
10745
10459
  }
10746
10460
  var rotateAuthKeyAbi = {
10747
10461
  typeParameters: [],
@@ -10754,26 +10468,80 @@ var rotateAuthKeyAbi = {
10754
10468
  TypeTagVector.u8()
10755
10469
  ]
10756
10470
  };
10757
- var rotateAuthKeyUnverifiedAbi = {
10758
- typeParameters: [],
10759
- parameters: [TypeTagVector.u8()]
10760
- };
10761
10471
  async function rotateAuthKey(args) {
10762
- const { aptosConfig, fromAccount, toNewPrivateKey } = args;
10763
- const accountInfo = await getInfo({
10472
+ const { aptosConfig, fromAccount, dangerouslySkipVerification } = args;
10473
+ if ("toNewPrivateKey" in args) {
10474
+ return rotateAuthKeyWithChallenge({
10475
+ aptosConfig,
10476
+ fromAccount,
10477
+ toNewPrivateKey: args.toNewPrivateKey
10478
+ });
10479
+ }
10480
+ let authKey;
10481
+ if ("toAccount" in args) {
10482
+ if (args.toAccount instanceof Ed25519Account) {
10483
+ return rotateAuthKeyWithChallenge({ aptosConfig, fromAccount, toNewPrivateKey: args.toAccount.privateKey });
10484
+ }
10485
+ if (args.toAccount instanceof MultiEd25519Account) {
10486
+ return rotateAuthKeyWithChallenge({ aptosConfig, fromAccount, toAccount: args.toAccount });
10487
+ }
10488
+ authKey = args.toAccount.publicKey.authKey();
10489
+ } else if ("toAuthKey" in args) {
10490
+ authKey = args.toAuthKey;
10491
+ } else {
10492
+ throw new Error("Invalid arguments");
10493
+ }
10494
+ const pendingTxn = await rotateAuthKeyUnverified({
10495
+ aptosConfig,
10496
+ fromAccount,
10497
+ toAuthKey: authKey
10498
+ });
10499
+ if (dangerouslySkipVerification === true) {
10500
+ return pendingTxn;
10501
+ }
10502
+ const rotateAuthKeyTxnResponse = await waitForTransaction({
10503
+ aptosConfig,
10504
+ transactionHash: pendingTxn.hash
10505
+ });
10506
+ if (!rotateAuthKeyTxnResponse.success) {
10507
+ throw new Error(`Failed to rotate authentication key - ${rotateAuthKeyTxnResponse}`);
10508
+ }
10509
+ const verificationTxn = await generateTransaction({
10510
+ aptosConfig,
10511
+ sender: fromAccount.accountAddress,
10512
+ data: {
10513
+ function: "0x1::account::set_originating_address",
10514
+ functionArguments: []
10515
+ }
10516
+ });
10517
+ return signAndSubmitTransaction({
10518
+ aptosConfig,
10519
+ signer: args.toAccount,
10520
+ // Use the new account to sign
10521
+ transaction: verificationTxn
10522
+ });
10523
+ }
10524
+ async function rotateAuthKeyWithChallenge(args) {
10525
+ const { aptosConfig, fromAccount } = args;
10526
+ const accountInfo = await getInfo2({
10764
10527
  aptosConfig,
10765
10528
  accountAddress: fromAccount.accountAddress
10766
10529
  });
10767
- const newAccount = Account.fromPrivateKey({ privateKey: toNewPrivateKey, legacy: true });
10530
+ let newAccount;
10531
+ if ("toNewPrivateKey" in args) {
10532
+ newAccount = Account.fromPrivateKey({ privateKey: args.toNewPrivateKey, legacy: true });
10533
+ } else {
10534
+ newAccount = args.toAccount;
10535
+ }
10768
10536
  const challenge = new RotationProofChallenge({
10769
10537
  sequenceNumber: BigInt(accountInfo.sequence_number),
10770
10538
  originator: fromAccount.accountAddress,
10771
- currentAuthKey: _chunkCSUBLTFAjs.AccountAddress.from(accountInfo.authentication_key),
10539
+ currentAuthKey: _chunkJMOQXLEDjs.AccountAddress.from(accountInfo.authentication_key),
10772
10540
  newPublicKey: newAccount.publicKey
10773
10541
  });
10774
10542
  const challengeHex = challenge.bcsToBytes();
10775
- const proofSignedByCurrentPrivateKey = fromAccount.sign(challengeHex);
10776
- const proofSignedByNewPrivateKey = newAccount.sign(challengeHex);
10543
+ const proofSignedByCurrentKey = fromAccount.sign(challengeHex);
10544
+ const proofSignedByNewKey = newAccount.sign(challengeHex);
10777
10545
  const rawTxn = await generateTransaction({
10778
10546
  aptosConfig,
10779
10547
  sender: fromAccount.accountAddress,
@@ -10786,106 +10554,344 @@ async function rotateAuthKey(args) {
10786
10554
  new U8(newAccount.signingScheme),
10787
10555
  // to scheme
10788
10556
  MoveVector.U8(newAccount.publicKey.toUint8Array()),
10789
- MoveVector.U8(proofSignedByCurrentPrivateKey.toUint8Array()),
10790
- MoveVector.U8(proofSignedByNewPrivateKey.toUint8Array())
10557
+ MoveVector.U8(proofSignedByCurrentKey.toUint8Array()),
10558
+ MoveVector.U8(proofSignedByNewKey.toUint8Array())
10791
10559
  ],
10792
10560
  abi: rotateAuthKeyAbi
10793
10561
  }
10794
- });
10795
- return signAndSubmitTransaction({
10796
- aptosConfig,
10797
- signer: fromAccount,
10798
- transaction: rawTxn
10799
- });
10562
+ });
10563
+ return signAndSubmitTransaction({
10564
+ aptosConfig,
10565
+ signer: fromAccount,
10566
+ transaction: rawTxn
10567
+ });
10568
+ }
10569
+ var rotateAuthKeyUnverifiedAbi = {
10570
+ typeParameters: [],
10571
+ parameters: [TypeTagVector.u8()]
10572
+ };
10573
+ async function rotateAuthKeyUnverified(args) {
10574
+ const { aptosConfig, fromAccount, toAuthKey } = args;
10575
+ const authKey = toAuthKey;
10576
+ const rawTxn = await generateTransaction({
10577
+ aptosConfig,
10578
+ sender: fromAccount.accountAddress,
10579
+ data: {
10580
+ function: "0x1::account::rotate_authentication_key_call",
10581
+ functionArguments: [MoveVector.U8(authKey.toUint8Array())],
10582
+ abi: rotateAuthKeyUnverifiedAbi
10583
+ }
10584
+ });
10585
+ return signAndSubmitTransaction({
10586
+ aptosConfig,
10587
+ signer: fromAccount,
10588
+ transaction: rawTxn
10589
+ });
10590
+ }
10591
+ async function getMultiKeysForAuthenticationKeys(args) {
10592
+ const { aptosConfig, authKeys } = args;
10593
+ if (authKeys.length === 0) {
10594
+ throw new Error("No authentication keys provided");
10595
+ }
10596
+ const whereCondition = {
10597
+ auth_key: { _in: authKeys.map((authKey) => authKey.toString()) }
10598
+ };
10599
+ const graphqlQuery = {
10600
+ query: GetMultiKeyForAuthKey,
10601
+ variables: {
10602
+ where_condition: whereCondition
10603
+ }
10604
+ };
10605
+ const { auth_key_multikey_layout: data } = await queryIndexer({
10606
+ aptosConfig,
10607
+ query: graphqlQuery,
10608
+ originMethod: "getMultiKeysForAuthenticationKeys"
10609
+ });
10610
+ const authKeyToMultiKey = new Map(data.map((entry) => [entry.auth_key, entry]));
10611
+ const result = [];
10612
+ for (let i = 0; i < authKeys.length; i += 1) {
10613
+ const entry = authKeyToMultiKey.get(authKeys[i].toString());
10614
+ if (!entry) {
10615
+ throw new Error(`Failed to find multikey for authentication key ${authKeys[i]}`);
10616
+ }
10617
+ const publicKey = extractMultiKeyFromData(entry);
10618
+ result.push({ authKey: authKeys[i], publicKey });
10619
+ }
10620
+ return result;
10621
+ }
10622
+ function extractMultiKeyFromData(data) {
10623
+ const signaturesRequired = data.signatures_required;
10624
+ const multikeyLayout = data.multikey_layout_with_prefixes;
10625
+ const multikeyType = data.multikey_type;
10626
+ if (multikeyType === "multi_ed25519") {
10627
+ const ed25519PublicKeys = [];
10628
+ for (const key of multikeyLayout) {
10629
+ ed25519PublicKeys.push(new Ed25519PublicKey(key));
10630
+ }
10631
+ return new MultiEd25519PublicKey({
10632
+ publicKeys: ed25519PublicKeys,
10633
+ threshold: signaturesRequired
10634
+ });
10635
+ }
10636
+ if (multikeyType === "multi_key") {
10637
+ const publicKeys = [];
10638
+ for (const key of multikeyLayout) {
10639
+ const deserializer = Deserializer.fromHex(key);
10640
+ const variantIndex = deserializer.deserializeUleb128AsU32();
10641
+ let publicKey;
10642
+ switch (variantIndex) {
10643
+ case 0 /* Ed25519 */:
10644
+ publicKey = new Ed25519PublicKey(deserializer.deserializeFixedBytes(32));
10645
+ break;
10646
+ case 1 /* Secp256k1 */:
10647
+ publicKey = new Secp256k1PublicKey(deserializer.deserializeFixedBytes(65));
10648
+ break;
10649
+ case 3 /* Keyless */:
10650
+ publicKey = KeylessPublicKey.deserialize(deserializer);
10651
+ break;
10652
+ case 4 /* FederatedKeyless */:
10653
+ publicKey = FederatedKeylessPublicKey.deserialize(deserializer);
10654
+ break;
10655
+ default:
10656
+ throw new Error(`Unknown variant index for AnyPublicKey: ${variantIndex}`);
10657
+ }
10658
+ publicKeys.push(new AnyPublicKey(publicKey));
10659
+ }
10660
+ return new MultiKey({
10661
+ publicKeys,
10662
+ signaturesRequired
10663
+ });
10664
+ }
10665
+ throw new Error("Unknown multikey type");
10800
10666
  }
10801
- async function rotateAuthKeyToMultiEd25519(args) {
10802
- const { aptosConfig, fromAccount, multiEd25519Account } = args;
10803
- const accountInfo = await getInfo({
10667
+ async function getAuthKeysForPublicKey(args) {
10668
+ const { aptosConfig, publicKey, options } = args;
10669
+ const verified = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _135 => _135.verified]), () => ( true));
10670
+ let baseKey = publicKey;
10671
+ if (publicKey instanceof AnyPublicKey) {
10672
+ baseKey = publicKey.publicKey;
10673
+ }
10674
+ const whereCondition = {
10675
+ public_key: { _eq: baseKey.toString() },
10676
+ verified: { _eq: verified }
10677
+ };
10678
+ const graphqlQuery = {
10679
+ query: GetAuthKeysForPublicKey,
10680
+ variables: {
10681
+ where_condition: whereCondition
10682
+ }
10683
+ };
10684
+ const { public_key_auth_keys: data } = await queryIndexer({
10804
10685
  aptosConfig,
10805
- accountAddress: fromAccount.accountAddress
10806
- });
10807
- const newAccount = multiEd25519Account;
10808
- const challenge = new RotationProofChallenge({
10809
- sequenceNumber: BigInt(accountInfo.sequence_number),
10810
- originator: fromAccount.accountAddress,
10811
- currentAuthKey: _chunkCSUBLTFAjs.AccountAddress.from(accountInfo.authentication_key),
10812
- newPublicKey: newAccount.publicKey
10686
+ query: graphqlQuery,
10687
+ originMethod: "getAuthKeysForPublicKey"
10813
10688
  });
10814
- const challengeHex = challenge.bcsToBytes();
10815
- const proofSignedByCurrentPrivateKey = fromAccount.sign(challengeHex);
10816
- const proofSignedByNewPrivateKey = newAccount.sign(challengeHex);
10817
- const rawTxn = await generateTransaction({
10818
- aptosConfig,
10819
- sender: fromAccount.accountAddress,
10820
- data: {
10821
- function: "0x1::account::rotate_authentication_key",
10822
- functionArguments: [
10823
- new U8(fromAccount.signingScheme),
10824
- // from scheme
10825
- MoveVector.U8(fromAccount.publicKey.toUint8Array()),
10826
- new U8(newAccount.signingScheme),
10827
- // to scheme
10828
- MoveVector.U8(newAccount.publicKey.toUint8Array()),
10829
- MoveVector.U8(proofSignedByCurrentPrivateKey.toUint8Array()),
10830
- MoveVector.U8(proofSignedByNewPrivateKey.toUint8Array())
10831
- ],
10832
- abi: rotateAuthKeyAbi
10689
+ const sortedData = data.sort((a, b) => Number(b.last_transaction_version) - Number(a.last_transaction_version));
10690
+ const authKeys = sortedData.map((entry) => new AuthenticationKey({ data: entry.auth_key }));
10691
+ return authKeys;
10692
+ }
10693
+ async function getLastestTransactionVersionForAddress(args) {
10694
+ const { aptosConfig, accountAddress } = args;
10695
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toString();
10696
+ const whereCondition = {
10697
+ signer: { _eq: accountAddress.toString() }
10698
+ };
10699
+ const graphqlQuery = {
10700
+ query: GetSignatures,
10701
+ variables: {
10702
+ where_condition: whereCondition,
10703
+ limit: 1,
10704
+ order_by: { transaction_version: "desc" }
10833
10705
  }
10834
- });
10835
- return signAndSubmitTransaction({
10706
+ };
10707
+ const { signatures: data } = await queryIndexer({
10836
10708
  aptosConfig,
10837
- signer: fromAccount,
10838
- transaction: rawTxn
10709
+ query: graphqlQuery,
10710
+ originMethod: "getSignatures"
10839
10711
  });
10712
+ if (data.length !== 1) {
10713
+ throw new Error(`No signatures found for address ${address}`);
10714
+ }
10715
+ return Number(data[0].transaction_version);
10840
10716
  }
10841
- async function rotateAuthKeyWithVerificationTransaction(args) {
10842
- const { aptosConfig, fromAccount, toAccount } = args;
10843
- const rawTxn = await generateTransaction({
10844
- aptosConfig,
10845
- sender: fromAccount.accountAddress,
10846
- data: {
10847
- function: "0x1::account::rotate_authentication_key_call",
10848
- functionArguments: [MoveVector.U8(toAccount.publicKey.authKey().toUint8Array())],
10849
- abi: rotateAuthKeyUnverifiedAbi
10717
+ async function getAccountAddressesForAuthKeys(args) {
10718
+ const { aptosConfig, options, authKeys } = args;
10719
+ const verified = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _136 => _136.verified]), () => ( true));
10720
+ if (authKeys.length === 0) {
10721
+ throw new Error("No authentication keys provided");
10722
+ }
10723
+ const whereCondition = {
10724
+ auth_key: { _in: authKeys.map((authKey) => authKey.toString()) },
10725
+ verified: { _eq: verified }
10726
+ };
10727
+ const graphqlQuery = {
10728
+ query: GetAccountAddressesForAuthKey,
10729
+ variables: {
10730
+ where_condition: whereCondition
10850
10731
  }
10851
- });
10852
- const pendingTxn = await signAndSubmitTransaction({
10732
+ };
10733
+ const { auth_key_account_addresses: data } = await queryIndexer({
10853
10734
  aptosConfig,
10854
- signer: fromAccount,
10855
- transaction: rawTxn
10735
+ query: graphqlQuery,
10736
+ originMethod: "getAccountAddressesForAuthKeys"
10856
10737
  });
10857
- const txnResponse = await waitForTransaction({
10858
- aptosConfig,
10859
- transactionHash: pendingTxn.hash
10738
+ return data.map((entry) => ({
10739
+ authKey: new AuthenticationKey({ data: entry.auth_key }),
10740
+ accountAddress: new (0, _chunkJMOQXLEDjs.AccountAddress)(_chunkJMOQXLEDjs.Hex.hexInputToUint8Array(entry.address)),
10741
+ verified: entry.verified,
10742
+ lastTransactionVersion: Number(entry.last_transaction_version)
10743
+ }));
10744
+ }
10745
+ async function getAccountsForPublicKey(args) {
10746
+ const { aptosConfig, publicKey } = args;
10747
+ let baseKey = publicKey;
10748
+ if (publicKey instanceof AnyPublicKey) {
10749
+ baseKey = publicKey.publicKey;
10750
+ }
10751
+ const singleKeyPublicKeys = [];
10752
+ if (baseKey instanceof Ed25519PublicKey) {
10753
+ singleKeyPublicKeys.push(baseKey);
10754
+ }
10755
+ const anyPublicKey = new AnyPublicKey(baseKey);
10756
+ singleKeyPublicKeys.push(anyPublicKey);
10757
+ const singleKeyAuthKeyPublicKeyPairs = singleKeyPublicKeys.map((pubKey) => {
10758
+ const authKey = pubKey.authKey();
10759
+ return { authKey, publicKey: pubKey };
10860
10760
  });
10861
- if (!txnResponse.success) {
10862
- throw new Error(`Failed to rotate authentication key - ${txnResponse}`);
10761
+ const multiKeyAuthKeys = await getAuthKeysForPublicKey({ aptosConfig, publicKey });
10762
+ const [multiKeyPairs, authKeyAccountAddressPairs] = await Promise.all([
10763
+ getMultiKeysForAuthenticationKeys({ aptosConfig, authKeys: multiKeyAuthKeys }),
10764
+ getAccountAddressesForAuthKeys({
10765
+ aptosConfig,
10766
+ authKeys: multiKeyAuthKeys.concat(singleKeyAuthKeyPublicKeyPairs.map((pair) => pair.publicKey.authKey()))
10767
+ })
10768
+ ]);
10769
+ const authKeyPublicKeyPairs = singleKeyAuthKeyPublicKeyPairs.concat(multiKeyPairs);
10770
+ const result = [];
10771
+ const authKeyToPublicKey = new Map(authKeyPublicKeyPairs.map((pair) => [pair.authKey.toString(), pair.publicKey]));
10772
+ for (const authKeyAccountAddressPair of authKeyAccountAddressPairs) {
10773
+ if (!authKeyToPublicKey.has(authKeyAccountAddressPair.authKey.toString())) {
10774
+ throw new Error(`No publicKey found for authentication key ${authKeyAccountAddressPair.authKey}.`);
10775
+ }
10776
+ result.push({
10777
+ accountAddress: authKeyAccountAddressPair.accountAddress,
10778
+ publicKey: authKeyToPublicKey.get(authKeyAccountAddressPair.authKey.toString()),
10779
+ verified: authKeyAccountAddressPair.verified,
10780
+ lastTransactionVersion: authKeyAccountAddressPair.lastTransactionVersion
10781
+ });
10863
10782
  }
10864
- const coinTxn = await transferCoinTransaction({
10783
+ return result;
10784
+ }
10785
+ async function getPublicKeyFromAccountAddress(args) {
10786
+ const { aptosConfig, accountAddress } = args;
10787
+ const accountData = await getInfo2({ aptosConfig, accountAddress });
10788
+ const lastTransactionVersion = await getLastestTransactionVersionForAddress({
10865
10789
  aptosConfig,
10866
- sender: toAccount.accountAddress,
10867
- recipient: toAccount.accountAddress,
10868
- amount: 1
10790
+ accountAddress
10791
+ });
10792
+ console.log("lastTransactionVersion", lastTransactionVersion);
10793
+ const transaction = await getTransactionByVersion({ aptosConfig, ledgerVersion: lastTransactionVersion });
10794
+ if (!_chunkJMOQXLEDjs.isUserTransactionResponse.call(void 0, transaction)) {
10795
+ throw new Error("Transaction is not a user transaction");
10796
+ }
10797
+ const { signature } = transaction;
10798
+ if (!signature) {
10799
+ throw new Error("Transaction has no signature");
10800
+ }
10801
+ let publicKey;
10802
+ if (_chunkJMOQXLEDjs.isEd25519Signature.call(void 0, signature)) {
10803
+ publicKey = new Ed25519PublicKey(signature.public_key);
10804
+ } else if (_chunkJMOQXLEDjs.isMultiEd25519Signature.call(void 0, signature)) {
10805
+ publicKey = new MultiEd25519PublicKey({
10806
+ publicKeys: signature.public_keys.map((pk) => new Ed25519PublicKey(pk)),
10807
+ threshold: signature.threshold
10808
+ });
10809
+ } else if (_chunkJMOQXLEDjs.isSingleSenderSingleKeySignature.call(void 0, signature)) {
10810
+ publicKey = parsePublicKey(signature.public_key);
10811
+ } else if (_chunkJMOQXLEDjs.isSingleSenderMultiKeySignature.call(void 0, signature)) {
10812
+ const publicKeys = [];
10813
+ for (const pk of signature.public_keys) {
10814
+ publicKeys.push(parsePublicKey(pk));
10815
+ }
10816
+ publicKey = new MultiKey({
10817
+ publicKeys,
10818
+ signaturesRequired: signature.signatures_required
10819
+ });
10820
+ } else {
10821
+ throw new Error("Unknown signature type");
10822
+ }
10823
+ if (publicKey.authKey().toString() !== accountData.authentication_key) {
10824
+ throw new Error(
10825
+ "Derived public key does not match authentication key. The most recent signature was likely a key rotation."
10826
+ );
10827
+ }
10828
+ return publicKey;
10829
+ }
10830
+ function parsePublicKey(data) {
10831
+ if (data.type === "keyless") {
10832
+ const deserializer = Deserializer.fromHex(data.value);
10833
+ return new AnyPublicKey(KeylessPublicKey.deserialize(deserializer));
10834
+ }
10835
+ if (data.type === "ed25519") {
10836
+ return new AnyPublicKey(new Ed25519PublicKey(data.value));
10837
+ }
10838
+ if (data.type === "secp256k1_ecdsa") {
10839
+ return new AnyPublicKey(new Secp256k1PublicKey(data.value));
10840
+ }
10841
+ throw new Error("Unknown public key type");
10842
+ }
10843
+
10844
+ // src/api/utils.ts
10845
+ async function waitForIndexerOnVersion(args) {
10846
+ if (args.minimumLedgerVersion !== void 0) {
10847
+ await waitForIndexer({
10848
+ aptosConfig: args.config,
10849
+ minimumLedgerVersion: args.minimumLedgerVersion,
10850
+ processorType: args.processorType
10851
+ });
10852
+ }
10853
+ }
10854
+
10855
+ // src/internal/view.ts
10856
+ async function view(args) {
10857
+ const { aptosConfig, payload, options } = args;
10858
+ const viewFunctionPayload = await generateViewFunctionPayload({
10859
+ ...payload,
10860
+ aptosConfig
10869
10861
  });
10870
- const pendingCoinTxn = await signAndSubmitTransaction({
10862
+ const serializer = new (0, _chunkJMOQXLEDjs.Serializer)();
10863
+ viewFunctionPayload.serialize(serializer);
10864
+ const bytes = serializer.toUint8Array();
10865
+ const { data } = await postAptosFullNode({
10871
10866
  aptosConfig,
10872
- signer: fromAccount,
10873
- transaction: coinTxn
10867
+ path: "view",
10868
+ originMethod: "view",
10869
+ contentType: "application/x.aptos.view_function+bcs" /* BCS_VIEW_FUNCTION */,
10870
+ params: { ledger_version: _optionalChain([options, 'optionalAccess', _137 => _137.ledgerVersion]) },
10871
+ body: bytes
10874
10872
  });
10875
- const coinTxnResponse = await waitForTransaction({
10873
+ return data;
10874
+ }
10875
+ async function viewJson(args) {
10876
+ const { aptosConfig, payload, options } = args;
10877
+ const { data } = await postAptosFullNode({
10876
10878
  aptosConfig,
10877
- transactionHash: pendingCoinTxn.hash
10879
+ originMethod: "viewJson",
10880
+ path: "view",
10881
+ params: { ledger_version: _optionalChain([options, 'optionalAccess', _138 => _138.ledgerVersion]) },
10882
+ body: {
10883
+ function: payload.function,
10884
+ type_arguments: _nullishCoalesce(payload.typeArguments, () => ( [])),
10885
+ arguments: _nullishCoalesce(payload.functionArguments, () => ( []))
10886
+ }
10878
10887
  });
10879
- if (!coinTxnResponse.success) {
10880
- throw new Error(`Failed to verify authentication key - ${coinTxnResponse}`);
10881
- }
10882
- return coinTxnResponse;
10888
+ return data;
10883
10889
  }
10884
10890
 
10885
10891
  // src/internal/abstraction.ts
10886
10892
  async function addAuthenticationFunctionTransaction(args) {
10887
10893
  const { aptosConfig, sender, authenticationFunction, options } = args;
10888
- const { moduleAddress, moduleName, functionName } = _chunkCSUBLTFAjs.getFunctionParts.call(void 0, authenticationFunction);
10894
+ const { moduleAddress, moduleName, functionName } = _chunkJMOQXLEDjs.getFunctionParts.call(void 0, authenticationFunction);
10889
10895
  return generateTransaction({
10890
10896
  aptosConfig,
10891
10897
  sender,
@@ -10903,7 +10909,7 @@ async function addAuthenticationFunctionTransaction(args) {
10903
10909
  }
10904
10910
  async function removeAuthenticationFunctionTransaction(args) {
10905
10911
  const { aptosConfig, sender, authenticationFunction, options } = args;
10906
- const { moduleAddress, moduleName, functionName } = _chunkCSUBLTFAjs.getFunctionParts.call(void 0, authenticationFunction);
10912
+ const { moduleAddress, moduleName, functionName } = _chunkJMOQXLEDjs.getFunctionParts.call(void 0, authenticationFunction);
10907
10913
  return generateTransaction({
10908
10914
  aptosConfig,
10909
10915
  sender,
@@ -10959,9 +10965,9 @@ var AccountAbstraction = class {
10959
10965
  */
10960
10966
  this.isAccountAbstractionEnabled = async (args) => {
10961
10967
  const functionInfos = await this.getAuthenticationFunction(args);
10962
- const { moduleAddress, moduleName, functionName } = _chunkCSUBLTFAjs.getFunctionParts.call(void 0, args.authenticationFunction);
10968
+ const { moduleAddress, moduleName, functionName } = _chunkJMOQXLEDjs.getFunctionParts.call(void 0, args.authenticationFunction);
10963
10969
  return _nullishCoalesce(_optionalChain([functionInfos, 'optionalAccess', _139 => _139.some, 'call', _140 => _140(
10964
- (functionInfo) => _chunkCSUBLTFAjs.AccountAddress.fromString(moduleAddress).equals(functionInfo.moduleAddress) && moduleName === functionInfo.moduleName && functionName === functionInfo.functionName
10970
+ (functionInfo) => _chunkJMOQXLEDjs.AccountAddress.fromString(moduleAddress).equals(functionInfo.moduleAddress) && moduleName === functionInfo.moduleName && functionName === functionInfo.functionName
10965
10971
  )]), () => ( false));
10966
10972
  };
10967
10973
  /**
@@ -11118,13 +11124,13 @@ var AccountAbstraction = class {
11118
11124
  aptosConfig: this.config,
11119
11125
  payload: {
11120
11126
  function: "0x1::account_abstraction::dispatchable_authenticator",
11121
- functionArguments: [_chunkCSUBLTFAjs.AccountAddress.from(accountAddress)],
11127
+ functionArguments: [_chunkJMOQXLEDjs.AccountAddress.from(accountAddress)],
11122
11128
  abi: { typeParameters: [], parameters: [new TypeTagAddress()], returnTypes: [] }
11123
11129
  }
11124
11130
  });
11125
11131
  if (functionInfoOption.length === 0) return void 0;
11126
11132
  return functionInfoOption[0].map((functionInfo) => ({
11127
- moduleAddress: _chunkCSUBLTFAjs.AccountAddress.fromString(functionInfo.module_address),
11133
+ moduleAddress: _chunkJMOQXLEDjs.AccountAddress.fromString(functionInfo.module_address),
11128
11134
  moduleName: functionInfo.module_name,
11129
11135
  functionName: functionInfo.function_name
11130
11136
  }));
@@ -11132,7 +11138,7 @@ var AccountAbstraction = class {
11132
11138
  };
11133
11139
 
11134
11140
  // src/api/account.ts
11135
- var Account2 = class {
11141
+ var Account3 = class {
11136
11142
  /**
11137
11143
  * Creates an instance of the Aptos client with the provided configuration.
11138
11144
  *
@@ -11181,7 +11187,7 @@ var Account2 = class {
11181
11187
  * @group Account
11182
11188
  */
11183
11189
  async getAccountInfo(args) {
11184
- return getInfo({ aptosConfig: this.config, ...args });
11190
+ return getInfo2({ aptosConfig: this.config, ...args });
11185
11191
  }
11186
11192
  /**
11187
11193
  * Queries for all modules in an account given an account address.
@@ -11218,7 +11224,7 @@ var Account2 = class {
11218
11224
  * @group Account
11219
11225
  */
11220
11226
  async getAccountModules(args) {
11221
- return getModules({ aptosConfig: this.config, ...args });
11227
+ return getModules2({ aptosConfig: this.config, ...args });
11222
11228
  }
11223
11229
  /**
11224
11230
  * Queries for a specific account module given an account address and module name.
@@ -11250,7 +11256,7 @@ var Account2 = class {
11250
11256
  * @group Account
11251
11257
  */
11252
11258
  async getAccountModule(args) {
11253
- return getModule({ aptosConfig: this.config, ...args });
11259
+ return getModule2({ aptosConfig: this.config, ...args });
11254
11260
  }
11255
11261
  /**
11256
11262
  * Queries account transactions given an account address.
@@ -11750,8 +11756,8 @@ var Account2 = class {
11750
11756
  aptosConfig: this.config,
11751
11757
  payload: { function: "0x1::coin::paired_coin", functionArguments: [faMetadataAddress] }
11752
11758
  })).at(0);
11753
- if (pairedCoinTypeStruct.vec.length > 0 && _chunkCSUBLTFAjs.isEncodedStruct.call(void 0, pairedCoinTypeStruct.vec[0])) {
11754
- return _chunkCSUBLTFAjs.parseEncodedStruct.call(void 0, pairedCoinTypeStruct.vec[0]);
11759
+ if (pairedCoinTypeStruct.vec.length > 0 && _chunkJMOQXLEDjs.isEncodedStruct.call(void 0, pairedCoinTypeStruct.vec[0])) {
11760
+ return _chunkJMOQXLEDjs.parseEncodedStruct.call(void 0, pairedCoinTypeStruct.vec[0]);
11755
11761
  }
11756
11762
  } catch (error) {
11757
11763
  }
@@ -11764,17 +11770,17 @@ var Account2 = class {
11764
11770
  }
11765
11771
  let faAddress;
11766
11772
  if (coinType !== void 0 && faMetadataAddress !== void 0) {
11767
- faAddress = _chunkCSUBLTFAjs.AccountAddress.from(faMetadataAddress).toStringLong();
11773
+ faAddress = _chunkJMOQXLEDjs.AccountAddress.from(faMetadataAddress).toStringLong();
11768
11774
  } else if (coinType !== void 0 && faMetadataAddress === void 0) {
11769
11775
  if (coinType === APTOS_COIN) {
11770
- faAddress = _chunkCSUBLTFAjs.AccountAddress.A.toStringLong();
11776
+ faAddress = _chunkJMOQXLEDjs.AccountAddress.A.toStringLong();
11771
11777
  } else {
11772
- faAddress = createObjectAddress(_chunkCSUBLTFAjs.AccountAddress.A, coinType).toStringLong();
11778
+ faAddress = createObjectAddress(_chunkJMOQXLEDjs.AccountAddress.A, coinType).toStringLong();
11773
11779
  }
11774
11780
  } else if (coinType === void 0 && faMetadataAddress !== void 0) {
11775
- const addr = _chunkCSUBLTFAjs.AccountAddress.from(faMetadataAddress);
11781
+ const addr = _chunkJMOQXLEDjs.AccountAddress.from(faMetadataAddress);
11776
11782
  faAddress = addr.toStringLong();
11777
- if (addr === _chunkCSUBLTFAjs.AccountAddress.A) {
11783
+ if (addr === _chunkJMOQXLEDjs.AccountAddress.A) {
11778
11784
  coinAssetType = APTOS_COIN;
11779
11785
  }
11780
11786
  } else {
@@ -12066,6 +12072,27 @@ var AptosConfig = class {
12066
12072
  }
12067
12073
  };
12068
12074
 
12075
+ // src/internal/coin.ts
12076
+ var coinTransferAbi = {
12077
+ typeParameters: [{ constraints: [] }],
12078
+ parameters: [new TypeTagAddress(), new TypeTagU64()]
12079
+ };
12080
+ async function transferCoinTransaction(args) {
12081
+ const { aptosConfig, sender, recipient, amount, coinType, options } = args;
12082
+ const coinStructType = _nullishCoalesce(coinType, () => ( APTOS_COIN));
12083
+ return generateTransaction({
12084
+ aptosConfig,
12085
+ sender,
12086
+ data: {
12087
+ function: "0x1::aptos_account::transfer_coins",
12088
+ typeArguments: [coinStructType],
12089
+ functionArguments: [recipient, amount],
12090
+ abi: coinTransferAbi
12091
+ },
12092
+ options
12093
+ });
12094
+ }
12095
+
12069
12096
  // src/api/coin.ts
12070
12097
  var Coin = class {
12071
12098
  /**
@@ -12149,7 +12176,7 @@ var defaultDigitalAssetType = "0x4::token::Token";
12149
12176
  async function getDigitalAssetData(args) {
12150
12177
  const { aptosConfig, digitalAssetAddress } = args;
12151
12178
  const whereCondition = {
12152
- token_data_id: { _eq: _chunkCSUBLTFAjs.AccountAddress.from(digitalAssetAddress).toStringLong() }
12179
+ token_data_id: { _eq: _chunkJMOQXLEDjs.AccountAddress.from(digitalAssetAddress).toStringLong() }
12153
12180
  };
12154
12181
  const graphqlQuery = {
12155
12182
  query: GetTokenData,
@@ -12167,7 +12194,7 @@ async function getDigitalAssetData(args) {
12167
12194
  async function getCurrentDigitalAssetOwnership(args) {
12168
12195
  const { aptosConfig, digitalAssetAddress } = args;
12169
12196
  const whereCondition = {
12170
- token_data_id: { _eq: _chunkCSUBLTFAjs.AccountAddress.from(digitalAssetAddress).toStringLong() },
12197
+ token_data_id: { _eq: _chunkJMOQXLEDjs.AccountAddress.from(digitalAssetAddress).toStringLong() },
12171
12198
  amount: { _gt: 0 }
12172
12199
  };
12173
12200
  const graphqlQuery = {
@@ -12186,7 +12213,7 @@ async function getCurrentDigitalAssetOwnership(args) {
12186
12213
  async function getOwnedDigitalAssets(args) {
12187
12214
  const { aptosConfig, ownerAddress, options } = args;
12188
12215
  const whereCondition = {
12189
- owner_address: { _eq: _chunkCSUBLTFAjs.AccountAddress.from(ownerAddress).toStringLong() },
12216
+ owner_address: { _eq: _chunkJMOQXLEDjs.AccountAddress.from(ownerAddress).toStringLong() },
12190
12217
  amount: { _gt: 0 }
12191
12218
  };
12192
12219
  const graphqlQuery = {
@@ -12208,7 +12235,7 @@ async function getOwnedDigitalAssets(args) {
12208
12235
  async function getDigitalAssetActivity(args) {
12209
12236
  const { aptosConfig, digitalAssetAddress, options } = args;
12210
12237
  const whereCondition = {
12211
- token_data_id: { _eq: _chunkCSUBLTFAjs.AccountAddress.from(digitalAssetAddress).toStringLong() }
12238
+ token_data_id: { _eq: _chunkJMOQXLEDjs.AccountAddress.from(digitalAssetAddress).toStringLong() }
12212
12239
  };
12213
12240
  const graphqlQuery = {
12214
12241
  query: GetTokenActivity,
@@ -12256,7 +12283,7 @@ async function createCollectionTransaction(args) {
12256
12283
  functionArguments: [
12257
12284
  // Do not change the order
12258
12285
  new MoveString(args.description),
12259
- new U64(_nullishCoalesce(args.maxSupply, () => ( _chunkCSUBLTFAjs.MAX_U64_BIG_INT))),
12286
+ new U64(_nullishCoalesce(args.maxSupply, () => ( _chunkJMOQXLEDjs.MAX_U64_BIG_INT))),
12260
12287
  new MoveString(args.name),
12261
12288
  new MoveString(args.uri),
12262
12289
  new Bool(_nullishCoalesce(args.mutableDescription, () => ( true))),
@@ -12299,7 +12326,7 @@ async function getCollectionData(args) {
12299
12326
  }
12300
12327
  async function getCollectionDataByCreatorAddressAndCollectionName(args) {
12301
12328
  const { aptosConfig, creatorAddress, collectionName, options } = args;
12302
- const address = _chunkCSUBLTFAjs.AccountAddress.from(creatorAddress);
12329
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(creatorAddress);
12303
12330
  const whereCondition = {
12304
12331
  collection_name: { _eq: collectionName },
12305
12332
  creator_address: { _eq: address.toStringLong() }
@@ -12311,7 +12338,7 @@ async function getCollectionDataByCreatorAddressAndCollectionName(args) {
12311
12338
  }
12312
12339
  async function getCollectionDataByCreatorAddress(args) {
12313
12340
  const { aptosConfig, creatorAddress, options } = args;
12314
- const address = _chunkCSUBLTFAjs.AccountAddress.from(creatorAddress);
12341
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(creatorAddress);
12315
12342
  const whereCondition = {
12316
12343
  creator_address: { _eq: address.toStringLong() }
12317
12344
  };
@@ -12322,7 +12349,7 @@ async function getCollectionDataByCreatorAddress(args) {
12322
12349
  }
12323
12350
  async function getCollectionDataByCollectionId(args) {
12324
12351
  const { aptosConfig, collectionId, options } = args;
12325
- const address = _chunkCSUBLTFAjs.AccountAddress.from(collectionId);
12352
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(collectionId);
12326
12353
  const whereCondition = {
12327
12354
  collection_id: { _eq: address.toStringLong() }
12328
12355
  };
@@ -12333,7 +12360,7 @@ async function getCollectionDataByCollectionId(args) {
12333
12360
  }
12334
12361
  async function getCollectionId(args) {
12335
12362
  const { creatorAddress, collectionName, options, aptosConfig } = args;
12336
- const address = _chunkCSUBLTFAjs.AccountAddress.from(creatorAddress);
12363
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(creatorAddress);
12337
12364
  const whereCondition = {
12338
12365
  collection_name: { _eq: collectionName },
12339
12366
  creator_address: { _eq: address.toStringLong() }
@@ -12408,7 +12435,7 @@ async function transferDigitalAssetTransaction(args) {
12408
12435
  data: {
12409
12436
  function: "0x1::object::transfer",
12410
12437
  typeArguments: [_nullishCoalesce(digitalAssetType, () => ( defaultDigitalAssetType))],
12411
- functionArguments: [_chunkCSUBLTFAjs.AccountAddress.from(digitalAssetAddress), _chunkCSUBLTFAjs.AccountAddress.from(recipient)],
12438
+ functionArguments: [_chunkJMOQXLEDjs.AccountAddress.from(digitalAssetAddress), _chunkJMOQXLEDjs.AccountAddress.from(recipient)],
12412
12439
  abi: transferDigitalAssetAbi
12413
12440
  },
12414
12441
  options
@@ -12480,7 +12507,7 @@ async function burnDigitalAssetTransaction(args) {
12480
12507
  data: {
12481
12508
  function: "0x4::aptos_token::burn",
12482
12509
  typeArguments: [_nullishCoalesce(digitalAssetType, () => ( defaultDigitalAssetType))],
12483
- functionArguments: [_chunkCSUBLTFAjs.AccountAddress.from(digitalAssetAddress)],
12510
+ functionArguments: [_chunkJMOQXLEDjs.AccountAddress.from(digitalAssetAddress)],
12484
12511
  abi: burnDigitalAssetAbi
12485
12512
  },
12486
12513
  options
@@ -12534,7 +12561,7 @@ async function setDigitalAssetDescriptionTransaction(args) {
12534
12561
  data: {
12535
12562
  function: "0x4::aptos_token::set_description",
12536
12563
  typeArguments: [_nullishCoalesce(digitalAssetType, () => ( defaultDigitalAssetType))],
12537
- functionArguments: [_chunkCSUBLTFAjs.AccountAddress.from(digitalAssetAddress), new MoveString(description)],
12564
+ functionArguments: [_chunkJMOQXLEDjs.AccountAddress.from(digitalAssetAddress), new MoveString(description)],
12538
12565
  abi: setDigitalAssetDescriptionAbi
12539
12566
  },
12540
12567
  options
@@ -12552,7 +12579,7 @@ async function setDigitalAssetNameTransaction(args) {
12552
12579
  data: {
12553
12580
  function: "0x4::aptos_token::set_name",
12554
12581
  typeArguments: [_nullishCoalesce(digitalAssetType, () => ( defaultDigitalAssetType))],
12555
- functionArguments: [_chunkCSUBLTFAjs.AccountAddress.from(digitalAssetAddress), new MoveString(name)],
12582
+ functionArguments: [_chunkJMOQXLEDjs.AccountAddress.from(digitalAssetAddress), new MoveString(name)],
12556
12583
  abi: setDigitalAssetNameAbi
12557
12584
  },
12558
12585
  options
@@ -12570,7 +12597,7 @@ async function setDigitalAssetURITransaction(args) {
12570
12597
  data: {
12571
12598
  function: "0x4::aptos_token::set_uri",
12572
12599
  typeArguments: [_nullishCoalesce(digitalAssetType, () => ( defaultDigitalAssetType))],
12573
- functionArguments: [_chunkCSUBLTFAjs.AccountAddress.from(digitalAssetAddress), new MoveString(uri)],
12600
+ functionArguments: [_chunkJMOQXLEDjs.AccountAddress.from(digitalAssetAddress), new MoveString(uri)],
12574
12601
  abi: setDigitalAssetURIAbi
12575
12602
  },
12576
12603
  options
@@ -12603,7 +12630,7 @@ async function addDigitalAssetPropertyTransaction(args) {
12603
12630
  function: "0x4::aptos_token::add_property",
12604
12631
  typeArguments: [_nullishCoalesce(digitalAssetType, () => ( defaultDigitalAssetType))],
12605
12632
  functionArguments: [
12606
- _chunkCSUBLTFAjs.AccountAddress.from(digitalAssetAddress),
12633
+ _chunkJMOQXLEDjs.AccountAddress.from(digitalAssetAddress),
12607
12634
  new MoveString(propertyKey),
12608
12635
  new MoveString(PropertyTypeMap[propertyType]),
12609
12636
  MoveVector.U8(getSinglePropertyValueRaw(propertyValue, PropertyTypeMap[propertyType]))
@@ -12625,7 +12652,7 @@ async function removeDigitalAssetPropertyTransaction(args) {
12625
12652
  data: {
12626
12653
  function: "0x4::aptos_token::remove_property",
12627
12654
  typeArguments: [_nullishCoalesce(digitalAssetType, () => ( defaultDigitalAssetType))],
12628
- functionArguments: [_chunkCSUBLTFAjs.AccountAddress.from(digitalAssetAddress), new MoveString(propertyKey)],
12655
+ functionArguments: [_chunkJMOQXLEDjs.AccountAddress.from(digitalAssetAddress), new MoveString(propertyKey)],
12629
12656
  abi: removeDigitalAssetPropertyAbi
12630
12657
  },
12631
12658
  options
@@ -12658,7 +12685,7 @@ async function updateDigitalAssetPropertyTransaction(args) {
12658
12685
  function: "0x4::aptos_token::update_property",
12659
12686
  typeArguments: [_nullishCoalesce(digitalAssetType, () => ( defaultDigitalAssetType))],
12660
12687
  functionArguments: [
12661
- _chunkCSUBLTFAjs.AccountAddress.from(digitalAssetAddress),
12688
+ _chunkJMOQXLEDjs.AccountAddress.from(digitalAssetAddress),
12662
12689
  new MoveString(propertyKey),
12663
12690
  new MoveString(PropertyTypeMap[propertyType]),
12664
12691
  /**
@@ -12701,7 +12728,7 @@ async function addDigitalAssetTypedPropertyTransaction(args) {
12701
12728
  data: {
12702
12729
  function: "0x4::aptos_token::add_typed_property",
12703
12730
  typeArguments: [_nullishCoalesce(digitalAssetType, () => ( defaultDigitalAssetType)), PropertyTypeMap[propertyType]],
12704
- functionArguments: [_chunkCSUBLTFAjs.AccountAddress.from(digitalAssetAddress), new MoveString(propertyKey), propertyValue],
12731
+ functionArguments: [_chunkJMOQXLEDjs.AccountAddress.from(digitalAssetAddress), new MoveString(propertyKey), propertyValue],
12705
12732
  abi: addDigitalAssetTypedPropertyAbi
12706
12733
  },
12707
12734
  options
@@ -12732,7 +12759,7 @@ async function updateDigitalAssetTypedPropertyTransaction(args) {
12732
12759
  data: {
12733
12760
  function: "0x4::aptos_token::update_typed_property",
12734
12761
  typeArguments: [_nullishCoalesce(digitalAssetType, () => ( defaultDigitalAssetType)), PropertyTypeMap[propertyType]],
12735
- functionArguments: [_chunkCSUBLTFAjs.AccountAddress.from(digitalAssetAddress), new MoveString(propertyKey), propertyValue],
12762
+ functionArguments: [_chunkJMOQXLEDjs.AccountAddress.from(digitalAssetAddress), new MoveString(propertyKey), propertyValue],
12736
12763
  abi: updateDigitalAssetTypedPropertyAbi
12737
12764
  },
12738
12765
  options
@@ -12821,7 +12848,7 @@ var DigitalAsset = class {
12821
12848
  processorType: "token_v2_processor" /* TOKEN_V2_PROCESSOR */
12822
12849
  });
12823
12850
  const { creatorAddress, collectionName, options } = args;
12824
- const address = _chunkCSUBLTFAjs.AccountAddress.from(creatorAddress);
12851
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(creatorAddress);
12825
12852
  const whereCondition = {
12826
12853
  collection_name: { _eq: collectionName },
12827
12854
  creator_address: { _eq: address.toStringLong() }
@@ -13754,7 +13781,7 @@ async function getModuleEventsByEventType(args) {
13754
13781
  }
13755
13782
  async function getAccountEventsByCreationNumber(args) {
13756
13783
  const { accountAddress, aptosConfig, creationNumber, options } = args;
13757
- const address = _chunkCSUBLTFAjs.AccountAddress.from(accountAddress);
13784
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(accountAddress);
13758
13785
  const whereCondition = {
13759
13786
  account_address: { _eq: address.toStringLong() },
13760
13787
  creation_number: { _eq: creationNumber }
@@ -13763,7 +13790,7 @@ async function getAccountEventsByCreationNumber(args) {
13763
13790
  }
13764
13791
  async function getAccountEventsByEventType(args) {
13765
13792
  const { accountAddress, aptosConfig, eventType, options } = args;
13766
- const address = _chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toStringLong();
13793
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toStringLong();
13767
13794
  const whereCondition = {
13768
13795
  account_address: { _eq: address },
13769
13796
  indexed_type: { _eq: eventType }
@@ -13992,7 +14019,7 @@ async function fundAccount(args) {
13992
14019
  aptosConfig,
13993
14020
  path: "fund",
13994
14021
  body: {
13995
- address: _chunkCSUBLTFAjs.AccountAddress.from(accountAddress).toString(),
14022
+ address: _chunkJMOQXLEDjs.AccountAddress.from(accountAddress).toString(),
13996
14023
  amount
13997
14024
  },
13998
14025
  originMethod: "fundAccount"
@@ -14304,7 +14331,7 @@ var FungibleAsset = class {
14304
14331
  aptosConfig: this.config,
14305
14332
  options: {
14306
14333
  where: {
14307
- creator_address: { _eq: _chunkCSUBLTFAjs.AccountAddress.from(args.creatorAddress).toStringLong() }
14334
+ creator_address: { _eq: _chunkJMOQXLEDjs.AccountAddress.from(args.creatorAddress).toStringLong() }
14308
14335
  }
14309
14336
  }
14310
14337
  });
@@ -14650,11 +14677,11 @@ var General = class {
14650
14677
  * async function runExample() {
14651
14678
  * // Querying the Aptos Indexer for ledger information
14652
14679
  * const topUserTransactions = await aptos.queryIndexer({
14653
- * query: `query MyQuery {
14680
+ * query: { query: `query MyQuery {
14654
14681
  * ledger_infos {
14655
14682
  * chain_id
14656
14683
  * }
14657
- * }`
14684
+ * }`}
14658
14685
  * });
14659
14686
  *
14660
14687
  * console.log(topUserTransactions);
@@ -14787,7 +14814,7 @@ async function getOwnerAddress(args) {
14787
14814
  }
14788
14815
  });
14789
14816
  const owner = unwrapOption(res[0]);
14790
- return owner ? _chunkCSUBLTFAjs.AccountAddress.from(owner) : void 0;
14817
+ return owner ? _chunkJMOQXLEDjs.AccountAddress.from(owner) : void 0;
14791
14818
  }
14792
14819
  async function registerName(args) {
14793
14820
  const { aptosConfig, expiration, name, sender, targetAddress, toAddress, options, transferable } = args;
@@ -14874,7 +14901,7 @@ async function getPrimaryName(args) {
14874
14901
  aptosConfig,
14875
14902
  payload: {
14876
14903
  function: `${routerAddress}::router::get_primary_name`,
14877
- functionArguments: [_chunkCSUBLTFAjs.AccountAddress.from(address).toString()]
14904
+ functionArguments: [_chunkJMOQXLEDjs.AccountAddress.from(address).toString()]
14878
14905
  }
14879
14906
  });
14880
14907
  const domainName = unwrapOption(res[1]);
@@ -14921,7 +14948,7 @@ async function getTargetAddress(args) {
14921
14948
  }
14922
14949
  });
14923
14950
  const target = unwrapOption(res[0]);
14924
- return target ? _chunkCSUBLTFAjs.AccountAddress.from(target) : void 0;
14951
+ return target ? _chunkJMOQXLEDjs.AccountAddress.from(target) : void 0;
14925
14952
  }
14926
14953
  async function setTargetAddress(args) {
14927
14954
  const { aptosConfig, sender, name, address, options } = args;
@@ -15590,7 +15617,7 @@ var ANS = class {
15590
15617
  // src/internal/staking.ts
15591
15618
  async function getNumberOfDelegators(args) {
15592
15619
  const { aptosConfig, poolAddress } = args;
15593
- const address = _chunkCSUBLTFAjs.AccountAddress.from(poolAddress).toStringLong();
15620
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(poolAddress).toStringLong();
15594
15621
  const query = {
15595
15622
  query: GetNumberOfDelegators,
15596
15623
  variables: { where_condition: { pool_address: { _eq: address } } }
@@ -15615,8 +15642,8 @@ async function getDelegatedStakingActivities(args) {
15615
15642
  const query = {
15616
15643
  query: GetDelegatedStakingActivities,
15617
15644
  variables: {
15618
- delegatorAddress: _chunkCSUBLTFAjs.AccountAddress.from(delegatorAddress).toStringLong(),
15619
- poolAddress: _chunkCSUBLTFAjs.AccountAddress.from(poolAddress).toStringLong()
15645
+ delegatorAddress: _chunkJMOQXLEDjs.AccountAddress.from(delegatorAddress).toStringLong(),
15646
+ poolAddress: _chunkJMOQXLEDjs.AccountAddress.from(poolAddress).toStringLong()
15620
15647
  }
15621
15648
  };
15622
15649
  const data = await queryIndexer({ aptosConfig, query });
@@ -15901,7 +15928,7 @@ var Build = class {
15901
15928
  payload: TransactionPayloadScript.load(new Deserializer(bytes)),
15902
15929
  ...args
15903
15930
  });
15904
- return new SimpleTransaction(rawTxn, args.withFeePayer === true ? _chunkCSUBLTFAjs.AccountAddress.ZERO : void 0);
15931
+ return new SimpleTransaction(rawTxn, args.withFeePayer === true ? _chunkJMOQXLEDjs.AccountAddress.ZERO : void 0);
15905
15932
  }
15906
15933
  /**
15907
15934
  * Build a multi-agent transaction that allows multiple signers to authorize a transaction.
@@ -16007,10 +16034,10 @@ var Simulate = class {
16007
16034
  return simulateTransaction({ aptosConfig: this.config, ...args });
16008
16035
  }
16009
16036
  };
16010
- _chunkCSUBLTFAjs.__decorateClass.call(void 0, [
16037
+ _chunkJMOQXLEDjs.__decorateClass.call(void 0, [
16011
16038
  ValidateFeePayerDataOnSimulation
16012
16039
  ], Simulate.prototype, "simple", 1);
16013
- _chunkCSUBLTFAjs.__decorateClass.call(void 0, [
16040
+ _chunkJMOQXLEDjs.__decorateClass.call(void 0, [
16014
16041
  ValidateFeePayerDataOnSimulation
16015
16042
  ], Simulate.prototype, "multiAgent", 1);
16016
16043
 
@@ -16056,10 +16083,10 @@ var Submit = class {
16056
16083
  return submitTransaction({ aptosConfig: this.config, ...args });
16057
16084
  }
16058
16085
  };
16059
- _chunkCSUBLTFAjs.__decorateClass.call(void 0, [
16086
+ _chunkJMOQXLEDjs.__decorateClass.call(void 0, [
16060
16087
  ValidateFeePayerDataOnSubmission
16061
16088
  ], Submit.prototype, "simple", 1);
16062
- _chunkCSUBLTFAjs.__decorateClass.call(void 0, [
16089
+ _chunkJMOQXLEDjs.__decorateClass.call(void 0, [
16063
16090
  ValidateFeePayerDataOnSubmission
16064
16091
  ], Submit.prototype, "multiAgent", 1);
16065
16092
 
@@ -16116,7 +16143,7 @@ var AccountSequenceNumber = class {
16116
16143
  */
16117
16144
  async nextSequenceNumber() {
16118
16145
  while (this.lock) {
16119
- await _chunkCSUBLTFAjs.sleep.call(void 0, this.sleepTime);
16146
+ await _chunkJMOQXLEDjs.sleep.call(void 0, this.sleepTime);
16120
16147
  }
16121
16148
  this.lock = true;
16122
16149
  let nextNumber = BigInt(0);
@@ -16126,10 +16153,10 @@ var AccountSequenceNumber = class {
16126
16153
  }
16127
16154
  if (this.currentNumber - this.lastUncommintedNumber >= this.maximumInFlight) {
16128
16155
  await this.update();
16129
- const startTime = _chunkCSUBLTFAjs.nowInSeconds.call(void 0, );
16156
+ const startTime = _chunkJMOQXLEDjs.nowInSeconds.call(void 0, );
16130
16157
  while (this.currentNumber - this.lastUncommintedNumber >= this.maximumInFlight) {
16131
- await _chunkCSUBLTFAjs.sleep.call(void 0, this.sleepTime);
16132
- if (_chunkCSUBLTFAjs.nowInSeconds.call(void 0, ) - startTime > this.maxWaitTime) {
16158
+ await _chunkJMOQXLEDjs.sleep.call(void 0, this.sleepTime);
16159
+ if (_chunkJMOQXLEDjs.nowInSeconds.call(void 0, ) - startTime > this.maxWaitTime) {
16133
16160
  console.warn(
16134
16161
  `Waited over 30 seconds for a transaction to commit, re-syncing ${this.account.accountAddress.toString()}`
16135
16162
  );
@@ -16158,7 +16185,7 @@ var AccountSequenceNumber = class {
16158
16185
  * @category Transactions
16159
16186
  */
16160
16187
  async initialize() {
16161
- const { sequence_number: sequenceNumber } = await getInfo({
16188
+ const { sequence_number: sequenceNumber } = await getInfo2({
16162
16189
  aptosConfig: this.aptosConfig,
16163
16190
  accountAddress: this.account.accountAddress
16164
16191
  });
@@ -16173,7 +16200,7 @@ var AccountSequenceNumber = class {
16173
16200
  * @category Transactions
16174
16201
  */
16175
16202
  async update() {
16176
- const { sequence_number: sequenceNumber } = await getInfo({
16203
+ const { sequence_number: sequenceNumber } = await getInfo2({
16177
16204
  aptosConfig: this.aptosConfig,
16178
16205
  accountAddress: this.account.accountAddress
16179
16206
  });
@@ -16191,20 +16218,20 @@ var AccountSequenceNumber = class {
16191
16218
  async synchronize() {
16192
16219
  if (this.lastUncommintedNumber === this.currentNumber) return;
16193
16220
  while (this.lock) {
16194
- await _chunkCSUBLTFAjs.sleep.call(void 0, this.sleepTime);
16221
+ await _chunkJMOQXLEDjs.sleep.call(void 0, this.sleepTime);
16195
16222
  }
16196
16223
  this.lock = true;
16197
16224
  try {
16198
16225
  await this.update();
16199
- const startTime = _chunkCSUBLTFAjs.nowInSeconds.call(void 0, );
16226
+ const startTime = _chunkJMOQXLEDjs.nowInSeconds.call(void 0, );
16200
16227
  while (this.lastUncommintedNumber !== this.currentNumber) {
16201
- if (_chunkCSUBLTFAjs.nowInSeconds.call(void 0, ) - startTime > this.maxWaitTime) {
16228
+ if (_chunkJMOQXLEDjs.nowInSeconds.call(void 0, ) - startTime > this.maxWaitTime) {
16202
16229
  console.warn(
16203
16230
  `Waited over 30 seconds for a transaction to commit, re-syncing ${this.account.accountAddress.toString()}`
16204
16231
  );
16205
16232
  await this.initialize();
16206
16233
  } else {
16207
- await _chunkCSUBLTFAjs.sleep.call(void 0, this.sleepTime);
16234
+ await _chunkJMOQXLEDjs.sleep.call(void 0, this.sleepTime);
16208
16235
  await this.update();
16209
16236
  }
16210
16237
  }
@@ -17082,13 +17109,26 @@ var Transaction = class {
17082
17109
  return publicPackageTransaction({ aptosConfig: this.config, ...args });
17083
17110
  }
17084
17111
  /**
17085
- * Rotate an account's authentication key. After rotation, only the new private key can be used to sign transactions for the account.
17086
- * Note: Only legacy Ed25519 scheme is supported for now.
17087
- * More info: {@link https://aptos.dev/guides/account-management/key-rotation/}
17112
+ * Rotates the authentication key for a given account. Once an account is rotated, only the new private key
17113
+ * or keyless signing scheme can be used to sign transactions for the account.
17114
+ *
17115
+ * @param args - The arguments for rotating the authentication key.
17116
+ * @param args.fromAccount - The account from which the authentication key will be rotated.
17117
+ * @param args.toAccount - (Optional) The target account to rotate to. Required if not using toNewPrivateKey or toAuthKey.
17118
+ * @param args.toNewPrivateKey - (Optional) The new private key to rotate to. Required if not using toAccount or toAuthKey.
17119
+ * @param args.toAuthKey - (Optional) The new authentication key to rotate to. Can only be used with dangerouslySkipVerification=true.
17120
+ * @param args.dangerouslySkipVerification - (Optional) If true, skips verification steps after rotation. Required when using toAuthKey.
17121
+ *
17122
+ * @remarks
17123
+ * This function supports three modes of rotation:
17124
+ * 1. Using a target Account object (toAccount)
17125
+ * 2. Using a new private key (toNewPrivateKey)
17126
+ * 3. Using a raw authentication key (toAuthKey) - requires dangerouslySkipVerification=true
17127
+ *
17128
+ * When not using dangerouslySkipVerification, the function performs additional safety checks and account setup.
17088
17129
  *
17089
- * @param args The arguments for rotating the auth key.
17090
- * @param args.fromAccount The account to rotate the auth key for.
17091
- * @param args.toNewPrivateKey The new private key to rotate to.
17130
+ * If the new key is a multi key, skipping verification is dangerous because verification will publish the public key onchain and
17131
+ * prevent users from being locked out of the account from loss of knowledge of one of the public keys.
17092
17132
  *
17093
17133
  * @returns PendingTransactionResponse
17094
17134
  *
@@ -17117,12 +17157,6 @@ var Transaction = class {
17117
17157
  async rotateAuthKey(args) {
17118
17158
  return rotateAuthKey({ aptosConfig: this.config, ...args });
17119
17159
  }
17120
- async rotateAuthKeyToMultiEd25519(args) {
17121
- return rotateAuthKeyToMultiEd25519({ aptosConfig: this.config, ...args });
17122
- }
17123
- async rotateAuthKeyWithVerificationTransaction(args) {
17124
- return rotateAuthKeyWithVerificationTransaction({ aptosConfig: this.config, ...args });
17125
- }
17126
17160
  /**
17127
17161
  * Sign a transaction that can later be submitted to the chain.
17128
17162
  * This function is essential for ensuring the authenticity of the transaction by using the provided account's signing capabilities.
@@ -17502,7 +17536,7 @@ async function getPepper(args) {
17502
17536
  jwt_b64: jwt,
17503
17537
  epk: ephemeralKeyPair.getPublicKey().bcsToHex().toStringWithoutPrefix(),
17504
17538
  exp_date_secs: ephemeralKeyPair.expiryDateSecs,
17505
- epk_blinder: _chunkCSUBLTFAjs.Hex.fromHexInput(ephemeralKeyPair.blinder).toStringWithoutPrefix(),
17539
+ epk_blinder: _chunkJMOQXLEDjs.Hex.fromHexInput(ephemeralKeyPair.blinder).toStringWithoutPrefix(),
17506
17540
  uid_key: uidKey,
17507
17541
  derivation_path: derivationPath
17508
17542
  };
@@ -17513,7 +17547,7 @@ async function getPepper(args) {
17513
17547
  originMethod: "getPepper",
17514
17548
  overrides: { WITH_CREDENTIALS: false }
17515
17549
  });
17516
- return _chunkCSUBLTFAjs.Hex.fromHexInput(data.pepper).toUint8Array();
17550
+ return _chunkJMOQXLEDjs.Hex.fromHexInput(data.pepper).toUint8Array();
17517
17551
  }
17518
17552
  async function getProof(args) {
17519
17553
  const {
@@ -17524,7 +17558,7 @@ async function getProof(args) {
17524
17558
  uidKey = "sub",
17525
17559
  maxExpHorizonSecs = (await getKeylessConfig({ aptosConfig })).maxExpHorizonSecs
17526
17560
  } = args;
17527
- if (_chunkCSUBLTFAjs.Hex.fromHexInput(pepper).toUint8Array().length !== KeylessAccount.PEPPER_LENGTH) {
17561
+ if (_chunkJMOQXLEDjs.Hex.fromHexInput(pepper).toUint8Array().length !== KeylessAccount.PEPPER_LENGTH) {
17528
17562
  throw new Error(`Pepper needs to be ${KeylessAccount.PEPPER_LENGTH} bytes`);
17529
17563
  }
17530
17564
  const decodedJwt = _jwtdecode.jwtDecode.call(void 0, jwt);
@@ -17537,10 +17571,10 @@ async function getProof(args) {
17537
17571
  const json = {
17538
17572
  jwt_b64: jwt,
17539
17573
  epk: ephemeralKeyPair.getPublicKey().bcsToHex().toStringWithoutPrefix(),
17540
- epk_blinder: _chunkCSUBLTFAjs.Hex.fromHexInput(ephemeralKeyPair.blinder).toStringWithoutPrefix(),
17574
+ epk_blinder: _chunkJMOQXLEDjs.Hex.fromHexInput(ephemeralKeyPair.blinder).toStringWithoutPrefix(),
17541
17575
  exp_date_secs: ephemeralKeyPair.expiryDateSecs,
17542
17576
  exp_horizon_secs: maxExpHorizonSecs,
17543
- pepper: _chunkCSUBLTFAjs.Hex.fromHexInput(pepper).toStringWithoutPrefix(),
17577
+ pepper: _chunkJMOQXLEDjs.Hex.fromHexInput(pepper).toStringWithoutPrefix(),
17544
17578
  uid_key: uidKey
17545
17579
  };
17546
17580
  const { data } = await postAptosProvingService({
@@ -17824,7 +17858,7 @@ async function getObjectData(args) {
17824
17858
  }
17825
17859
  async function getObjectDataByObjectAddress(args) {
17826
17860
  const { aptosConfig, objectAddress, options } = args;
17827
- const address = _chunkCSUBLTFAjs.AccountAddress.from(objectAddress).toStringLong();
17861
+ const address = _chunkJMOQXLEDjs.AccountAddress.from(objectAddress).toStringLong();
17828
17862
  const whereCondition = {
17829
17863
  object_address: { _eq: address }
17830
17864
  };
@@ -17913,7 +17947,7 @@ async function viewBinary(args) {
17913
17947
  ...payload,
17914
17948
  aptosConfig
17915
17949
  });
17916
- const serializer = new (0, _chunkCSUBLTFAjs.Serializer)();
17950
+ const serializer = new (0, _chunkJMOQXLEDjs.Serializer)();
17917
17951
  viewFunctionPayload.serialize(serializer);
17918
17952
  const bytes = serializer.toUint8Array();
17919
17953
  const { data } = await postBinaryAptosFullNode({
@@ -17999,7 +18033,7 @@ var Aptos = class {
17999
18033
  */
18000
18034
  constructor(settings) {
18001
18035
  this.config = new AptosConfig(settings);
18002
- this.account = new Account2(this.config);
18036
+ this.account = new Account3(this.config);
18003
18037
  this.abstraction = new AccountAbstraction(this.config);
18004
18038
  this.ans = new ANS(this.config);
18005
18039
  this.coin = new Coin(this.config);
@@ -18026,7 +18060,7 @@ function applyMixin(targetClass, baseClass, baseClassProp) {
18026
18060
  Object.defineProperty(targetClass.prototype, propertyName, propertyDescriptor);
18027
18061
  });
18028
18062
  }
18029
- applyMixin(Aptos, Account2, "account");
18063
+ applyMixin(Aptos, Account3, "account");
18030
18064
  applyMixin(Aptos, AccountAbstraction, "abstraction");
18031
18065
  applyMixin(Aptos, ANS, "ans");
18032
18066
  applyMixin(Aptos, Coin, "coin");
@@ -18337,5 +18371,7 @@ applyMixin(Aptos, AptosObject, "object");
18337
18371
 
18338
18372
 
18339
18373
 
18340
- exports.APTOS_BIP44_REGEX = APTOS_BIP44_REGEX; exports.APTOS_COIN = APTOS_COIN; exports.APTOS_FA = APTOS_FA; exports.APTOS_HARDENED_REGEX = APTOS_HARDENED_REGEX; exports.AbstractKeylessAccount = AbstractKeylessAccount; exports.AbstractMultiKey = AbstractMultiKey; exports.AbstractedAccount = AbstractedAccount; exports.Account = Account; exports.AccountAddress = _chunkCSUBLTFAjs.AccountAddress; exports.AccountAuthenticator = AccountAuthenticator; exports.AccountAuthenticatorAbstraction = AccountAuthenticatorAbstraction; exports.AccountAuthenticatorEd25519 = AccountAuthenticatorEd25519; exports.AccountAuthenticatorMultiEd25519 = AccountAuthenticatorMultiEd25519; exports.AccountAuthenticatorMultiKey = AccountAuthenticatorMultiKey; exports.AccountAuthenticatorNoAccountAuthenticator = AccountAuthenticatorNoAccountAuthenticator; exports.AccountAuthenticatorSingleKey = AccountAuthenticatorSingleKey; exports.AccountAuthenticatorVariant = _chunkCSUBLTFAjs.AccountAuthenticatorVariant; exports.AccountPublicKey = AccountPublicKey; exports.AccountSequenceNumber = AccountSequenceNumber; exports.AccountUtils = AccountUtils; exports.AddressInvalidReason = _chunkCSUBLTFAjs.AddressInvalidReason; exports.AnyPublicKey = AnyPublicKey; exports.AnyPublicKeyVariant = _chunkCSUBLTFAjs.AnyPublicKeyVariant; exports.AnySignature = AnySignature; exports.AnySignatureVariant = _chunkCSUBLTFAjs.AnySignatureVariant; exports.Aptos = Aptos; exports.AptosApiError = AptosApiError; exports.AptosApiType = AptosApiType; exports.AptosConfig = AptosConfig; exports.AptosScriptComposer = AptosScriptComposer; exports.AuthenticationKey = AuthenticationKey; exports.Bool = Bool; exports.CKDPriv = CKDPriv; exports.CallArgument = _chunkCSUBLTFAjs.CallArgument; exports.ChainId = ChainId; exports.DEFAULT_MAX_GAS_AMOUNT = DEFAULT_MAX_GAS_AMOUNT; exports.DEFAULT_TXN_EXP_SEC_FROM_NOW = DEFAULT_TXN_EXP_SEC_FROM_NOW; exports.DEFAULT_TXN_TIMEOUT_SEC = DEFAULT_TXN_TIMEOUT_SEC; exports.DeriveScheme = _chunkCSUBLTFAjs.DeriveScheme; exports.Deserializer = Deserializer; exports.EPK_HORIZON_SECS = EPK_HORIZON_SECS; exports.Ed25519Account = Ed25519Account; exports.Ed25519PrivateKey = Ed25519PrivateKey; exports.Ed25519PublicKey = Ed25519PublicKey; exports.Ed25519Signature = Ed25519Signature; exports.EntryFunction = EntryFunction; exports.EntryFunctionBytes = EntryFunctionBytes; exports.EphemeralCertificate = EphemeralCertificate; exports.EphemeralCertificateVariant = _chunkCSUBLTFAjs.EphemeralCertificateVariant; exports.EphemeralKeyPair = EphemeralKeyPair; exports.EphemeralPublicKey = EphemeralPublicKey; exports.EphemeralPublicKeyVariant = _chunkCSUBLTFAjs.EphemeralPublicKeyVariant; exports.EphemeralSignature = EphemeralSignature; exports.EphemeralSignatureVariant = _chunkCSUBLTFAjs.EphemeralSignatureVariant; exports.FIREBASE_AUTH_ISS_PATTERN = FIREBASE_AUTH_ISS_PATTERN; exports.FederatedKeylessAccount = FederatedKeylessAccount; exports.FederatedKeylessPublicKey = FederatedKeylessPublicKey; exports.FeePayerRawTransaction = FeePayerRawTransaction; exports.FixedBytes = FixedBytes; exports.Groth16VerificationKey = Groth16VerificationKey; exports.Groth16Zkp = Groth16Zkp; exports.HARDENED_OFFSET = HARDENED_OFFSET; exports.Hex = _chunkCSUBLTFAjs.Hex; exports.HexInvalidReason = _chunkCSUBLTFAjs.HexInvalidReason; exports.Identifier = Identifier; exports.KeyType = KeyType; exports.KeylessAccount = KeylessAccount; exports.KeylessConfiguration = KeylessConfiguration; exports.KeylessError = KeylessError; exports.KeylessErrorCategory = KeylessErrorCategory; exports.KeylessErrorResolutionTip = KeylessErrorResolutionTip; exports.KeylessErrorType = KeylessErrorType; exports.KeylessPublicKey = KeylessPublicKey; exports.KeylessSignature = KeylessSignature; exports.MAX_AUD_VAL_BYTES = MAX_AUD_VAL_BYTES; exports.MAX_COMMITED_EPK_BYTES = MAX_COMMITED_EPK_BYTES; exports.MAX_EXTRA_FIELD_BYTES = MAX_EXTRA_FIELD_BYTES; exports.MAX_ISS_VAL_BYTES = MAX_ISS_VAL_BYTES; exports.MAX_JWT_HEADER_B64_BYTES = MAX_JWT_HEADER_B64_BYTES; exports.MAX_UID_KEY_BYTES = MAX_UID_KEY_BYTES; exports.MAX_UID_VAL_BYTES = MAX_UID_VAL_BYTES; exports.MimeType = _chunkCSUBLTFAjs.MimeType; exports.ModuleId = ModuleId; exports.MoveAbility = _chunkCSUBLTFAjs.MoveAbility; exports.MoveFunctionVisibility = _chunkCSUBLTFAjs.MoveFunctionVisibility; exports.MoveJWK = MoveJWK; exports.MoveOption = MoveOption; exports.MoveString = MoveString; exports.MoveVector = MoveVector; exports.MultiAgentRawTransaction = MultiAgentRawTransaction; exports.MultiAgentTransaction = MultiAgentTransaction; exports.MultiEd25519Account = MultiEd25519Account; exports.MultiEd25519PublicKey = MultiEd25519PublicKey; exports.MultiEd25519Signature = MultiEd25519Signature; exports.MultiKey = MultiKey; exports.MultiKeyAccount = MultiKeyAccount; exports.MultiKeySignature = MultiKeySignature; exports.MultiSig = MultiSig; exports.MultiSigTransactionPayload = MultiSigTransactionPayload; exports.Network = Network; exports.NetworkToChainId = NetworkToChainId; exports.NetworkToFaucetAPI = NetworkToFaucetAPI; exports.NetworkToIndexerAPI = NetworkToIndexerAPI; exports.NetworkToNetworkName = NetworkToNetworkName; exports.NetworkToNodeAPI = NetworkToNodeAPI; exports.NetworkToPepperAPI = NetworkToPepperAPI; exports.NetworkToProverAPI = NetworkToProverAPI; exports.ParsingError = _chunkCSUBLTFAjs.ParsingError; exports.PrivateKey = PrivateKey; exports.PrivateKeyVariants = _chunkCSUBLTFAjs.PrivateKeyVariants; exports.ProcessorType = ProcessorType; exports.PublicKey = PublicKey; exports.RAW_TRANSACTION_SALT = RAW_TRANSACTION_SALT; exports.RAW_TRANSACTION_WITH_DATA_SALT = RAW_TRANSACTION_WITH_DATA_SALT; exports.RawTransaction = RawTransaction; exports.RawTransactionWithData = RawTransactionWithData; exports.RoleType = _chunkCSUBLTFAjs.RoleType; exports.RotationProofChallenge = RotationProofChallenge; exports.Script = Script; exports.ScriptTransactionArgumentVariants = _chunkCSUBLTFAjs.ScriptTransactionArgumentVariants; exports.Secp256k1PrivateKey = Secp256k1PrivateKey; exports.Secp256k1PublicKey = Secp256k1PublicKey; exports.Secp256k1Signature = Secp256k1Signature; exports.Serializable = _chunkCSUBLTFAjs.Serializable; exports.Serialized = Serialized; exports.Serializer = _chunkCSUBLTFAjs.Serializer; exports.Signature = Signature; exports.SignedTransaction = SignedTransaction; exports.SigningScheme = _chunkCSUBLTFAjs.SigningScheme; exports.SigningSchemeInput = _chunkCSUBLTFAjs.SigningSchemeInput; exports.SimpleTransaction = SimpleTransaction; exports.SingleKeyAccount = SingleKeyAccount; exports.StructTag = StructTag; exports.TransactionAndProof = TransactionAndProof; exports.TransactionAuthenticator = TransactionAuthenticator; exports.TransactionAuthenticatorEd25519 = TransactionAuthenticatorEd25519; exports.TransactionAuthenticatorFeePayer = TransactionAuthenticatorFeePayer; exports.TransactionAuthenticatorMultiAgent = TransactionAuthenticatorMultiAgent; exports.TransactionAuthenticatorMultiEd25519 = TransactionAuthenticatorMultiEd25519; exports.TransactionAuthenticatorSingleSender = TransactionAuthenticatorSingleSender; exports.TransactionAuthenticatorVariant = _chunkCSUBLTFAjs.TransactionAuthenticatorVariant; exports.TransactionPayload = TransactionPayload; exports.TransactionPayloadEntryFunction = TransactionPayloadEntryFunction; exports.TransactionPayloadMultiSig = TransactionPayloadMultiSig; exports.TransactionPayloadScript = TransactionPayloadScript; exports.TransactionPayloadVariants = _chunkCSUBLTFAjs.TransactionPayloadVariants; exports.TransactionResponseType = _chunkCSUBLTFAjs.TransactionResponseType; exports.TransactionVariants = _chunkCSUBLTFAjs.TransactionVariants; exports.TransactionWorker = TransactionWorker; exports.TransactionWorkerEventsEnum = TransactionWorkerEventsEnum; exports.TypeTag = TypeTag; exports.TypeTagAddress = TypeTagAddress; exports.TypeTagBool = TypeTagBool; exports.TypeTagGeneric = TypeTagGeneric; exports.TypeTagParserError = TypeTagParserError; exports.TypeTagParserErrorType = TypeTagParserErrorType; exports.TypeTagReference = TypeTagReference; exports.TypeTagSigner = TypeTagSigner; exports.TypeTagStruct = TypeTagStruct; exports.TypeTagU128 = TypeTagU128; exports.TypeTagU16 = TypeTagU16; exports.TypeTagU256 = TypeTagU256; exports.TypeTagU32 = TypeTagU32; exports.TypeTagU64 = TypeTagU64; exports.TypeTagU8 = TypeTagU8; exports.TypeTagVariants = _chunkCSUBLTFAjs.TypeTagVariants; exports.TypeTagVector = TypeTagVector; exports.U128 = U128; exports.U16 = U16; exports.U256 = U256; exports.U32 = U32; exports.U64 = U64; exports.U8 = U8; exports.ZeroKnowledgeSig = ZeroKnowledgeSig; exports.ZkProof = ZkProof; exports.ZkpVariant = _chunkCSUBLTFAjs.ZkpVariant; exports.aptosBinaryRequest = aptosBinaryRequest; exports.aptosCoinStructTag = aptosCoinStructTag; exports.aptosRequest = aptosRequest; exports.base64UrlDecode = _chunkCSUBLTFAjs.base64UrlDecode; exports.bigIntToBytesLE = bigIntToBytesLE; exports.binaryRequest = binaryRequest; exports.buildTransaction = buildTransaction; exports.bytesToBigIntLE = bytesToBigIntLE; exports.checkOrConvertArgument = checkOrConvertArgument; exports.convertAmountFromHumanReadableToOnChain = _chunkCSUBLTFAjs.convertAmountFromHumanReadableToOnChain; exports.convertAmountFromOnChainToHumanReadable = _chunkCSUBLTFAjs.convertAmountFromOnChainToHumanReadable; exports.convertArgument = convertArgument; exports.convertCallArgument = convertCallArgument; exports.convertNumber = convertNumber; exports.createObjectAddress = createObjectAddress; exports.createResourceAddress = createResourceAddress; exports.createTokenAddress = createTokenAddress; exports.deriveKey = deriveKey; exports.deriveTransactionType = deriveTransactionType; exports.deserializeFromScriptArgument = deserializeFromScriptArgument; exports.ensureBoolean = _chunkCSUBLTFAjs.ensureBoolean; exports.fetchEntryFunctionAbi = fetchEntryFunctionAbi; exports.fetchFunctionAbi = fetchFunctionAbi; exports.fetchMoveFunctionAbi = fetchMoveFunctionAbi; exports.fetchViewFunctionAbi = fetchViewFunctionAbi; exports.findFirstNonSignerArg = findFirstNonSignerArg; exports.floorToWholeHour = _chunkCSUBLTFAjs.floorToWholeHour; exports.generateRawTransaction = generateRawTransaction; exports.generateSignedTransaction = generateSignedTransaction; exports.generateSignedTransactionForSimulation = generateSignedTransactionForSimulation; exports.generateSigningMessage = generateSigningMessage; exports.generateSigningMessageForSerializable = generateSigningMessageForSerializable; exports.generateSigningMessageForTransaction = generateSigningMessageForTransaction; exports.generateTransactionPayload = generateTransactionPayload; exports.generateTransactionPayloadWithABI = generateTransactionPayloadWithABI; exports.generateUserTransactionHash = generateUserTransactionHash; exports.generateViewFunctionPayload = generateViewFunctionPayload; exports.generateViewFunctionPayloadWithABI = generateViewFunctionPayloadWithABI; exports.get = get; exports.getAptosFullNode = getAptosFullNode; exports.getAptosPepperService = getAptosPepperService; exports.getAuthenticatorForSimulation = getAuthenticatorForSimulation; exports.getBinary = getBinary; exports.getBinaryAptosFullNode = getBinaryAptosFullNode; exports.getErrorMessage = _chunkCSUBLTFAjs.getErrorMessage; exports.getFunctionParts = _chunkCSUBLTFAjs.getFunctionParts; exports.getIssAudAndUidVal = getIssAudAndUidVal; exports.getKeylessConfig = getKeylessConfig; exports.getKeylessJWKs = getKeylessJWKs; exports.hashStrToField = hashStrToField; exports.hashValues = hashValues; exports.hexToAsciiString = _chunkCSUBLTFAjs.hexToAsciiString; exports.isBcsAddress = isBcsAddress; exports.isBcsBool = isBcsBool; exports.isBcsFixedBytes = isBcsFixedBytes; exports.isBcsString = isBcsString; exports.isBcsU128 = isBcsU128; exports.isBcsU16 = isBcsU16; exports.isBcsU256 = isBcsU256; exports.isBcsU32 = isBcsU32; exports.isBcsU64 = isBcsU64; exports.isBcsU8 = isBcsU8; exports.isBlockEpilogueTransactionResponse = _chunkCSUBLTFAjs.isBlockEpilogueTransactionResponse; exports.isBlockMetadataTransactionResponse = _chunkCSUBLTFAjs.isBlockMetadataTransactionResponse; exports.isBool = isBool; exports.isCanonicalEd25519Signature = isCanonicalEd25519Signature; exports.isEd25519Signature = _chunkCSUBLTFAjs.isEd25519Signature; exports.isEmptyOption = isEmptyOption; exports.isEncodedEntryFunctionArgument = isEncodedEntryFunctionArgument; exports.isEncodedStruct = _chunkCSUBLTFAjs.isEncodedStruct; exports.isFeePayerSignature = _chunkCSUBLTFAjs.isFeePayerSignature; exports.isGenesisTransactionResponse = _chunkCSUBLTFAjs.isGenesisTransactionResponse; exports.isKeylessSigner = isKeylessSigner; exports.isLargeNumber = isLargeNumber; exports.isMultiAgentSignature = _chunkCSUBLTFAjs.isMultiAgentSignature; exports.isMultiEd25519Signature = _chunkCSUBLTFAjs.isMultiEd25519Signature; exports.isNumber = isNumber; exports.isPendingTransactionResponse = _chunkCSUBLTFAjs.isPendingTransactionResponse; exports.isScriptDataInput = isScriptDataInput; exports.isSecp256k1Signature = _chunkCSUBLTFAjs.isSecp256k1Signature; exports.isSingleKeySigner = isSingleKeySigner; exports.isSingleSenderSignature = _chunkCSUBLTFAjs.isSingleSenderSignature; exports.isStateCheckpointTransactionResponse = _chunkCSUBLTFAjs.isStateCheckpointTransactionResponse; exports.isString = isString; exports.isUserTransactionResponse = _chunkCSUBLTFAjs.isUserTransactionResponse; exports.isValidBIP44Path = isValidBIP44Path; exports.isValidFunctionInfo = _chunkCSUBLTFAjs.isValidFunctionInfo; exports.isValidHardenedPath = isValidHardenedPath; exports.isValidatorTransactionResponse = _chunkCSUBLTFAjs.isValidatorTransactionResponse; exports.mnemonicToSeed = mnemonicToSeed; exports.normalizeBundle = normalizeBundle; exports.nowInSeconds = _chunkCSUBLTFAjs.nowInSeconds; exports.objectStructTag = objectStructTag; exports.optionStructTag = optionStructTag; exports.outOfRangeErrorMessage = _chunkCSUBLTFAjs.outOfRangeErrorMessage; exports.padAndPackBytesWithLen = padAndPackBytesWithLen; exports.paginateWithCursor = paginateWithCursor; exports.paginateWithObfuscatedCursor = paginateWithObfuscatedCursor; exports.parseEncodedStruct = _chunkCSUBLTFAjs.parseEncodedStruct; exports.parseJwtHeader = parseJwtHeader; exports.parseTypeTag = parseTypeTag; exports.poseidonHash = poseidonHash; exports.post = post; exports.postAptosFaucet = postAptosFaucet; exports.postAptosFullNode = postAptosFullNode; exports.postAptosIndexer = postAptosIndexer; exports.postAptosPepperService = postAptosPepperService; exports.postAptosProvingService = postAptosProvingService; exports.postBinary = postBinary; exports.postBinaryAptosFullNode = postBinaryAptosFullNode; exports.promiseFulfilledStatus = promiseFulfilledStatus; exports.request = request; exports.sleep = _chunkCSUBLTFAjs.sleep; exports.splitPath = splitPath; exports.standardizeTypeTags = standardizeTypeTags; exports.stringStructTag = stringStructTag; exports.throwTypeMismatch = throwTypeMismatch; exports.truncateAddress = _chunkCSUBLTFAjs.truncateAddress; exports.validateNumberInRange = _chunkCSUBLTFAjs.validateNumberInRange;
18374
+
18375
+
18376
+ exports.APTOS_BIP44_REGEX = APTOS_BIP44_REGEX; exports.APTOS_COIN = APTOS_COIN; exports.APTOS_FA = APTOS_FA; exports.APTOS_HARDENED_REGEX = APTOS_HARDENED_REGEX; exports.AbstractKeylessAccount = AbstractKeylessAccount; exports.AbstractMultiKey = AbstractMultiKey; exports.AbstractedAccount = AbstractedAccount; exports.Account = Account; exports.AccountAddress = _chunkJMOQXLEDjs.AccountAddress; exports.AccountAuthenticator = AccountAuthenticator; exports.AccountAuthenticatorAbstraction = AccountAuthenticatorAbstraction; exports.AccountAuthenticatorEd25519 = AccountAuthenticatorEd25519; exports.AccountAuthenticatorMultiEd25519 = AccountAuthenticatorMultiEd25519; exports.AccountAuthenticatorMultiKey = AccountAuthenticatorMultiKey; exports.AccountAuthenticatorNoAccountAuthenticator = AccountAuthenticatorNoAccountAuthenticator; exports.AccountAuthenticatorSingleKey = AccountAuthenticatorSingleKey; exports.AccountAuthenticatorVariant = _chunkJMOQXLEDjs.AccountAuthenticatorVariant; exports.AccountPublicKey = AccountPublicKey; exports.AccountSequenceNumber = AccountSequenceNumber; exports.AccountUtils = AccountUtils; exports.AddressInvalidReason = _chunkJMOQXLEDjs.AddressInvalidReason; exports.AnyPublicKey = AnyPublicKey; exports.AnyPublicKeyVariant = _chunkJMOQXLEDjs.AnyPublicKeyVariant; exports.AnySignature = AnySignature; exports.AnySignatureVariant = _chunkJMOQXLEDjs.AnySignatureVariant; exports.Aptos = Aptos; exports.AptosApiError = AptosApiError; exports.AptosApiType = AptosApiType; exports.AptosConfig = AptosConfig; exports.AptosScriptComposer = AptosScriptComposer; exports.AuthenticationKey = AuthenticationKey; exports.Bool = Bool; exports.CKDPriv = CKDPriv; exports.CallArgument = _chunkJMOQXLEDjs.CallArgument; exports.ChainId = ChainId; exports.DEFAULT_MAX_GAS_AMOUNT = DEFAULT_MAX_GAS_AMOUNT; exports.DEFAULT_TXN_EXP_SEC_FROM_NOW = DEFAULT_TXN_EXP_SEC_FROM_NOW; exports.DEFAULT_TXN_TIMEOUT_SEC = DEFAULT_TXN_TIMEOUT_SEC; exports.DeriveScheme = _chunkJMOQXLEDjs.DeriveScheme; exports.Deserializer = Deserializer; exports.EPK_HORIZON_SECS = EPK_HORIZON_SECS; exports.Ed25519Account = Ed25519Account; exports.Ed25519PrivateKey = Ed25519PrivateKey; exports.Ed25519PublicKey = Ed25519PublicKey; exports.Ed25519Signature = Ed25519Signature; exports.EntryFunction = EntryFunction; exports.EntryFunctionBytes = EntryFunctionBytes; exports.EphemeralCertificate = EphemeralCertificate; exports.EphemeralCertificateVariant = _chunkJMOQXLEDjs.EphemeralCertificateVariant; exports.EphemeralKeyPair = EphemeralKeyPair; exports.EphemeralPublicKey = EphemeralPublicKey; exports.EphemeralPublicKeyVariant = _chunkJMOQXLEDjs.EphemeralPublicKeyVariant; exports.EphemeralSignature = EphemeralSignature; exports.EphemeralSignatureVariant = _chunkJMOQXLEDjs.EphemeralSignatureVariant; exports.FIREBASE_AUTH_ISS_PATTERN = FIREBASE_AUTH_ISS_PATTERN; exports.FederatedKeylessAccount = FederatedKeylessAccount; exports.FederatedKeylessPublicKey = FederatedKeylessPublicKey; exports.FeePayerRawTransaction = FeePayerRawTransaction; exports.FixedBytes = FixedBytes; exports.Groth16VerificationKey = Groth16VerificationKey; exports.Groth16Zkp = Groth16Zkp; exports.HARDENED_OFFSET = HARDENED_OFFSET; exports.Hex = _chunkJMOQXLEDjs.Hex; exports.HexInvalidReason = _chunkJMOQXLEDjs.HexInvalidReason; exports.Identifier = Identifier; exports.KeyType = KeyType; exports.KeylessAccount = KeylessAccount; exports.KeylessConfiguration = KeylessConfiguration; exports.KeylessError = KeylessError; exports.KeylessErrorCategory = KeylessErrorCategory; exports.KeylessErrorResolutionTip = KeylessErrorResolutionTip; exports.KeylessErrorType = KeylessErrorType; exports.KeylessPublicKey = KeylessPublicKey; exports.KeylessSignature = KeylessSignature; exports.MAX_AUD_VAL_BYTES = MAX_AUD_VAL_BYTES; exports.MAX_COMMITED_EPK_BYTES = MAX_COMMITED_EPK_BYTES; exports.MAX_EXTRA_FIELD_BYTES = MAX_EXTRA_FIELD_BYTES; exports.MAX_ISS_VAL_BYTES = MAX_ISS_VAL_BYTES; exports.MAX_JWT_HEADER_B64_BYTES = MAX_JWT_HEADER_B64_BYTES; exports.MAX_UID_KEY_BYTES = MAX_UID_KEY_BYTES; exports.MAX_UID_VAL_BYTES = MAX_UID_VAL_BYTES; exports.MimeType = _chunkJMOQXLEDjs.MimeType; exports.ModuleId = ModuleId; exports.MoveAbility = _chunkJMOQXLEDjs.MoveAbility; exports.MoveFunctionVisibility = _chunkJMOQXLEDjs.MoveFunctionVisibility; exports.MoveJWK = MoveJWK; exports.MoveOption = MoveOption; exports.MoveString = MoveString; exports.MoveVector = MoveVector; exports.MultiAgentRawTransaction = MultiAgentRawTransaction; exports.MultiAgentTransaction = MultiAgentTransaction; exports.MultiEd25519Account = MultiEd25519Account; exports.MultiEd25519PublicKey = MultiEd25519PublicKey; exports.MultiEd25519Signature = MultiEd25519Signature; exports.MultiKey = MultiKey; exports.MultiKeyAccount = MultiKeyAccount; exports.MultiKeySignature = MultiKeySignature; exports.MultiSig = MultiSig; exports.MultiSigTransactionPayload = MultiSigTransactionPayload; exports.Network = Network; exports.NetworkToChainId = NetworkToChainId; exports.NetworkToFaucetAPI = NetworkToFaucetAPI; exports.NetworkToIndexerAPI = NetworkToIndexerAPI; exports.NetworkToNetworkName = NetworkToNetworkName; exports.NetworkToNodeAPI = NetworkToNodeAPI; exports.NetworkToPepperAPI = NetworkToPepperAPI; exports.NetworkToProverAPI = NetworkToProverAPI; exports.ParsingError = _chunkJMOQXLEDjs.ParsingError; exports.PrivateKey = PrivateKey; exports.PrivateKeyVariants = _chunkJMOQXLEDjs.PrivateKeyVariants; exports.ProcessorType = ProcessorType; exports.PublicKey = PublicKey; exports.RAW_TRANSACTION_SALT = RAW_TRANSACTION_SALT; exports.RAW_TRANSACTION_WITH_DATA_SALT = RAW_TRANSACTION_WITH_DATA_SALT; exports.RawTransaction = RawTransaction; exports.RawTransactionWithData = RawTransactionWithData; exports.RoleType = _chunkJMOQXLEDjs.RoleType; exports.RotationProofChallenge = RotationProofChallenge; exports.Script = Script; exports.ScriptTransactionArgumentVariants = _chunkJMOQXLEDjs.ScriptTransactionArgumentVariants; exports.Secp256k1PrivateKey = Secp256k1PrivateKey; exports.Secp256k1PublicKey = Secp256k1PublicKey; exports.Secp256k1Signature = Secp256k1Signature; exports.Serializable = _chunkJMOQXLEDjs.Serializable; exports.Serialized = Serialized; exports.Serializer = _chunkJMOQXLEDjs.Serializer; exports.Signature = Signature; exports.SignedTransaction = SignedTransaction; exports.SigningScheme = _chunkJMOQXLEDjs.SigningScheme; exports.SigningSchemeInput = _chunkJMOQXLEDjs.SigningSchemeInput; exports.SimpleTransaction = SimpleTransaction; exports.SingleKeyAccount = SingleKeyAccount; exports.StructTag = StructTag; exports.TransactionAndProof = TransactionAndProof; exports.TransactionAuthenticator = TransactionAuthenticator; exports.TransactionAuthenticatorEd25519 = TransactionAuthenticatorEd25519; exports.TransactionAuthenticatorFeePayer = TransactionAuthenticatorFeePayer; exports.TransactionAuthenticatorMultiAgent = TransactionAuthenticatorMultiAgent; exports.TransactionAuthenticatorMultiEd25519 = TransactionAuthenticatorMultiEd25519; exports.TransactionAuthenticatorSingleSender = TransactionAuthenticatorSingleSender; exports.TransactionAuthenticatorVariant = _chunkJMOQXLEDjs.TransactionAuthenticatorVariant; exports.TransactionPayload = TransactionPayload; exports.TransactionPayloadEntryFunction = TransactionPayloadEntryFunction; exports.TransactionPayloadMultiSig = TransactionPayloadMultiSig; exports.TransactionPayloadScript = TransactionPayloadScript; exports.TransactionPayloadVariants = _chunkJMOQXLEDjs.TransactionPayloadVariants; exports.TransactionResponseType = _chunkJMOQXLEDjs.TransactionResponseType; exports.TransactionVariants = _chunkJMOQXLEDjs.TransactionVariants; exports.TransactionWorker = TransactionWorker; exports.TransactionWorkerEventsEnum = TransactionWorkerEventsEnum; exports.TypeTag = TypeTag; exports.TypeTagAddress = TypeTagAddress; exports.TypeTagBool = TypeTagBool; exports.TypeTagGeneric = TypeTagGeneric; exports.TypeTagParserError = TypeTagParserError; exports.TypeTagParserErrorType = TypeTagParserErrorType; exports.TypeTagReference = TypeTagReference; exports.TypeTagSigner = TypeTagSigner; exports.TypeTagStruct = TypeTagStruct; exports.TypeTagU128 = TypeTagU128; exports.TypeTagU16 = TypeTagU16; exports.TypeTagU256 = TypeTagU256; exports.TypeTagU32 = TypeTagU32; exports.TypeTagU64 = TypeTagU64; exports.TypeTagU8 = TypeTagU8; exports.TypeTagVariants = _chunkJMOQXLEDjs.TypeTagVariants; exports.TypeTagVector = TypeTagVector; exports.U128 = U128; exports.U16 = U16; exports.U256 = U256; exports.U32 = U32; exports.U64 = U64; exports.U8 = U8; exports.ZeroKnowledgeSig = ZeroKnowledgeSig; exports.ZkProof = ZkProof; exports.ZkpVariant = _chunkJMOQXLEDjs.ZkpVariant; exports.aptosBinaryRequest = aptosBinaryRequest; exports.aptosCoinStructTag = aptosCoinStructTag; exports.aptosRequest = aptosRequest; exports.base64UrlDecode = _chunkJMOQXLEDjs.base64UrlDecode; exports.bigIntToBytesLE = bigIntToBytesLE; exports.binaryRequest = binaryRequest; exports.buildTransaction = buildTransaction; exports.bytesToBigIntLE = bytesToBigIntLE; exports.checkOrConvertArgument = checkOrConvertArgument; exports.convertAmountFromHumanReadableToOnChain = _chunkJMOQXLEDjs.convertAmountFromHumanReadableToOnChain; exports.convertAmountFromOnChainToHumanReadable = _chunkJMOQXLEDjs.convertAmountFromOnChainToHumanReadable; exports.convertArgument = convertArgument; exports.convertCallArgument = convertCallArgument; exports.convertNumber = convertNumber; exports.createObjectAddress = createObjectAddress; exports.createResourceAddress = createResourceAddress; exports.createTokenAddress = createTokenAddress; exports.deriveKey = deriveKey; exports.deriveTransactionType = deriveTransactionType; exports.deserializeFromScriptArgument = deserializeFromScriptArgument; exports.ensureBoolean = _chunkJMOQXLEDjs.ensureBoolean; exports.fetchEntryFunctionAbi = fetchEntryFunctionAbi; exports.fetchFunctionAbi = fetchFunctionAbi; exports.fetchMoveFunctionAbi = fetchMoveFunctionAbi; exports.fetchViewFunctionAbi = fetchViewFunctionAbi; exports.findFirstNonSignerArg = findFirstNonSignerArg; exports.floorToWholeHour = _chunkJMOQXLEDjs.floorToWholeHour; exports.generateRawTransaction = generateRawTransaction; exports.generateSignedTransaction = generateSignedTransaction; exports.generateSignedTransactionForSimulation = generateSignedTransactionForSimulation; exports.generateSigningMessage = generateSigningMessage; exports.generateSigningMessageForSerializable = generateSigningMessageForSerializable; exports.generateSigningMessageForTransaction = generateSigningMessageForTransaction; exports.generateTransactionPayload = generateTransactionPayload; exports.generateTransactionPayloadWithABI = generateTransactionPayloadWithABI; exports.generateUserTransactionHash = generateUserTransactionHash; exports.generateViewFunctionPayload = generateViewFunctionPayload; exports.generateViewFunctionPayloadWithABI = generateViewFunctionPayloadWithABI; exports.get = get; exports.getAptosFullNode = getAptosFullNode; exports.getAptosPepperService = getAptosPepperService; exports.getAuthenticatorForSimulation = getAuthenticatorForSimulation; exports.getBinary = getBinary; exports.getBinaryAptosFullNode = getBinaryAptosFullNode; exports.getErrorMessage = _chunkJMOQXLEDjs.getErrorMessage; exports.getFunctionParts = _chunkJMOQXLEDjs.getFunctionParts; exports.getIssAudAndUidVal = getIssAudAndUidVal; exports.getKeylessConfig = getKeylessConfig; exports.getKeylessJWKs = getKeylessJWKs; exports.hashStrToField = hashStrToField; exports.hashValues = hashValues; exports.hexToAsciiString = _chunkJMOQXLEDjs.hexToAsciiString; exports.isBcsAddress = isBcsAddress; exports.isBcsBool = isBcsBool; exports.isBcsFixedBytes = isBcsFixedBytes; exports.isBcsString = isBcsString; exports.isBcsU128 = isBcsU128; exports.isBcsU16 = isBcsU16; exports.isBcsU256 = isBcsU256; exports.isBcsU32 = isBcsU32; exports.isBcsU64 = isBcsU64; exports.isBcsU8 = isBcsU8; exports.isBlockEpilogueTransactionResponse = _chunkJMOQXLEDjs.isBlockEpilogueTransactionResponse; exports.isBlockMetadataTransactionResponse = _chunkJMOQXLEDjs.isBlockMetadataTransactionResponse; exports.isBool = isBool; exports.isCanonicalEd25519Signature = isCanonicalEd25519Signature; exports.isEd25519Signature = _chunkJMOQXLEDjs.isEd25519Signature; exports.isEmptyOption = isEmptyOption; exports.isEncodedEntryFunctionArgument = isEncodedEntryFunctionArgument; exports.isEncodedStruct = _chunkJMOQXLEDjs.isEncodedStruct; exports.isFeePayerSignature = _chunkJMOQXLEDjs.isFeePayerSignature; exports.isGenesisTransactionResponse = _chunkJMOQXLEDjs.isGenesisTransactionResponse; exports.isKeylessSigner = isKeylessSigner; exports.isLargeNumber = isLargeNumber; exports.isMultiAgentSignature = _chunkJMOQXLEDjs.isMultiAgentSignature; exports.isMultiEd25519Signature = _chunkJMOQXLEDjs.isMultiEd25519Signature; exports.isNumber = isNumber; exports.isPendingTransactionResponse = _chunkJMOQXLEDjs.isPendingTransactionResponse; exports.isScriptDataInput = isScriptDataInput; exports.isSecp256k1Signature = _chunkJMOQXLEDjs.isSecp256k1Signature; exports.isSingleKeySigner = isSingleKeySigner; exports.isSingleSenderMultiKeySignature = _chunkJMOQXLEDjs.isSingleSenderMultiKeySignature; exports.isSingleSenderSignature = _chunkJMOQXLEDjs.isSingleSenderSignature; exports.isSingleSenderSingleKeySignature = _chunkJMOQXLEDjs.isSingleSenderSingleKeySignature; exports.isStateCheckpointTransactionResponse = _chunkJMOQXLEDjs.isStateCheckpointTransactionResponse; exports.isString = isString; exports.isUserTransactionResponse = _chunkJMOQXLEDjs.isUserTransactionResponse; exports.isValidBIP44Path = isValidBIP44Path; exports.isValidFunctionInfo = _chunkJMOQXLEDjs.isValidFunctionInfo; exports.isValidHardenedPath = isValidHardenedPath; exports.isValidatorTransactionResponse = _chunkJMOQXLEDjs.isValidatorTransactionResponse; exports.mnemonicToSeed = mnemonicToSeed; exports.normalizeBundle = normalizeBundle; exports.nowInSeconds = _chunkJMOQXLEDjs.nowInSeconds; exports.objectStructTag = objectStructTag; exports.optionStructTag = optionStructTag; exports.outOfRangeErrorMessage = _chunkJMOQXLEDjs.outOfRangeErrorMessage; exports.padAndPackBytesWithLen = padAndPackBytesWithLen; exports.paginateWithCursor = paginateWithCursor; exports.paginateWithObfuscatedCursor = paginateWithObfuscatedCursor; exports.parseEncodedStruct = _chunkJMOQXLEDjs.parseEncodedStruct; exports.parseJwtHeader = parseJwtHeader; exports.parseTypeTag = parseTypeTag; exports.poseidonHash = poseidonHash; exports.post = post; exports.postAptosFaucet = postAptosFaucet; exports.postAptosFullNode = postAptosFullNode; exports.postAptosIndexer = postAptosIndexer; exports.postAptosPepperService = postAptosPepperService; exports.postAptosProvingService = postAptosProvingService; exports.postBinary = postBinary; exports.postBinaryAptosFullNode = postBinaryAptosFullNode; exports.promiseFulfilledStatus = promiseFulfilledStatus; exports.request = request; exports.sleep = _chunkJMOQXLEDjs.sleep; exports.splitPath = splitPath; exports.standardizeTypeTags = standardizeTypeTags; exports.stringStructTag = stringStructTag; exports.throwTypeMismatch = throwTypeMismatch; exports.truncateAddress = _chunkJMOQXLEDjs.truncateAddress; exports.validateNumberInRange = _chunkJMOQXLEDjs.validateNumberInRange;
18341
18377
  //# sourceMappingURL=index.js.map