@aptos-labs/ts-sdk 1.14.0 → 1.15.0-win.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/dist/common/{accountAddress-csDQ8Gnp.d.ts → accountAddress-ccLvlUQe.d.ts} +20 -1
  2. package/dist/common/cli/index.d.ts +1 -1
  3. package/dist/common/cli/index.js +1 -1
  4. package/dist/common/cli/index.js.map +1 -1
  5. package/dist/common/index.d.ts +1624 -1390
  6. package/dist/common/index.js +42 -13
  7. package/dist/common/index.js.map +1 -1
  8. package/dist/esm/{Ed25519Account--qjfup2u.d.mts → Ed25519Account-B1VMJOY2.d.mts} +77 -10
  9. package/dist/esm/account/Account.d.mts +34 -0
  10. package/dist/esm/account/Account.mjs +2 -0
  11. package/dist/esm/account/Ed25519Account.d.mts +34 -0
  12. package/dist/esm/account/Ed25519Account.mjs +2 -0
  13. package/dist/esm/account/MultiKeyAccount.d.mts +133 -0
  14. package/dist/esm/account/MultiKeyAccount.mjs +2 -0
  15. package/dist/esm/account/SingleKeyAccount.d.mts +34 -0
  16. package/dist/esm/account/SingleKeyAccount.mjs +2 -0
  17. package/dist/esm/account/index.d.mts +35 -0
  18. package/dist/esm/account/index.mjs +2 -0
  19. package/dist/esm/api/account.d.mts +14 -2
  20. package/dist/esm/api/account.mjs +1 -1
  21. package/dist/esm/api/ans.d.mts +3 -3
  22. package/dist/esm/api/ans.mjs +1 -1
  23. package/dist/esm/api/aptos.d.mts +11 -9
  24. package/dist/esm/api/aptos.mjs +1 -1
  25. package/dist/esm/api/coin.d.mts +7 -7
  26. package/dist/esm/api/coin.mjs +1 -1
  27. package/dist/esm/api/digitalAsset.d.mts +2 -2
  28. package/dist/esm/api/digitalAsset.mjs +1 -1
  29. package/dist/esm/api/event.mjs +1 -1
  30. package/dist/esm/api/faucet.mjs +1 -1
  31. package/dist/esm/api/fungibleAsset.d.mts +6 -6
  32. package/dist/esm/api/fungibleAsset.mjs +1 -1
  33. package/dist/esm/api/general.d.mts +8 -33
  34. package/dist/esm/api/general.mjs +1 -1
  35. package/dist/esm/api/index.d.mts +10 -9
  36. package/dist/esm/api/index.mjs +1 -1
  37. package/dist/esm/api/staking.mjs +1 -1
  38. package/dist/esm/api/table.d.mts +84 -0
  39. package/dist/esm/api/table.mjs +2 -0
  40. package/dist/esm/api/transaction.d.mts +2 -2
  41. package/dist/esm/api/transaction.mjs +1 -1
  42. package/dist/esm/api/transactionSubmission/build.d.mts +2 -2
  43. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  44. package/dist/esm/api/transactionSubmission/management.d.mts +9 -9
  45. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  46. package/dist/esm/api/transactionSubmission/sign.d.mts +2 -2
  47. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  48. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  49. package/dist/esm/api/transactionSubmission/simulate.d.mts +7 -7
  50. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  51. package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
  52. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  53. package/dist/esm/api/utils.mjs +1 -1
  54. package/dist/esm/bcs/index.mjs +1 -1
  55. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  56. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  57. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  58. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  59. package/dist/esm/bcs/serializer.mjs +1 -1
  60. package/dist/esm/{chunk-O4JRPZZM.mjs → chunk-2X7A4HUS.mjs} +2 -2
  61. package/dist/esm/{chunk-PXFIA4BL.mjs → chunk-2XK53QFA.mjs} +2 -2
  62. package/dist/esm/{chunk-CDB34C4N.mjs → chunk-2YZSEM2G.mjs} +2 -2
  63. package/dist/esm/chunk-2YZSEM2G.mjs.map +1 -0
  64. package/dist/esm/{chunk-RHBCVCOS.mjs → chunk-35EWRSDK.mjs} +2 -2
  65. package/dist/esm/{chunk-52C73T26.mjs → chunk-36QXVFR5.mjs} +2 -2
  66. package/dist/esm/chunk-3HSXKDOC.mjs +2 -0
  67. package/dist/esm/chunk-3HSXKDOC.mjs.map +1 -0
  68. package/dist/esm/chunk-3N6N3KOS.mjs +2 -0
  69. package/dist/esm/chunk-3N6N3KOS.mjs.map +1 -0
  70. package/dist/esm/{chunk-NWYIE7ZX.mjs → chunk-477G7LHJ.mjs} +2 -2
  71. package/dist/esm/chunk-4NHWV5AI.mjs +2 -0
  72. package/dist/esm/{chunk-NPFNYP75.mjs → chunk-5EN52MUT.mjs} +2 -2
  73. package/dist/esm/{chunk-L5IL2IAB.mjs → chunk-5VIESFOC.mjs} +2 -2
  74. package/dist/esm/{chunk-BIAEC6FO.mjs → chunk-5YLAWRI2.mjs} +2 -2
  75. package/dist/esm/{chunk-N77VJHW5.mjs → chunk-6JLYD5Q2.mjs} +2 -2
  76. package/dist/esm/chunk-6XWDDCQD.mjs +2 -0
  77. package/dist/esm/chunk-6XWDDCQD.mjs.map +1 -0
  78. package/dist/esm/{chunk-BE4FOV6X.mjs → chunk-7NEETXEA.mjs} +2 -2
  79. package/dist/esm/chunk-7VRZLDIJ.mjs +2 -0
  80. package/dist/esm/{chunk-PMUT3HZE.mjs → chunk-ACG4ZGRQ.mjs} +2 -2
  81. package/dist/esm/chunk-ACG4ZGRQ.mjs.map +1 -0
  82. package/dist/esm/chunk-AQAH67IV.mjs +2 -0
  83. package/dist/esm/chunk-B7X6PSE7.mjs +2 -0
  84. package/dist/esm/{chunk-AOCNYMMX.mjs → chunk-BCUSI3N6.mjs} +2 -2
  85. package/dist/esm/{chunk-BAV4XY7C.mjs → chunk-BHLICYAI.mjs} +2 -2
  86. package/dist/esm/chunk-BO2TLWNT.mjs +2 -0
  87. package/dist/esm/chunk-CEHCDA3G.mjs +2 -0
  88. package/dist/esm/chunk-CJDEPZ4J.mjs +2 -0
  89. package/dist/esm/{chunk-CPBGL37X.mjs.map → chunk-CJDEPZ4J.mjs.map} +1 -1
  90. package/dist/esm/{chunk-4P5EKAJB.mjs → chunk-CWUH4PNH.mjs} +2 -2
  91. package/dist/esm/chunk-DLAIJ2UM.mjs +2 -0
  92. package/dist/esm/chunk-DLAIJ2UM.mjs.map +1 -0
  93. package/dist/esm/{chunk-HG4Q4EFG.mjs → chunk-E2NVC2VR.mjs} +2 -2
  94. package/dist/esm/chunk-E2NVC2VR.mjs.map +1 -0
  95. package/dist/esm/chunk-F7EMGK4M.mjs +2 -0
  96. package/dist/esm/{chunk-FS3NSGBF.mjs → chunk-G56GPLTB.mjs} +2 -2
  97. package/dist/esm/{chunk-6FBKUTGF.mjs → chunk-GHYE26Q5.mjs} +2 -2
  98. package/dist/esm/{chunk-P3UFJZY5.mjs → chunk-GIAABV7R.mjs} +2 -2
  99. package/dist/esm/chunk-GIAABV7R.mjs.map +1 -0
  100. package/dist/esm/chunk-GKJ2NJG5.mjs +2 -0
  101. package/dist/esm/chunk-GKJ2NJG5.mjs.map +1 -0
  102. package/dist/esm/{chunk-QTRYMRYK.mjs → chunk-GM56MMNJ.mjs} +2 -2
  103. package/dist/esm/chunk-HMARHACL.mjs +2 -0
  104. package/dist/esm/chunk-HMARHACL.mjs.map +1 -0
  105. package/dist/esm/chunk-HNEAPYNI.mjs +2 -0
  106. package/dist/esm/{chunk-S2LTZKM4.mjs → chunk-HSJTQLI2.mjs} +2 -2
  107. package/dist/esm/{chunk-AT2A6UGB.mjs → chunk-IENCDVPF.mjs} +2 -2
  108. package/dist/esm/{chunk-AT2A6UGB.mjs.map → chunk-IENCDVPF.mjs.map} +1 -1
  109. package/dist/esm/{chunk-2G4ZSGL4.mjs → chunk-IZQV2SU6.mjs} +2 -2
  110. package/dist/esm/chunk-J6OFSYUA.mjs +2 -0
  111. package/dist/esm/chunk-J6OFSYUA.mjs.map +1 -0
  112. package/dist/esm/chunk-JB5H65CE.mjs +2 -0
  113. package/dist/esm/chunk-JB5H65CE.mjs.map +1 -0
  114. package/dist/esm/chunk-JFIAWBCK.mjs +2 -0
  115. package/dist/esm/chunk-JFIAWBCK.mjs.map +1 -0
  116. package/dist/esm/chunk-JQIGQMNZ.mjs +2 -0
  117. package/dist/esm/chunk-JQIGQMNZ.mjs.map +1 -0
  118. package/dist/esm/chunk-JXCZTOYC.mjs +1 -0
  119. package/dist/esm/chunk-JXCZTOYC.mjs.map +1 -0
  120. package/dist/esm/chunk-K7HX7JQH.mjs +2 -0
  121. package/dist/esm/chunk-K7HX7JQH.mjs.map +1 -0
  122. package/dist/esm/{chunk-UML2VQZT.mjs → chunk-KAGLWBIJ.mjs} +2 -2
  123. package/dist/esm/chunk-LG7RJQ57.mjs +2 -0
  124. package/dist/esm/{chunk-XO3HHRJV.mjs → chunk-MCRRHBFQ.mjs} +2 -2
  125. package/dist/esm/{chunk-U43IJHQN.mjs → chunk-MJPUASSD.mjs} +2 -2
  126. package/dist/esm/chunk-MQI2IE6Y.mjs +2 -0
  127. package/dist/esm/chunk-MQI2IE6Y.mjs.map +1 -0
  128. package/dist/esm/chunk-N3U47Y6Y.mjs +2 -0
  129. package/dist/esm/{chunk-JCD72AW7.mjs → chunk-NZETF6Z4.mjs} +2 -2
  130. package/dist/esm/{chunk-UPIN5AIO.mjs → chunk-P6GWG2CY.mjs} +2 -2
  131. package/dist/esm/chunk-PF57EOJY.mjs +2 -0
  132. package/dist/esm/chunk-PIVZMT5D.mjs +2 -0
  133. package/dist/esm/chunk-PIVZMT5D.mjs.map +1 -0
  134. package/dist/esm/{chunk-HWECUBBA.mjs → chunk-PLXGSUZA.mjs} +2 -2
  135. package/dist/esm/chunk-PLXGSUZA.mjs.map +1 -0
  136. package/dist/esm/{chunk-PYXJYEAC.mjs → chunk-PPO4IXE4.mjs} +2 -2
  137. package/dist/esm/chunk-PPO4IXE4.mjs.map +1 -0
  138. package/dist/esm/{chunk-SPU745XV.mjs → chunk-QIHR7HD6.mjs} +2 -2
  139. package/dist/esm/chunk-QQ5PHEJF.mjs +2 -0
  140. package/dist/esm/chunk-QQ5PHEJF.mjs.map +1 -0
  141. package/dist/esm/{chunk-IOSQVDZI.mjs → chunk-QRS4DGP3.mjs} +2 -2
  142. package/dist/esm/{chunk-IOSQVDZI.mjs.map → chunk-QRS4DGP3.mjs.map} +1 -1
  143. package/dist/esm/{chunk-LDQ6JFEF.mjs → chunk-QSHLNSUP.mjs} +2 -2
  144. package/dist/esm/{chunk-LDQ6JFEF.mjs.map → chunk-QSHLNSUP.mjs.map} +1 -1
  145. package/dist/esm/chunk-RFSO3JRG.mjs +1 -0
  146. package/dist/esm/chunk-RFSO3JRG.mjs.map +1 -0
  147. package/dist/esm/chunk-RVWYURXG.mjs +2 -0
  148. package/dist/esm/chunk-RVWYURXG.mjs.map +1 -0
  149. package/dist/esm/{chunk-QD2Y3VK4.mjs → chunk-RYD6HRW7.mjs} +2 -2
  150. package/dist/esm/chunk-RYD6HRW7.mjs.map +1 -0
  151. package/dist/esm/{chunk-APDALGDD.mjs → chunk-S2VSJJRJ.mjs} +2 -2
  152. package/dist/esm/{chunk-S4SEFF4K.mjs → chunk-S3EDNXZE.mjs} +46 -17
  153. package/dist/esm/chunk-S3EDNXZE.mjs.map +1 -0
  154. package/dist/esm/chunk-SRDIYE3M.mjs +2 -0
  155. package/dist/esm/{chunk-QIAHBEEW.mjs.map → chunk-SRDIYE3M.mjs.map} +1 -1
  156. package/dist/esm/{chunk-CNMQNPNV.mjs → chunk-T2AGN5YT.mjs} +2 -2
  157. package/dist/esm/chunk-TGQARO3F.mjs +2 -0
  158. package/dist/esm/chunk-TGQARO3F.mjs.map +1 -0
  159. package/dist/esm/chunk-TM7NDDT3.mjs +2 -0
  160. package/dist/esm/chunk-TM7NDDT3.mjs.map +1 -0
  161. package/dist/esm/{chunk-3YZGJLW7.mjs → chunk-TT2XR5ZI.mjs} +2 -2
  162. package/dist/esm/{chunk-DMKUAQB7.mjs → chunk-U3YYSIIT.mjs} +2 -2
  163. package/dist/esm/chunk-UGPALAPN.mjs +2 -0
  164. package/dist/esm/{chunk-5HY3DEPF.mjs → chunk-UKSRF2Q3.mjs} +2 -2
  165. package/dist/esm/chunk-UO3NZ5AH.mjs +1 -0
  166. package/dist/esm/chunk-UO3NZ5AH.mjs.map +1 -0
  167. package/dist/esm/{chunk-FXNFWLQC.mjs → chunk-UPSCPEEE.mjs} +2 -2
  168. package/dist/esm/chunk-WXWWYH73.mjs +2 -0
  169. package/dist/esm/chunk-WXWWYH73.mjs.map +1 -0
  170. package/dist/esm/{chunk-6OV2PQS5.mjs → chunk-XBHFMNYB.mjs} +2 -2
  171. package/dist/esm/{chunk-RW2A63WK.mjs → chunk-XD46HTI2.mjs} +2 -2
  172. package/dist/esm/chunk-XD46HTI2.mjs.map +1 -0
  173. package/dist/esm/{chunk-WCVUDO5S.mjs → chunk-XFSDV3ND.mjs} +2 -2
  174. package/dist/esm/{chunk-UDRSFVAK.mjs → chunk-YMB2XW2O.mjs} +2 -2
  175. package/dist/esm/chunk-ZBXOX3S7.mjs +2 -0
  176. package/dist/esm/cli/index.d.mts +1 -1
  177. package/dist/esm/cli/index.mjs +1 -1
  178. package/dist/esm/cli/move.d.mts +1 -1
  179. package/dist/esm/cli/move.mjs +1 -1
  180. package/dist/esm/client/core.mjs +1 -1
  181. package/dist/esm/client/get.mjs +1 -1
  182. package/dist/esm/client/index.mjs +1 -1
  183. package/dist/esm/client/post.mjs +1 -1
  184. package/dist/esm/client/types.mjs +1 -1
  185. package/dist/esm/core/account/index.d.mts +5 -14
  186. package/dist/esm/core/account/index.mjs +1 -1
  187. package/dist/esm/core/account/utils/address.mjs +1 -1
  188. package/dist/esm/core/account/utils/index.mjs +1 -1
  189. package/dist/esm/core/accountAddress.mjs +1 -1
  190. package/dist/esm/core/authenticationKey.d.mts +1 -1
  191. package/dist/esm/core/authenticationKey.mjs +1 -1
  192. package/dist/esm/core/common.mjs +1 -1
  193. package/dist/esm/core/crypto/ed25519.d.mts +1 -1
  194. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  195. package/dist/esm/core/crypto/index.d.mts +4 -4
  196. package/dist/esm/core/crypto/index.mjs +1 -1
  197. package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
  198. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  199. package/dist/esm/core/crypto/multiKey.d.mts +8 -1
  200. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  201. package/dist/esm/core/crypto/privateKey.d.mts +1 -1
  202. package/dist/esm/core/crypto/publicKey.d.mts +1 -1
  203. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  204. package/dist/esm/core/crypto/secp256k1.d.mts +1 -1
  205. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  206. package/dist/esm/core/crypto/signature.mjs +1 -1
  207. package/dist/esm/core/crypto/singleKey.d.mts +1 -1
  208. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  209. package/dist/esm/core/crypto/utils.mjs +1 -1
  210. package/dist/esm/core/hex.mjs +1 -1
  211. package/dist/esm/core/index.d.mts +3 -6
  212. package/dist/esm/core/index.mjs +1 -1
  213. package/dist/esm/index.d.mts +7 -5
  214. package/dist/esm/index.mjs +1 -1
  215. package/dist/esm/internal/account.d.mts +15 -3
  216. package/dist/esm/internal/account.mjs +1 -1
  217. package/dist/esm/internal/ans.d.mts +3 -3
  218. package/dist/esm/internal/ans.mjs +1 -1
  219. package/dist/esm/internal/coin.d.mts +8 -8
  220. package/dist/esm/internal/coin.mjs +1 -1
  221. package/dist/esm/internal/digitalAsset.d.mts +3 -3
  222. package/dist/esm/internal/digitalAsset.mjs +1 -1
  223. package/dist/esm/internal/event.d.mts +1 -1
  224. package/dist/esm/internal/event.mjs +1 -1
  225. package/dist/esm/internal/faucet.d.mts +1 -1
  226. package/dist/esm/internal/faucet.mjs +1 -1
  227. package/dist/esm/internal/fungibleAsset.d.mts +6 -6
  228. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  229. package/dist/esm/internal/general.d.mts +2 -8
  230. package/dist/esm/internal/general.mjs +1 -1
  231. package/dist/esm/internal/staking.d.mts +1 -1
  232. package/dist/esm/internal/staking.mjs +1 -1
  233. package/dist/esm/internal/table.d.mts +31 -0
  234. package/dist/esm/internal/table.mjs +2 -0
  235. package/dist/esm/internal/table.mjs.map +1 -0
  236. package/dist/esm/internal/transaction.mjs +1 -1
  237. package/dist/esm/internal/transactionSubmission.d.mts +2 -2
  238. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  239. package/dist/esm/internal/view.d.mts +7 -7
  240. package/dist/esm/internal/view.mjs +1 -1
  241. package/dist/esm/transactions/authenticator/account.d.mts +4 -5
  242. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  243. package/dist/esm/transactions/authenticator/index.d.mts +1 -1
  244. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  245. package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
  246. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  247. package/dist/esm/transactions/index.d.mts +3 -3
  248. package/dist/esm/transactions/index.mjs +1 -1
  249. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  250. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  251. package/dist/esm/transactions/instances/index.d.mts +1 -1
  252. package/dist/esm/transactions/instances/index.mjs +1 -1
  253. package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
  254. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  255. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  256. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  257. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
  258. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  259. package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
  260. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  261. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  262. package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
  263. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  264. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +14 -2
  265. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  266. package/dist/esm/transactions/management/index.d.mts +3 -3
  267. package/dist/esm/transactions/management/index.mjs +1 -1
  268. package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
  269. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  270. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +9 -9
  271. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  272. package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -9
  273. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  274. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +6 -6
  275. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  276. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +72 -0
  277. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +2 -0
  278. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs.map +1 -0
  279. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +7 -29
  280. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  281. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  282. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  283. package/dist/esm/transactions/types.d.mts +7 -7
  284. package/dist/esm/types/generated/operations.d.mts +31 -2
  285. package/dist/esm/types/generated/queries.d.mts +6 -2
  286. package/dist/esm/types/generated/queries.mjs +1 -1
  287. package/dist/esm/types/generated/types.d.mts +212 -7
  288. package/dist/esm/types/generated/types.mjs +1 -1
  289. package/dist/esm/types/generated/types.mjs.map +1 -1
  290. package/dist/esm/types/index.d.mts +1 -1
  291. package/dist/esm/types/indexer.d.mts +4 -2
  292. package/dist/esm/utils/index.mjs +1 -1
  293. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  294. package/dist/esm/version.d.mts +1 -1
  295. package/dist/esm/version.mjs +1 -1
  296. package/package.json +2 -2
  297. package/src/{core/account → account}/Account.ts +25 -15
  298. package/src/{core/account → account}/Ed25519Account.ts +45 -9
  299. package/src/account/MultiKeyAccount.ts +176 -0
  300. package/src/{core/account → account}/SingleKeyAccount.ts +45 -10
  301. package/src/account/index.ts +4 -0
  302. package/src/api/account.ts +2 -1
  303. package/src/api/ans.ts +2 -1
  304. package/src/api/aptos.ts +6 -0
  305. package/src/api/digitalAsset.ts +2 -1
  306. package/src/api/fungibleAsset.ts +2 -1
  307. package/src/api/general.ts +0 -26
  308. package/src/api/table.ts +108 -0
  309. package/src/api/transaction.ts +2 -1
  310. package/src/api/transactionSubmission/management.ts +1 -1
  311. package/src/api/transactionSubmission/sign.ts +1 -1
  312. package/src/cli/move.ts +1 -1
  313. package/src/core/account/index.ts +0 -3
  314. package/src/core/crypto/multiKey.ts +17 -6
  315. package/src/core/index.ts +0 -1
  316. package/src/index.ts +1 -0
  317. package/src/internal/account.ts +3 -2
  318. package/src/internal/ans.ts +2 -1
  319. package/src/internal/digitalAsset.ts +2 -1
  320. package/src/internal/fungibleAsset.ts +2 -1
  321. package/src/internal/general.ts +1 -20
  322. package/src/internal/queries/currentTokenOwnershipFieldsFragment.graphql +1 -0
  323. package/src/internal/queries/getTableItemsData.graphql +15 -0
  324. package/src/internal/queries/getTableItemsMetadata.graphql +12 -0
  325. package/src/internal/table.ts +82 -0
  326. package/src/internal/transactionSubmission.ts +5 -7
  327. package/src/transactions/authenticator/account.ts +6 -11
  328. package/src/transactions/management/accountSequenceNumber.ts +1 -1
  329. package/src/transactions/management/transactionWorker.ts +1 -1
  330. package/src/transactions/transactionBuilder/index.ts +1 -0
  331. package/src/transactions/transactionBuilder/signingMessage.ts +93 -0
  332. package/src/transactions/transactionBuilder/transactionBuilder.ts +2 -73
  333. package/src/types/generated/operations.ts +29 -0
  334. package/src/types/generated/queries.ts +59 -0
  335. package/src/types/generated/types.ts +223 -4
  336. package/src/types/indexer.ts +4 -0
  337. package/src/version.ts +1 -1
  338. package/dist/esm/chunk-4374JPA6.mjs +0 -2
  339. package/dist/esm/chunk-4374JPA6.mjs.map +0 -1
  340. package/dist/esm/chunk-62P5CJAJ.mjs +0 -2
  341. package/dist/esm/chunk-62P5CJAJ.mjs.map +0 -1
  342. package/dist/esm/chunk-B3BRR4WP.mjs +0 -2
  343. package/dist/esm/chunk-B3BRR4WP.mjs.map +0 -1
  344. package/dist/esm/chunk-BWFJHFBQ.mjs +0 -2
  345. package/dist/esm/chunk-CDB34C4N.mjs.map +0 -1
  346. package/dist/esm/chunk-CF5R4HVB.mjs +0 -2
  347. package/dist/esm/chunk-CPBGL37X.mjs +0 -2
  348. package/dist/esm/chunk-DSTKXJMA.mjs +0 -2
  349. package/dist/esm/chunk-E7FWVXGX.mjs +0 -1
  350. package/dist/esm/chunk-FBPNHF54.mjs +0 -2
  351. package/dist/esm/chunk-HG4Q4EFG.mjs.map +0 -1
  352. package/dist/esm/chunk-HWECUBBA.mjs.map +0 -1
  353. package/dist/esm/chunk-IR46T46A.mjs +0 -2
  354. package/dist/esm/chunk-IR46T46A.mjs.map +0 -1
  355. package/dist/esm/chunk-LBGYH45K.mjs +0 -2
  356. package/dist/esm/chunk-LBGYH45K.mjs.map +0 -1
  357. package/dist/esm/chunk-MFL3UCKA.mjs +0 -2
  358. package/dist/esm/chunk-MFL3UCKA.mjs.map +0 -1
  359. package/dist/esm/chunk-MLWIHWNH.mjs +0 -1
  360. package/dist/esm/chunk-NBCHJ75L.mjs +0 -2
  361. package/dist/esm/chunk-NBCHJ75L.mjs.map +0 -1
  362. package/dist/esm/chunk-NZGRLKRG.mjs +0 -2
  363. package/dist/esm/chunk-OGHE4AQA.mjs +0 -2
  364. package/dist/esm/chunk-P3UFJZY5.mjs.map +0 -1
  365. package/dist/esm/chunk-PJPXC22D.mjs +0 -2
  366. package/dist/esm/chunk-PJPXC22D.mjs.map +0 -1
  367. package/dist/esm/chunk-PMUT3HZE.mjs.map +0 -1
  368. package/dist/esm/chunk-PYXJYEAC.mjs.map +0 -1
  369. package/dist/esm/chunk-QD2Y3VK4.mjs.map +0 -1
  370. package/dist/esm/chunk-QIAHBEEW.mjs +0 -2
  371. package/dist/esm/chunk-QIAU5K5Y.mjs +0 -2
  372. package/dist/esm/chunk-QIAU5K5Y.mjs.map +0 -1
  373. package/dist/esm/chunk-R5QUBEH6.mjs +0 -2
  374. package/dist/esm/chunk-R7G3CLRI.mjs +0 -1
  375. package/dist/esm/chunk-RR7I2HLA.mjs +0 -2
  376. package/dist/esm/chunk-RR7I2HLA.mjs.map +0 -1
  377. package/dist/esm/chunk-RW2A63WK.mjs.map +0 -1
  378. package/dist/esm/chunk-S4SEFF4K.mjs.map +0 -1
  379. package/dist/esm/chunk-TBMAJ6AW.mjs +0 -2
  380. package/dist/esm/chunk-TGXZVNR5.mjs +0 -2
  381. package/dist/esm/chunk-TJDC5PWD.mjs +0 -2
  382. package/dist/esm/chunk-UF534PKA.mjs +0 -2
  383. package/dist/esm/chunk-UF534PKA.mjs.map +0 -1
  384. package/dist/esm/chunk-UMDTVVQC.mjs +0 -2
  385. package/dist/esm/chunk-UMDTVVQC.mjs.map +0 -1
  386. package/dist/esm/chunk-UNU3RVRJ.mjs +0 -2
  387. package/dist/esm/chunk-WFZDFFBM.mjs +0 -2
  388. package/dist/esm/chunk-XIJHRBDL.mjs +0 -2
  389. package/dist/esm/chunk-XIJHRBDL.mjs.map +0 -1
  390. package/dist/esm/chunk-ZEHKHKBP.mjs +0 -2
  391. package/dist/esm/chunk-ZEHKHKBP.mjs.map +0 -1
  392. package/dist/esm/chunk-ZYYK3UXP.mjs +0 -2
  393. package/dist/esm/core/account/Account.d.mts +0 -20
  394. package/dist/esm/core/account/Account.mjs +0 -2
  395. package/dist/esm/core/account/Ed25519Account.d.mts +0 -20
  396. package/dist/esm/core/account/Ed25519Account.mjs +0 -2
  397. package/dist/esm/core/account/SingleKeyAccount.d.mts +0 -20
  398. package/dist/esm/core/account/SingleKeyAccount.mjs +0 -2
  399. /package/dist/esm/{core/account → account}/Account.mjs.map +0 -0
  400. /package/dist/esm/{core/account → account}/Ed25519Account.mjs.map +0 -0
  401. /package/dist/esm/{chunk-E7FWVXGX.mjs.map → account/MultiKeyAccount.mjs.map} +0 -0
  402. /package/dist/esm/{core/account → account}/SingleKeyAccount.mjs.map +0 -0
  403. /package/dist/esm/{chunk-MLWIHWNH.mjs.map → account/index.mjs.map} +0 -0
  404. /package/dist/esm/{chunk-R7G3CLRI.mjs.map → api/table.mjs.map} +0 -0
  405. /package/dist/esm/{chunk-O4JRPZZM.mjs.map → chunk-2X7A4HUS.mjs.map} +0 -0
  406. /package/dist/esm/{chunk-PXFIA4BL.mjs.map → chunk-2XK53QFA.mjs.map} +0 -0
  407. /package/dist/esm/{chunk-RHBCVCOS.mjs.map → chunk-35EWRSDK.mjs.map} +0 -0
  408. /package/dist/esm/{chunk-52C73T26.mjs.map → chunk-36QXVFR5.mjs.map} +0 -0
  409. /package/dist/esm/{chunk-NWYIE7ZX.mjs.map → chunk-477G7LHJ.mjs.map} +0 -0
  410. /package/dist/esm/{chunk-WFZDFFBM.mjs.map → chunk-4NHWV5AI.mjs.map} +0 -0
  411. /package/dist/esm/{chunk-NPFNYP75.mjs.map → chunk-5EN52MUT.mjs.map} +0 -0
  412. /package/dist/esm/{chunk-L5IL2IAB.mjs.map → chunk-5VIESFOC.mjs.map} +0 -0
  413. /package/dist/esm/{chunk-BIAEC6FO.mjs.map → chunk-5YLAWRI2.mjs.map} +0 -0
  414. /package/dist/esm/{chunk-N77VJHW5.mjs.map → chunk-6JLYD5Q2.mjs.map} +0 -0
  415. /package/dist/esm/{chunk-BE4FOV6X.mjs.map → chunk-7NEETXEA.mjs.map} +0 -0
  416. /package/dist/esm/{chunk-TGXZVNR5.mjs.map → chunk-7VRZLDIJ.mjs.map} +0 -0
  417. /package/dist/esm/{chunk-CF5R4HVB.mjs.map → chunk-AQAH67IV.mjs.map} +0 -0
  418. /package/dist/esm/{chunk-DSTKXJMA.mjs.map → chunk-B7X6PSE7.mjs.map} +0 -0
  419. /package/dist/esm/{chunk-AOCNYMMX.mjs.map → chunk-BCUSI3N6.mjs.map} +0 -0
  420. /package/dist/esm/{chunk-BAV4XY7C.mjs.map → chunk-BHLICYAI.mjs.map} +0 -0
  421. /package/dist/esm/{chunk-OGHE4AQA.mjs.map → chunk-BO2TLWNT.mjs.map} +0 -0
  422. /package/dist/esm/{chunk-TBMAJ6AW.mjs.map → chunk-CEHCDA3G.mjs.map} +0 -0
  423. /package/dist/esm/{chunk-4P5EKAJB.mjs.map → chunk-CWUH4PNH.mjs.map} +0 -0
  424. /package/dist/esm/{chunk-TJDC5PWD.mjs.map → chunk-F7EMGK4M.mjs.map} +0 -0
  425. /package/dist/esm/{chunk-FS3NSGBF.mjs.map → chunk-G56GPLTB.mjs.map} +0 -0
  426. /package/dist/esm/{chunk-6FBKUTGF.mjs.map → chunk-GHYE26Q5.mjs.map} +0 -0
  427. /package/dist/esm/{chunk-QTRYMRYK.mjs.map → chunk-GM56MMNJ.mjs.map} +0 -0
  428. /package/dist/esm/{chunk-NZGRLKRG.mjs.map → chunk-HNEAPYNI.mjs.map} +0 -0
  429. /package/dist/esm/{chunk-S2LTZKM4.mjs.map → chunk-HSJTQLI2.mjs.map} +0 -0
  430. /package/dist/esm/{chunk-2G4ZSGL4.mjs.map → chunk-IZQV2SU6.mjs.map} +0 -0
  431. /package/dist/esm/{chunk-UML2VQZT.mjs.map → chunk-KAGLWBIJ.mjs.map} +0 -0
  432. /package/dist/esm/{chunk-FBPNHF54.mjs.map → chunk-LG7RJQ57.mjs.map} +0 -0
  433. /package/dist/esm/{chunk-XO3HHRJV.mjs.map → chunk-MCRRHBFQ.mjs.map} +0 -0
  434. /package/dist/esm/{chunk-U43IJHQN.mjs.map → chunk-MJPUASSD.mjs.map} +0 -0
  435. /package/dist/esm/{chunk-ZYYK3UXP.mjs.map → chunk-N3U47Y6Y.mjs.map} +0 -0
  436. /package/dist/esm/{chunk-JCD72AW7.mjs.map → chunk-NZETF6Z4.mjs.map} +0 -0
  437. /package/dist/esm/{chunk-UPIN5AIO.mjs.map → chunk-P6GWG2CY.mjs.map} +0 -0
  438. /package/dist/esm/{chunk-BWFJHFBQ.mjs.map → chunk-PF57EOJY.mjs.map} +0 -0
  439. /package/dist/esm/{chunk-SPU745XV.mjs.map → chunk-QIHR7HD6.mjs.map} +0 -0
  440. /package/dist/esm/{chunk-APDALGDD.mjs.map → chunk-S2VSJJRJ.mjs.map} +0 -0
  441. /package/dist/esm/{chunk-CNMQNPNV.mjs.map → chunk-T2AGN5YT.mjs.map} +0 -0
  442. /package/dist/esm/{chunk-3YZGJLW7.mjs.map → chunk-TT2XR5ZI.mjs.map} +0 -0
  443. /package/dist/esm/{chunk-DMKUAQB7.mjs.map → chunk-U3YYSIIT.mjs.map} +0 -0
  444. /package/dist/esm/{chunk-R5QUBEH6.mjs.map → chunk-UGPALAPN.mjs.map} +0 -0
  445. /package/dist/esm/{chunk-5HY3DEPF.mjs.map → chunk-UKSRF2Q3.mjs.map} +0 -0
  446. /package/dist/esm/{chunk-FXNFWLQC.mjs.map → chunk-UPSCPEEE.mjs.map} +0 -0
  447. /package/dist/esm/{chunk-6OV2PQS5.mjs.map → chunk-XBHFMNYB.mjs.map} +0 -0
  448. /package/dist/esm/{chunk-WCVUDO5S.mjs.map → chunk-XFSDV3ND.mjs.map} +0 -0
  449. /package/dist/esm/{chunk-UDRSFVAK.mjs.map → chunk-YMB2XW2O.mjs.map} +0 -0
  450. /package/dist/esm/{chunk-UNU3RVRJ.mjs.map → chunk-ZBXOX3S7.mjs.map} +0 -0
  451. /package/dist/esm/{publicKey-lq5djCIY.d.mts → publicKey-B3XRNhHO.d.mts} +0 -0
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-PYXJYEAC.mjs";import"../../chunk-IHYTP2EW.mjs";import"../../chunk-QD2Y3VK4.mjs";import"../../chunk-HG4Q4EFG.mjs";import"../../chunk-U6Z4FNB7.mjs";import"../../chunk-UF534PKA.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-NBCHJ75L.mjs";import"../../chunk-BE4FOV6X.mjs";import"../../chunk-U43IJHQN.mjs";import"../../chunk-FXNFWLQC.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-BAV4XY7C.mjs";import"../../chunk-QTRYMRYK.mjs";import"../../chunk-NZGRLKRG.mjs";import"../../chunk-UPIN5AIO.mjs";import"../../chunk-OGHE4AQA.mjs";import"../../chunk-TGXZVNR5.mjs";import"../../chunk-DMKUAQB7.mjs";import"../../chunk-RHBCVCOS.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-CF5R4HVB.mjs";import"../../chunk-BWFJHFBQ.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-4374JPA6.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-CDB34C4N.mjs";import"../../chunk-PJPXC22D.mjs";import"../../chunk-B3BRR4WP.mjs";import"../../chunk-LBGYH45K.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-XO3HHRJV.mjs";import"../../chunk-MFL3UCKA.mjs";import"../../chunk-AT2A6UGB.mjs";import"../../chunk-O4JRPZZM.mjs";import"../../chunk-CNMQNPNV.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-L5IL2IAB.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-IR46T46A.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-APDALGDD.mjs";import"../../chunk-UDRSFVAK.mjs";import"../../chunk-PXFIA4BL.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-HYCGMFC2.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-CPBGL37X.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as TransactionManagement};
1
+ import{a}from"../../chunk-PPO4IXE4.mjs";import"../../chunk-IHYTP2EW.mjs";import"../../chunk-RYD6HRW7.mjs";import"../../chunk-E2NVC2VR.mjs";import"../../chunk-U6Z4FNB7.mjs";import"../../chunk-K7HX7JQH.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-TGQARO3F.mjs";import"../../chunk-7NEETXEA.mjs";import"../../chunk-MJPUASSD.mjs";import"../../chunk-UPSCPEEE.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-3HSXKDOC.mjs";import"../../chunk-TM7NDDT3.mjs";import"../../chunk-5VIESFOC.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-JQIGQMNZ.mjs";import"../../chunk-S3EDNXZE.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-S2VSJJRJ.mjs";import"../../chunk-YMB2XW2O.mjs";import"../../chunk-2XK53QFA.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-HYCGMFC2.mjs";import"../../chunk-CJDEPZ4J.mjs";import"../../chunk-UO3NZ5AH.mjs";import"../../chunk-2YZSEM2G.mjs";import"../../chunk-6XWDDCQD.mjs";import"../../chunk-DLAIJ2UM.mjs";import"../../chunk-RVWYURXG.mjs";import"../../chunk-JFIAWBCK.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BHLICYAI.mjs";import"../../chunk-GM56MMNJ.mjs";import"../../chunk-HNEAPYNI.mjs";import"../../chunk-P6GWG2CY.mjs";import"../../chunk-BO2TLWNT.mjs";import"../../chunk-7VRZLDIJ.mjs";import"../../chunk-U3YYSIIT.mjs";import"../../chunk-35EWRSDK.mjs";import"../../chunk-B7X6PSE7.mjs";import"../../chunk-AQAH67IV.mjs";import"../../chunk-PF57EOJY.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-3N6N3KOS.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MCRRHBFQ.mjs";import"../../chunk-PIVZMT5D.mjs";import"../../chunk-IENCDVPF.mjs";import"../../chunk-2X7A4HUS.mjs";import"../../chunk-T2AGN5YT.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as TransactionManagement};
2
2
  //# sourceMappingURL=management.mjs.map
@@ -1,5 +1,5 @@
1
1
  import { AccountAuthenticator } from '../../transactions/authenticator/account.mjs';
2
- import { A as Account } from '../../Ed25519Account--qjfup2u.mjs';
2
+ import { A as Account } from '../../Ed25519Account-B1VMJOY2.mjs';
3
3
  import { AnyRawTransaction } from '../../transactions/types.mjs';
4
4
  import { AptosConfig } from '../aptosConfig.mjs';
5
5
  import '../../bcs/deserializer.mjs';
@@ -12,7 +12,7 @@ import '../../bcs/serializer.mjs';
12
12
  import '../../core/hex.mjs';
13
13
  import '../../core/common.mjs';
14
14
  import '../../core/crypto/ed25519.mjs';
15
- import '../../publicKey-lq5djCIY.mjs';
15
+ import '../../publicKey-B3XRNhHO.mjs';
16
16
  import '../../core/accountAddress.mjs';
17
17
  import '../../transactions/instances/transactionArgument.mjs';
18
18
  import '../../core/crypto/signature.mjs';
@@ -1,2 +1,2 @@
1
- import{e as o}from"../../chunk-UF534PKA.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-NBCHJ75L.mjs";import"../../chunk-BE4FOV6X.mjs";import"../../chunk-U43IJHQN.mjs";import"../../chunk-FXNFWLQC.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-BAV4XY7C.mjs";import"../../chunk-QTRYMRYK.mjs";import"../../chunk-NZGRLKRG.mjs";import"../../chunk-UPIN5AIO.mjs";import"../../chunk-OGHE4AQA.mjs";import"../../chunk-TGXZVNR5.mjs";import"../../chunk-DMKUAQB7.mjs";import"../../chunk-RHBCVCOS.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-CF5R4HVB.mjs";import"../../chunk-BWFJHFBQ.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-4374JPA6.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-CDB34C4N.mjs";import"../../chunk-PJPXC22D.mjs";import"../../chunk-B3BRR4WP.mjs";import"../../chunk-LBGYH45K.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-XO3HHRJV.mjs";import"../../chunk-MFL3UCKA.mjs";import"../../chunk-AT2A6UGB.mjs";import"../../chunk-O4JRPZZM.mjs";import"../../chunk-CNMQNPNV.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-L5IL2IAB.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-IR46T46A.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-APDALGDD.mjs";import"../../chunk-UDRSFVAK.mjs";import"../../chunk-PXFIA4BL.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-HYCGMFC2.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-CPBGL37X.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";var a=class{constructor(n){this.config=n}transaction(n){return o({...n})}transactionAsFeePayer(n){let{signer:r,transaction:t}=n;if(!t.feePayerAddress)throw new Error(`Transaction ${t} is not a Fee Payer transaction`);return t.feePayerAddress=r.accountAddress,o({signer:r,transaction:t})}};export{a as Sign};
1
+ import{e as o}from"../../chunk-K7HX7JQH.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-TGQARO3F.mjs";import"../../chunk-7NEETXEA.mjs";import"../../chunk-MJPUASSD.mjs";import"../../chunk-UPSCPEEE.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-3HSXKDOC.mjs";import"../../chunk-TM7NDDT3.mjs";import"../../chunk-5VIESFOC.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-JQIGQMNZ.mjs";import"../../chunk-S3EDNXZE.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-S2VSJJRJ.mjs";import"../../chunk-YMB2XW2O.mjs";import"../../chunk-2XK53QFA.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-HYCGMFC2.mjs";import"../../chunk-CJDEPZ4J.mjs";import"../../chunk-UO3NZ5AH.mjs";import"../../chunk-2YZSEM2G.mjs";import"../../chunk-6XWDDCQD.mjs";import"../../chunk-DLAIJ2UM.mjs";import"../../chunk-RVWYURXG.mjs";import"../../chunk-JFIAWBCK.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BHLICYAI.mjs";import"../../chunk-GM56MMNJ.mjs";import"../../chunk-HNEAPYNI.mjs";import"../../chunk-P6GWG2CY.mjs";import"../../chunk-BO2TLWNT.mjs";import"../../chunk-7VRZLDIJ.mjs";import"../../chunk-U3YYSIIT.mjs";import"../../chunk-35EWRSDK.mjs";import"../../chunk-B7X6PSE7.mjs";import"../../chunk-AQAH67IV.mjs";import"../../chunk-PF57EOJY.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-3N6N3KOS.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MCRRHBFQ.mjs";import"../../chunk-PIVZMT5D.mjs";import"../../chunk-IENCDVPF.mjs";import"../../chunk-2X7A4HUS.mjs";import"../../chunk-T2AGN5YT.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";var a=class{constructor(n){this.config=n}transaction(n){return o({...n})}transactionAsFeePayer(n){let{signer:r,transaction:t}=n;if(!t.feePayerAddress)throw new Error(`Transaction ${t} is not a Fee Payer transaction`);return t.feePayerAddress=r.accountAddress,o({signer:r,transaction:t})}};export{a as Sign};
2
2
  //# sourceMappingURL=sign.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/api/transactionSubmission/sign.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account } from \"../../core\";\nimport { signTransaction } from \"../../internal/transactionSubmission\";\nimport { AccountAuthenticator, AnyRawTransaction } from \"../../transactions\";\nimport { AptosConfig } from \"../aptosConfig\";\n\n/**\n * A class to handle all `Sign` transaction operations\n */\nexport class Sign {\n readonly config: AptosConfig;\n\n constructor(config: AptosConfig) {\n this.config = config;\n }\n\n // eslint-disable-next-line class-methods-use-this\n transaction(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n return signTransaction({\n ...args,\n });\n }\n\n // eslint-disable-next-line class-methods-use-this\n transactionAsFeePayer(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n const { signer, transaction } = args;\n\n // if transaction doesnt hold a \"feePayerAddress\" prop it means\n // this is not a fee payer transaction\n if (!transaction.feePayerAddress) {\n throw new Error(`Transaction ${transaction} is not a Fee Payer transaction`);\n }\n\n // Set the feePayerAddress to the signer account address\n transaction.feePayerAddress = signer.accountAddress;\n\n return signTransaction({\n signer,\n transaction,\n });\n }\n}\n"],"mappings":"o1EAWO,IAAMA,EAAN,KAAW,CAGhB,YAAYC,EAAqB,CAC/B,KAAK,OAASA,CAChB,CAGA,YAAYC,EAAiF,CAC3F,OAAOC,EAAgB,CACrB,GAAGD,CACL,CAAC,CACH,CAGA,sBAAsBA,EAAiF,CACrG,GAAM,CAAE,OAAAE,EAAQ,YAAAC,CAAY,EAAIH,EAIhC,GAAI,CAACG,EAAY,gBACf,MAAM,IAAI,MAAM,eAAeA,CAAW,iCAAiC,EAI7E,OAAAA,EAAY,gBAAkBD,EAAO,eAE9BD,EAAgB,CACrB,OAAAC,EACA,YAAAC,CACF,CAAC,CACH,CACF","names":["Sign","config","args","signTransaction","signer","transaction"]}
1
+ {"version":3,"sources":["../../../../src/api/transactionSubmission/sign.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account } from \"../../account\";\nimport { signTransaction } from \"../../internal/transactionSubmission\";\nimport { AccountAuthenticator, AnyRawTransaction } from \"../../transactions\";\nimport { AptosConfig } from \"../aptosConfig\";\n\n/**\n * A class to handle all `Sign` transaction operations\n */\nexport class Sign {\n readonly config: AptosConfig;\n\n constructor(config: AptosConfig) {\n this.config = config;\n }\n\n // eslint-disable-next-line class-methods-use-this\n transaction(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n return signTransaction({\n ...args,\n });\n }\n\n // eslint-disable-next-line class-methods-use-this\n transactionAsFeePayer(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n const { signer, transaction } = args;\n\n // if transaction doesnt hold a \"feePayerAddress\" prop it means\n // this is not a fee payer transaction\n if (!transaction.feePayerAddress) {\n throw new Error(`Transaction ${transaction} is not a Fee Payer transaction`);\n }\n\n // Set the feePayerAddress to the signer account address\n transaction.feePayerAddress = signer.accountAddress;\n\n return signTransaction({\n signer,\n transaction,\n });\n }\n}\n"],"mappings":"q3EAWO,IAAMA,EAAN,KAAW,CAGhB,YAAYC,EAAqB,CAC/B,KAAK,OAASA,CAChB,CAGA,YAAYC,EAAiF,CAC3F,OAAOC,EAAgB,CACrB,GAAGD,CACL,CAAC,CACH,CAGA,sBAAsBA,EAAiF,CACrG,GAAM,CAAE,OAAAE,EAAQ,YAAAC,CAAY,EAAIH,EAIhC,GAAI,CAACG,EAAY,gBACf,MAAM,IAAI,MAAM,eAAeA,CAAW,iCAAiC,EAI7E,OAAAA,EAAY,gBAAkBD,EAAO,eAE9BD,EAAgB,CACrB,OAAAC,EACA,YAAAC,CACF,CAAC,CACH,CACF","names":["Sign","config","args","signTransaction","signer","transaction"]}
@@ -1,5 +1,5 @@
1
1
  import { UserTransactionResponse } from '../../types/index.mjs';
2
- import { P as PublicKey } from '../../publicKey-lq5djCIY.mjs';
2
+ import { P as PublicKey } from '../../publicKey-B3XRNhHO.mjs';
3
3
  import { AnyRawTransaction, InputSimulateTransactionOptions } from '../../transactions/types.mjs';
4
4
  import { AptosConfig } from '../aptosConfig.mjs';
5
5
  import '../../utils/apiEndpoints.mjs';
@@ -16,18 +16,18 @@ import '../../core/crypto/signature.mjs';
16
16
  import '../../bcs/serializable/moveStructs.mjs';
17
17
  import '../../bcs/serializable/movePrimitives.mjs';
18
18
  import '../../bcs/serializable/fixedBytes.mjs';
19
- import '../../transactions/authenticator/account.mjs';
20
- import '../../core/crypto/ed25519.mjs';
21
- import '../../core/crypto/privateKey.mjs';
22
- import '../../core/crypto/multiEd25519.mjs';
23
- import '../../core/crypto/multiKey.mjs';
24
- import '../../core/crypto/singleKey.mjs';
25
19
  import '../../transactions/instances/rawTransaction.mjs';
26
20
  import '../../transactions/instances/chainId.mjs';
27
21
  import '../../transactions/instances/transactionPayload.mjs';
28
22
  import '../../transactions/instances/identifier.mjs';
29
23
  import '../../transactions/instances/moduleId.mjs';
30
24
  import '../../transactions/typeTag/index.mjs';
25
+ import '../../transactions/authenticator/account.mjs';
26
+ import '../../core/crypto/ed25519.mjs';
27
+ import '../../core/crypto/privateKey.mjs';
28
+ import '../../core/crypto/multiEd25519.mjs';
29
+ import '../../core/crypto/multiKey.mjs';
30
+ import '../../core/crypto/singleKey.mjs';
31
31
  import '../../transactions/instances/simpleTransaction.mjs';
32
32
  import '../../transactions/instances/multiAgentTransaction.mjs';
33
33
  import '../../utils/const.mjs';
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-4P5EKAJB.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-UF534PKA.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-NBCHJ75L.mjs";import"../../chunk-BE4FOV6X.mjs";import"../../chunk-U43IJHQN.mjs";import"../../chunk-FXNFWLQC.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-BAV4XY7C.mjs";import"../../chunk-QTRYMRYK.mjs";import"../../chunk-NZGRLKRG.mjs";import"../../chunk-UPIN5AIO.mjs";import"../../chunk-OGHE4AQA.mjs";import"../../chunk-TGXZVNR5.mjs";import"../../chunk-DMKUAQB7.mjs";import"../../chunk-RHBCVCOS.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-CF5R4HVB.mjs";import"../../chunk-BWFJHFBQ.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-4374JPA6.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-CDB34C4N.mjs";import"../../chunk-PJPXC22D.mjs";import"../../chunk-B3BRR4WP.mjs";import"../../chunk-LBGYH45K.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-XO3HHRJV.mjs";import"../../chunk-MFL3UCKA.mjs";import"../../chunk-AT2A6UGB.mjs";import"../../chunk-O4JRPZZM.mjs";import"../../chunk-CNMQNPNV.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-L5IL2IAB.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-IR46T46A.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-APDALGDD.mjs";import"../../chunk-UDRSFVAK.mjs";import"../../chunk-PXFIA4BL.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-HYCGMFC2.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-CPBGL37X.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
1
+ import{a}from"../../chunk-CWUH4PNH.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-K7HX7JQH.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-TGQARO3F.mjs";import"../../chunk-7NEETXEA.mjs";import"../../chunk-MJPUASSD.mjs";import"../../chunk-UPSCPEEE.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-3HSXKDOC.mjs";import"../../chunk-TM7NDDT3.mjs";import"../../chunk-5VIESFOC.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-JQIGQMNZ.mjs";import"../../chunk-S3EDNXZE.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-S2VSJJRJ.mjs";import"../../chunk-YMB2XW2O.mjs";import"../../chunk-2XK53QFA.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-HYCGMFC2.mjs";import"../../chunk-CJDEPZ4J.mjs";import"../../chunk-UO3NZ5AH.mjs";import"../../chunk-2YZSEM2G.mjs";import"../../chunk-6XWDDCQD.mjs";import"../../chunk-DLAIJ2UM.mjs";import"../../chunk-RVWYURXG.mjs";import"../../chunk-JFIAWBCK.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BHLICYAI.mjs";import"../../chunk-GM56MMNJ.mjs";import"../../chunk-HNEAPYNI.mjs";import"../../chunk-P6GWG2CY.mjs";import"../../chunk-BO2TLWNT.mjs";import"../../chunk-7VRZLDIJ.mjs";import"../../chunk-U3YYSIIT.mjs";import"../../chunk-35EWRSDK.mjs";import"../../chunk-B7X6PSE7.mjs";import"../../chunk-AQAH67IV.mjs";import"../../chunk-PF57EOJY.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-3N6N3KOS.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MCRRHBFQ.mjs";import"../../chunk-PIVZMT5D.mjs";import"../../chunk-IENCDVPF.mjs";import"../../chunk-2X7A4HUS.mjs";import"../../chunk-T2AGN5YT.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
2
2
  //# sourceMappingURL=simulate.mjs.map
@@ -11,7 +11,7 @@ import '../../bcs/serializer.mjs';
11
11
  import '../../core/hex.mjs';
12
12
  import '../../core/common.mjs';
13
13
  import '../../core/crypto/ed25519.mjs';
14
- import '../../publicKey-lq5djCIY.mjs';
14
+ import '../../publicKey-B3XRNhHO.mjs';
15
15
  import '../../core/accountAddress.mjs';
16
16
  import '../../transactions/instances/transactionArgument.mjs';
17
17
  import '../../core/crypto/signature.mjs';
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-NWYIE7ZX.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-UF534PKA.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-NBCHJ75L.mjs";import"../../chunk-BE4FOV6X.mjs";import"../../chunk-U43IJHQN.mjs";import"../../chunk-FXNFWLQC.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-BAV4XY7C.mjs";import"../../chunk-QTRYMRYK.mjs";import"../../chunk-NZGRLKRG.mjs";import"../../chunk-UPIN5AIO.mjs";import"../../chunk-OGHE4AQA.mjs";import"../../chunk-TGXZVNR5.mjs";import"../../chunk-DMKUAQB7.mjs";import"../../chunk-RHBCVCOS.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-CF5R4HVB.mjs";import"../../chunk-BWFJHFBQ.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-4374JPA6.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-CDB34C4N.mjs";import"../../chunk-PJPXC22D.mjs";import"../../chunk-B3BRR4WP.mjs";import"../../chunk-LBGYH45K.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-XO3HHRJV.mjs";import"../../chunk-MFL3UCKA.mjs";import"../../chunk-AT2A6UGB.mjs";import"../../chunk-O4JRPZZM.mjs";import"../../chunk-CNMQNPNV.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-L5IL2IAB.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-IR46T46A.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-APDALGDD.mjs";import"../../chunk-UDRSFVAK.mjs";import"../../chunk-PXFIA4BL.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-HYCGMFC2.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-CPBGL37X.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
1
+ import{a}from"../../chunk-477G7LHJ.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-K7HX7JQH.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-TGQARO3F.mjs";import"../../chunk-7NEETXEA.mjs";import"../../chunk-MJPUASSD.mjs";import"../../chunk-UPSCPEEE.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-3HSXKDOC.mjs";import"../../chunk-TM7NDDT3.mjs";import"../../chunk-5VIESFOC.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-JQIGQMNZ.mjs";import"../../chunk-S3EDNXZE.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-S2VSJJRJ.mjs";import"../../chunk-YMB2XW2O.mjs";import"../../chunk-2XK53QFA.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-ROXFCLDT.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-HYCGMFC2.mjs";import"../../chunk-CJDEPZ4J.mjs";import"../../chunk-UO3NZ5AH.mjs";import"../../chunk-2YZSEM2G.mjs";import"../../chunk-6XWDDCQD.mjs";import"../../chunk-DLAIJ2UM.mjs";import"../../chunk-RVWYURXG.mjs";import"../../chunk-JFIAWBCK.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BHLICYAI.mjs";import"../../chunk-GM56MMNJ.mjs";import"../../chunk-HNEAPYNI.mjs";import"../../chunk-P6GWG2CY.mjs";import"../../chunk-BO2TLWNT.mjs";import"../../chunk-7VRZLDIJ.mjs";import"../../chunk-U3YYSIIT.mjs";import"../../chunk-35EWRSDK.mjs";import"../../chunk-B7X6PSE7.mjs";import"../../chunk-AQAH67IV.mjs";import"../../chunk-PF57EOJY.mjs";import"../../chunk-RFSO3JRG.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-3N6N3KOS.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MCRRHBFQ.mjs";import"../../chunk-PIVZMT5D.mjs";import"../../chunk-IENCDVPF.mjs";import"../../chunk-2X7A4HUS.mjs";import"../../chunk-T2AGN5YT.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
2
2
  //# sourceMappingURL=submit.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-BIAEC6FO.mjs";import"../chunk-L5IL2IAB.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-IR46T46A.mjs";import"../chunk-S4SEFF4K.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-APDALGDD.mjs";import"../chunk-UDRSFVAK.mjs";import"../chunk-PXFIA4BL.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-ROXFCLDT.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-HYCGMFC2.mjs";import"../chunk-CYNQRMO5.mjs";import"../chunk-CPBGL37X.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-FS3NSGBF.mjs";import"../chunk-QIAHBEEW.mjs";import"../chunk-ZYYK3UXP.mjs";import"../chunk-TBMAJ6AW.mjs";import"../chunk-OWW6SIDP.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-52C73T26.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
1
+ import{a}from"../chunk-5YLAWRI2.mjs";import"../chunk-5VIESFOC.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-JQIGQMNZ.mjs";import"../chunk-S3EDNXZE.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-S2VSJJRJ.mjs";import"../chunk-YMB2XW2O.mjs";import"../chunk-2XK53QFA.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-ROXFCLDT.mjs";import"../chunk-GHYE26Q5.mjs";import"../chunk-HYCGMFC2.mjs";import"../chunk-CJDEPZ4J.mjs";import"../chunk-CYNQRMO5.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-G56GPLTB.mjs";import"../chunk-SRDIYE3M.mjs";import"../chunk-N3U47Y6Y.mjs";import"../chunk-CEHCDA3G.mjs";import"../chunk-OWW6SIDP.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-6IFMQ5AS.mjs";import"../chunk-36QXVFR5.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
2
2
  //# sourceMappingURL=utils.mjs.map
@@ -1,2 +1,2 @@
1
- import"../chunk-FZY4PMEE.mjs";import{a as p,b as q,c as r}from"../chunk-FS3NSGBF.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-QIAHBEEW.mjs";import{a as h}from"../chunk-ZYYK3UXP.mjs";import{a as g}from"../chunk-TBMAJ6AW.mjs";import"../chunk-OWW6SIDP.mjs";import"../chunk-4WPQQPUF.mjs";import{a}from"../chunk-6IFMQ5AS.mjs";import{a as b,b as c,c as d,d as e,e as f}from"../chunk-52C73T26.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{i as Bool,a as Deserializer,h as EntryFunctionBytes,g as FixedBytes,r as MoveOption,q as MoveString,p as MoveVector,b as Serializable,c as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,d as ensureBoolean,e as outOfRangeErrorMessage,f as validateNumberInRange};
1
+ import"../chunk-FZY4PMEE.mjs";import{a as p,b as q,c as r}from"../chunk-G56GPLTB.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-SRDIYE3M.mjs";import{a as h}from"../chunk-N3U47Y6Y.mjs";import{a as g}from"../chunk-CEHCDA3G.mjs";import"../chunk-OWW6SIDP.mjs";import"../chunk-4WPQQPUF.mjs";import{a}from"../chunk-6IFMQ5AS.mjs";import{a as b,b as c,c as d,d as e,e as f}from"../chunk-36QXVFR5.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{i as Bool,a as Deserializer,h as EntryFunctionBytes,g as FixedBytes,r as MoveOption,q as MoveString,p as MoveVector,b as Serializable,c as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,d as ensureBoolean,e as outOfRangeErrorMessage,f as validateNumberInRange};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as EntryFunctionBytes};
1
+ import{a}from"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as EntryFunctionBytes};
2
2
  //# sourceMappingURL=entryFunctionBytes.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-TBMAJ6AW.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as FixedBytes};
1
+ import{a}from"../../chunk-CEHCDA3G.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as FixedBytes};
2
2
  //# sourceMappingURL=fixedBytes.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g}from"../../chunk-QIAHBEEW.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Bool,f as U128,c as U16,g as U256,d as U32,e as U64,b as U8};
1
+ import{a,b,c,d,e,f,g}from"../../chunk-SRDIYE3M.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Bool,f as U128,c as U16,g as U256,d as U32,e as U64,b as U8};
2
2
  //# sourceMappingURL=movePrimitives.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c}from"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{c as MoveOption,b as MoveString,a as MoveVector};
1
+ import{a,b,c}from"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{c as MoveOption,b as MoveString,a as MoveVector};
2
2
  //# sourceMappingURL=moveStructs.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e}from"../chunk-52C73T26.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as Serializable,b as Serializer,c as ensureBoolean,d as outOfRangeErrorMessage,e as validateNumberInRange};
1
+ import{a,b,c,d,e}from"../chunk-36QXVFR5.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as Serializable,b as Serializer,c as ensureBoolean,d as outOfRangeErrorMessage,e as validateNumberInRange};
2
2
  //# sourceMappingURL=serializer.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as v}from"./chunk-R5QUBEH6.mjs";import{a as u}from"./chunk-TJDC5PWD.mjs";import{e as h,j as f}from"./chunk-LR65XHSF.mjs";import{a as d}from"./chunk-WFZDFFBM.mjs";import{a as g}from"./chunk-52C73T26.mjs";import{b as s}from"./chunk-AOCNYMMX.mjs";import{sha3_256 as A}from"@noble/hashes/sha3";import{secp256k1 as o}from"@noble/curves/secp256k1";import{HDKey as U}from"@scure/bip32";var n=class n extends d{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==n.LENGTH)throw new Error(`PublicKey length should be ${n.LENGTH}`);this.key=r}verifySignature(e){let{message:r,signature:i}=e;if(!(i instanceof y))return!1;let l=u(r),c=s.fromHexInput(l).toUint8Array(),x=A(c),S=i.toUint8Array();return o.verify(S,x,this.key.toUint8Array(),{lowS:!0})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new n(r)}static isPublicKey(e){return e instanceof n}};n.LENGTH=65;var m=n,t=class t extends g{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==t.LENGTH)throw new Error(`PrivateKey length should be ${t.LENGTH}`);this.key=r}static generate(){let e=o.utils.randomPrivateKey();return new t(e)}static fromDerivationPath(e,r){if(!h(e))throw new Error(`Invalid derivation path ${e}`);return t.fromDerivationPathInner(e,f(r))}static fromDerivationPathInner(e,r){let{privateKey:i}=U.fromMasterSeed(r).derive(e);if(i===null)throw new Error("Invalid key");return new t(i)}sign(e){let r=u(e),i=s.fromHexInput(r),l=A(i.toUint8Array()),c=o.sign(l,this.key.toUint8Array(),{lowS:!0});return new y(c.toCompactRawBytes())}publicKey(){let e=o.getPublicKey(this.key.toUint8Array(),!1);return new m(e)}toUint8Array(){return this.key.toUint8Array()}toString(){return this.key.toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new t(r)}static isPrivateKey(e){return e instanceof t}};t.LENGTH=32;var H=t,a=class a extends v{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==a.LENGTH)throw new Error(`Signature length should be ${a.LENGTH}, received ${r.toUint8Array().length}`);this.data=r}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new a(r)}};a.LENGTH=64;var y=a;export{m as a,H as b,y as c};
2
- //# sourceMappingURL=chunk-O4JRPZZM.mjs.map
1
+ import{a as f}from"./chunk-4NHWV5AI.mjs";import{a as d}from"./chunk-UGPALAPN.mjs";import{a as u}from"./chunk-F7EMGK4M.mjs";import{e as g,j as h}from"./chunk-LR65XHSF.mjs";import{a as p}from"./chunk-36QXVFR5.mjs";import{b as s}from"./chunk-BCUSI3N6.mjs";import{sha3_256 as H}from"@noble/hashes/sha3";import{secp256k1 as o}from"@noble/curves/secp256k1";import{HDKey as S}from"@scure/bip32";var n=class n extends f{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==n.LENGTH)throw new Error(`PublicKey length should be ${n.LENGTH}`);this.key=r}verifySignature(e){let{message:r,signature:i}=e;if(!(i instanceof y))return!1;let l=u(r),c=s.fromHexInput(l).toUint8Array(),A=H(c),x=i.toUint8Array();return o.verify(x,A,this.key.toUint8Array(),{lowS:!0})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new n(r)}static isPublicKey(e){return e instanceof n}};n.LENGTH=65;var m=n,t=class t extends p{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==t.LENGTH)throw new Error(`PrivateKey length should be ${t.LENGTH}`);this.key=r}static generate(){let e=o.utils.randomPrivateKey();return new t(e)}static fromDerivationPath(e,r){if(!g(e))throw new Error(`Invalid derivation path ${e}`);return t.fromDerivationPathInner(e,h(r))}static fromDerivationPathInner(e,r){let{privateKey:i}=S.fromMasterSeed(r).derive(e);if(i===null)throw new Error("Invalid key");return new t(i)}sign(e){let r=u(e),i=s.fromHexInput(r),l=H(i.toUint8Array()),c=o.sign(l,this.key.toUint8Array(),{lowS:!0});return new y(c.toCompactRawBytes())}publicKey(){let e=o.getPublicKey(this.key.toUint8Array(),!1);return new m(e)}toUint8Array(){return this.key.toUint8Array()}toString(){return this.key.toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new t(r)}static isPrivateKey(e){return e instanceof t}};t.LENGTH=32;var v=t,a=class a extends d{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==a.LENGTH)throw new Error(`Signature length should be ${a.LENGTH}, received ${r.toUint8Array().length}`);this.data=r}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new a(r)}};a.LENGTH=64;var y=a;export{m as a,v as b,y as c};
2
+ //# sourceMappingURL=chunk-2X7A4HUS.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-6FBKUTGF.mjs";import{a as R}from"./chunk-CPBGL37X.mjs";var l={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",429:"Too Many Requests",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"};async function c(s,p){let{url:n,method:a,body:i,contentType:u,params:t,overrides:e,originMethod:o}=s,r={...e?.HEADERS,"x-aptos-client":`aptos-typescript-sdk/${R}`,"content-type":u??"application/json","x-aptos-typescript-sdk-origin-method":o};return e?.AUTH_TOKEN&&(r.Authorization=`Bearer ${e?.AUTH_TOKEN}`),e?.API_KEY&&(r.Authorization=`Bearer ${e?.API_KEY}`),p.provider({url:n,method:a,body:i,params:t,headers:r,overrides:e})}async function w(s,p,n){let{url:a,path:i}=s,u=i?`${a}/${i}`:a,t=await c({...s,url:u},p.client),e={status:t.status,statusText:t.statusText,data:t.data,headers:t.headers,config:t.config,request:t.request,url:u};if(e.status===401)throw new d(s,e,`Error: ${e.data}`);if(n==="Indexer"){let r=e.data;if(r.errors)throw new d(s,e,`Indexer error: ${r.errors[0].message}`??`Indexer unhandled Error ${t.status} : ${t.statusText}`);e.data=r.data}if(e.status>=200&&e.status<300)return e;let o;throw e&&e.data&&"message"in e.data&&"error_code"in e.data?o=JSON.stringify(e.data):e.status in l?o=l[e.status]:o=`Unhandled Error ${e.status} : ${e.statusText}`,new d(s,e,`${n} error: ${o}`)}export{c as a,w as b};
2
- //# sourceMappingURL=chunk-PXFIA4BL.mjs.map
1
+ import{a as d}from"./chunk-GHYE26Q5.mjs";import{a as R}from"./chunk-CJDEPZ4J.mjs";var l={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",429:"Too Many Requests",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"};async function c(s,p){let{url:n,method:a,body:i,contentType:u,params:t,overrides:e,originMethod:o}=s,r={...e?.HEADERS,"x-aptos-client":`aptos-typescript-sdk/${R}`,"content-type":u??"application/json","x-aptos-typescript-sdk-origin-method":o};return e?.AUTH_TOKEN&&(r.Authorization=`Bearer ${e?.AUTH_TOKEN}`),e?.API_KEY&&(r.Authorization=`Bearer ${e?.API_KEY}`),p.provider({url:n,method:a,body:i,params:t,headers:r,overrides:e})}async function w(s,p,n){let{url:a,path:i}=s,u=i?`${a}/${i}`:a,t=await c({...s,url:u},p.client),e={status:t.status,statusText:t.statusText,data:t.data,headers:t.headers,config:t.config,request:t.request,url:u};if(e.status===401)throw new d(s,e,`Error: ${e.data}`);if(n==="Indexer"){let r=e.data;if(r.errors)throw new d(s,e,`Indexer error: ${r.errors[0].message}`??`Indexer unhandled Error ${t.status} : ${t.statusText}`);e.data=r.data}if(e.status>=200&&e.status<300)return e;let o;throw e&&e.data&&"message"in e.data&&"error_code"in e.data?o=JSON.stringify(e.data):e.status in l?o=l[e.status]:o=`Unhandled Error ${e.status} : ${e.statusText}`,new d(s,e,`${n} error: ${o}`)}export{c as a,w as b};
2
+ //# sourceMappingURL=chunk-2XK53QFA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-PJPXC22D.mjs";import{a as c}from"./chunk-B3BRR4WP.mjs";import{b as i}from"./chunk-CNMQNPNV.mjs";var o=class{static generate(e={}){let{scheme:t=0,legacy:r=!0}=e;return t===0&&r?n.generate():c.generate({scheme:t})}static fromPrivateKey(e){let{privateKey:t,address:r,legacy:a=!0}=e;return t instanceof i&&a?new n({privateKey:t,address:r}):new c({privateKey:t,address:r})}static fromPrivateKeyAndAddress(e){return this.fromPrivateKey(e)}static fromDerivationPath(e){let{scheme:t=0,mnemonic:r,path:a,legacy:s=!0}=e;return t===0&&s?n.fromDerivationPath({mnemonic:r,path:a}):c.fromDerivationPath({scheme:t,mnemonic:r,path:a})}static authKey(e){let{publicKey:t}=e;return t.authKey()}verifySignature(e){return this.publicKey.verifySignature(e)}};export{o as a};
2
- //# sourceMappingURL=chunk-CDB34C4N.mjs.map
1
+ import{a as n}from"./chunk-6XWDDCQD.mjs";import{a as c}from"./chunk-RVWYURXG.mjs";import{b as i}from"./chunk-T2AGN5YT.mjs";var o=class{static generate(e={}){let{scheme:t=0,legacy:r=!0}=e;return t===0&&r?n.generate():c.generate({scheme:t})}static fromPrivateKey(e){let{privateKey:t,address:r,legacy:a=!0}=e;return t instanceof i&&a?new n({privateKey:t,address:r}):new c({privateKey:t,address:r})}static fromPrivateKeyAndAddress(e){return this.fromPrivateKey(e)}static fromDerivationPath(e){let{scheme:t=0,mnemonic:r,path:a,legacy:s=!0}=e;return t===0&&s?n.fromDerivationPath({mnemonic:r,path:a}):c.fromDerivationPath({scheme:t,mnemonic:r,path:a})}static authKey(e){let{publicKey:t}=e;return t.authKey()}verifySignature(e){return this.publicKey.verifySignature(e)}};export{o as a};
2
+ //# sourceMappingURL=chunk-2YZSEM2G.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/account/Account.ts"],"sourcesContent":["import type { AccountAuthenticator } from \"../transactions/authenticator/account\";\nimport { HexInput, SigningScheme, SigningSchemeInput } from \"../types\";\nimport type { AccountAddress, AccountAddressInput } from \"../core/accountAddress\";\nimport { AuthenticationKey } from \"../core/authenticationKey\";\nimport { AccountPublicKey, Ed25519PrivateKey, PrivateKey, Signature, VerifySignatureArgs } from \"../core/crypto\";\nimport { Ed25519Account } from \"./Ed25519Account\";\nimport { SingleKeyAccount } from \"./SingleKeyAccount\";\nimport { AnyRawTransaction } from \"../transactions/types\";\n\n/**\n * Arguments for creating an `Ed25519Account` from an `Ed25519PrivateKey`.\n * This is the default input type when passing an `Ed25519PrivateKey`.\n * In order to use the SingleKey authentication scheme, `legacy` needs to be explicitly set to false.\n */\nexport interface CreateEd25519AccountFromPrivateKeyArgs {\n privateKey: Ed25519PrivateKey;\n address?: AccountAddressInput;\n legacy?: true;\n}\n\n/**\n * Arguments for creating an `SingleKeyAccount` from an `Ed25519PrivateKey`.\n * The `legacy` argument needs to be explicitly set to false in order to\n * use the `SingleKey` authentication scheme.\n */\nexport interface CreateEd25519SingleKeyAccountFromPrivateKeyArgs {\n privateKey: Ed25519PrivateKey;\n address?: AccountAddressInput;\n legacy: false;\n}\n\n/**\n * Arguments for creating an `SingleKeyAccount` from any supported private key\n * that is not an `Ed25519PrivateKey`.\n * The `legacy` argument defaults to false and cannot be explicitly set to true.\n */\nexport interface CreateSingleKeyAccountFromPrivateKeyArgs {\n privateKey: Exclude<PrivateKey, Ed25519PrivateKey>;\n address?: AccountAddressInput;\n legacy?: false;\n}\n\n/**\n * Arguments for creating an opaque `Account` from any supported private key.\n * This is used when the private key type is not known at compilation time.\n */\nexport interface CreateAccountFromPrivateKeyArgs {\n privateKey: PrivateKey;\n address?: AccountAddressInput;\n legacy?: boolean;\n}\n\n/**\n * Arguments for generating an `Ed25519Account`.\n * This is the input type used by default.\n */\nexport interface GenerateEd25519AccountArgs {\n scheme?: SigningSchemeInput.Ed25519;\n legacy?: true;\n}\n\n/**\n * Arguments for generating an `SingleKeyAccount` with ah underlying `Ed25519PrivateKey`.\n * The `legacy` argument needs to be explicitly set to false,\n * otherwise an `Ed25519Account` will be returned instead.\n */\nexport interface GenerateEd25519SingleKeyAccountArgs {\n scheme?: SigningSchemeInput.Ed25519;\n legacy: false;\n}\n\n/**\n * Arguments for generating an `SingleKeyAccount` with any supported private key\n * that is not an `Ed25519PrivateKey`.\n * The `legacy` argument defaults to false and cannot be explicitly set to true.\n */\nexport interface GenerateSingleKeyAccountArgs {\n scheme: Exclude<SigningSchemeInput, SigningSchemeInput.Ed25519>;\n legacy?: false;\n}\n\n/**\n * Arguments for generating an opaque `Account`.\n * This is used when the input signature scheme is not known at compilation time.\n */\nexport interface GenerateAccountArgs {\n scheme?: SigningSchemeInput;\n legacy?: boolean;\n}\n\n/**\n * Arguments for deriving a private key from a mnemonic phrase and a BIP44 path.\n */\nexport interface PrivateKeyFromDerivationPathArgs {\n path: string;\n mnemonic: string;\n}\n\n/**\n * Interface for a generic Aptos account.\n *\n * The interface is defined as abstract class to provide a single entrypoint for account generation,\n * either through `Account.generate()` or `Account.fromDerivationPath`.\n * Despite this being an abstract class, it should be treated as an interface and enforced using\n * the `implements` keyword.\n *\n * Note: Generating an account instance does not create the account on-chain.\n */\nexport abstract class Account {\n /**\n * Public key associated with the account\n */\n abstract readonly publicKey: AccountPublicKey;\n\n /**\n * Account address associated with the account\n */\n abstract readonly accountAddress: AccountAddress;\n\n /**\n * Signing scheme used to sign transactions\n */\n abstract signingScheme: SigningScheme;\n\n /**\n * Derives an account from a randomly generated private key.\n * @param args.scheme The signature scheme to use, to generate the private key\n * @param args.legacy Whether to use a legacy authentication scheme, when applicable\n * @returns An account compatible with the provided signature scheme\n */\n static generate(args?: GenerateEd25519AccountArgs): Ed25519Account;\n static generate(args: GenerateEd25519SingleKeyAccountArgs): SingleKeyAccount;\n static generate(args: GenerateSingleKeyAccountArgs): SingleKeyAccount;\n static generate(args: GenerateAccountArgs): Account;\n static generate(args: GenerateAccountArgs = {}) {\n const { scheme = SigningSchemeInput.Ed25519, legacy = true } = args;\n if (scheme === SigningSchemeInput.Ed25519 && legacy) {\n return Ed25519Account.generate();\n }\n return SingleKeyAccount.generate({ scheme });\n }\n\n /**\n * Creates an account from the provided private key.\n *\n * @param args.privateKey a valid private key\n * @param args.address the account's address. If not provided, it will be derived from the public key.\n * @param args.legacy Whether to use a legacy authentication scheme, when applicable\n */\n static fromPrivateKey(args: CreateEd25519AccountFromPrivateKeyArgs): Ed25519Account;\n static fromPrivateKey(args: CreateEd25519SingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;\n static fromPrivateKey(args: CreateSingleKeyAccountFromPrivateKeyArgs): SingleKeyAccount;\n static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs): Account;\n static fromPrivateKey(args: CreateAccountFromPrivateKeyArgs) {\n const { privateKey, address, legacy = true } = args;\n if (privateKey instanceof Ed25519PrivateKey && legacy) {\n return new Ed25519Account({\n privateKey,\n address,\n });\n }\n return new SingleKeyAccount({ privateKey, address });\n }\n\n /**\n * @deprecated use `fromPrivateKey` instead.\n * Instantiates an account given a private key and a specified account address.\n * This is primarily used to instantiate an `Account` that has had its authentication key rotated.\n *\n * @param args.privateKey PrivateKey - the underlying private key for the account\n * @param args.address AccountAddress - The account address the `Account` will sign for\n * @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults\n * to generating a Legacy Ed25519 keypair\n *\n * @returns Account\n */\n static fromPrivateKeyAndAddress(args: CreateAccountFromPrivateKeyArgs) {\n return this.fromPrivateKey(args);\n }\n\n /**\n * Derives an account with bip44 path and mnemonics\n *\n * @param args.scheme The signature scheme to derive the private key with\n * @param args.path the BIP44 derive hardened path (e.g. m/44'/637'/0'/0'/0') for Ed25519,\n * or non-hardened path (e.g. m/44'/637'/0'/0/0) for secp256k1\n * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}\n * @param args.mnemonic the mnemonic seed phrase of the account\n */\n static fromDerivationPath(args: GenerateEd25519AccountArgs & PrivateKeyFromDerivationPathArgs): Ed25519Account;\n static fromDerivationPath(\n args: GenerateEd25519SingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs,\n ): SingleKeyAccount;\n static fromDerivationPath(args: GenerateSingleKeyAccountArgs & PrivateKeyFromDerivationPathArgs): SingleKeyAccount;\n static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs): Account;\n static fromDerivationPath(args: GenerateAccountArgs & PrivateKeyFromDerivationPathArgs) {\n const { scheme = SigningSchemeInput.Ed25519, mnemonic, path, legacy = true } = args;\n if (scheme === SigningSchemeInput.Ed25519 && legacy) {\n return Ed25519Account.fromDerivationPath({ mnemonic, path });\n }\n return SingleKeyAccount.fromDerivationPath({ scheme, mnemonic, path });\n }\n\n /**\n * @deprecated use `publicKey.authKey()` instead.\n * This key enables account owners to rotate their private key(s)\n * associated with the account without changing the address that hosts their account.\n * See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}\n *\n * @param args.publicKey PublicKey - public key of the account\n * @returns The authentication key for the associated account\n */\n static authKey(args: { publicKey: AccountPublicKey }): AuthenticationKey {\n const { publicKey } = args;\n return publicKey.authKey();\n }\n\n /**\n * Sign a message using the available signing capabilities.\n * @param message the signing message, as binary input\n * @return the AccountAuthenticator containing the signature, together with the account's public key\n */\n abstract signWithAuthenticator(message: HexInput): AccountAuthenticator;\n\n /**\n * Sign a transaction using the available signing capabilities.\n * @param transaction the raw transaction\n * @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key\n */\n abstract signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticator;\n\n /**\n * Sign the given message using the available signing capabilities.\n * @param message in HexInput format\n * @returns Signature\n */\n abstract sign(message: HexInput): Signature;\n\n /**\n * Sign the given transaction using the available signing capabilities.\n * @param transaction the transaction to be signed\n * @returns Signature\n */\n abstract signTransaction(transaction: AnyRawTransaction): Signature;\n\n /**\n * Verify the given message and signature with the public key.\n * @param args.message raw message data in HexInput format\n * @param args.signature signed message Signature\n * @returns\n */\n verifySignature(args: VerifySignatureArgs): boolean {\n return this.publicKey.verifySignature(args);\n }\n}\n"],"mappings":"2HA4GO,IAAeA,EAAf,KAAuB,CA0B5B,OAAO,SAASC,EAA4B,CAAC,EAAG,CAC9C,GAAM,CAAE,OAAAC,IAAqC,OAAAC,EAAS,EAAK,EAAIF,EAC/D,OAAIC,IAAW,GAA8BC,EACpCC,EAAe,SAAS,EAE1BC,EAAiB,SAAS,CAAE,OAAAH,CAAO,CAAC,CAC7C,CAaA,OAAO,eAAeD,EAAuC,CAC3D,GAAM,CAAE,WAAAK,EAAY,QAAAC,EAAS,OAAAJ,EAAS,EAAK,EAAIF,EAC/C,OAAIK,aAAsBE,GAAqBL,EACtC,IAAIC,EAAe,CACxB,WAAAE,EACA,QAAAC,CACF,CAAC,EAEI,IAAIF,EAAiB,CAAE,WAAAC,EAAY,QAAAC,CAAQ,CAAC,CACrD,CAcA,OAAO,yBAAyBN,EAAuC,CACrE,OAAO,KAAK,eAAeA,CAAI,CACjC,CAiBA,OAAO,mBAAmBA,EAA8D,CACtF,GAAM,CAAE,OAAAC,IAAqC,SAAAO,EAAU,KAAAC,EAAM,OAAAP,EAAS,EAAK,EAAIF,EAC/E,OAAIC,IAAW,GAA8BC,EACpCC,EAAe,mBAAmB,CAAE,SAAAK,EAAU,KAAAC,CAAK,CAAC,EAEtDL,EAAiB,mBAAmB,CAAE,OAAAH,EAAQ,SAAAO,EAAU,KAAAC,CAAK,CAAC,CACvE,CAWA,OAAO,QAAQT,EAA0D,CACvE,GAAM,CAAE,UAAAU,CAAU,EAAIV,EACtB,OAAOU,EAAU,QAAQ,CAC3B,CAoCA,gBAAgBV,EAAoC,CAClD,OAAO,KAAK,UAAU,gBAAgBA,CAAI,CAC5C,CACF","names":["Account","args","scheme","legacy","Ed25519Account","SingleKeyAccount","privateKey","address","Ed25519PrivateKey","mnemonic","path","publicKey"]}
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-DSTKXJMA.mjs";import{b as i}from"./chunk-IOSQVDZI.mjs";import{a as d}from"./chunk-52C73T26.mjs";var o=class t extends d{constructor(e,r){super();this.address=e,this.name=r}static fromStr(e){let r=e.split("::");if(r.length!==2)throw new Error("Invalid module id.");return new t(i.fromString(r[0]),new s(r[1]))}serialize(e){this.address.serialize(e),this.name.serialize(e)}static deserialize(e){let r=i.deserialize(e),n=s.deserialize(e);return new t(r,n)}};export{o as a};
2
- //# sourceMappingURL=chunk-RHBCVCOS.mjs.map
1
+ import{a as s}from"./chunk-B7X6PSE7.mjs";import{b as i}from"./chunk-QRS4DGP3.mjs";import{a as d}from"./chunk-36QXVFR5.mjs";var o=class t extends d{constructor(e,r){super(),this.address=e,this.name=r}static fromStr(e){let r=e.split("::");if(r.length!==2)throw new Error("Invalid module id.");return new t(i.fromString(r[0]),new s(r[1]))}serialize(e){this.address.serialize(e),this.name.serialize(e)}static deserialize(e){let r=i.deserialize(e),n=s.deserialize(e);return new t(r,n)}};export{o as a};
2
+ //# sourceMappingURL=chunk-35EWRSDK.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-AOCNYMMX.mjs";import{a as U,b,c as f,d as u,e as h,f as y}from"./chunk-56CNRT2K.mjs";import{a as s}from"./chunk-FVA2OPG4.mjs";var B=class{bcsToBytes(){let e=new n;return this.serialize(e),e.toUint8Array()}bcsToHex(){let e=this.bcsToBytes();return c.fromHexInput(e)}},n=class{constructor(e=64){if(e<=0)throw new Error("Length needs to be greater than 0");this.buffer=new ArrayBuffer(e),this.offset=0}ensureBufferWillHandleSize(e){for(;this.buffer.byteLength<this.offset+e;){let t=new ArrayBuffer(this.buffer.byteLength*2);new Uint8Array(t).set(new Uint8Array(this.buffer)),this.buffer=t}}appendToBuffer(e){this.ensureBufferWillHandleSize(e.length),new Uint8Array(this.buffer,this.offset).set(e),this.offset+=e.length}serializeWithFunction(e,t,i){this.ensureBufferWillHandleSize(t);let a=new DataView(this.buffer,this.offset);e.apply(a,[0,i,!0]),this.offset+=t}serializeStr(e){let t=new TextEncoder;this.serializeBytes(t.encode(e))}serializeBytes(e){this.serializeU32AsUleb128(e.length),this.appendToBuffer(e)}serializeFixedBytes(e){this.appendToBuffer(e)}serializeBool(e){A(e);let t=e?1:0;this.appendToBuffer(new Uint8Array([t]))}serializeU8(e){this.appendToBuffer(new Uint8Array([e]))}serializeU16(e){this.serializeWithFunction(DataView.prototype.setUint16,2,e)}serializeU32(e){this.serializeWithFunction(DataView.prototype.setUint32,4,e)}serializeU64(e){let t=BigInt(e)&BigInt(f),i=BigInt(e)>>BigInt(32);this.serializeU32(Number(t)),this.serializeU32(Number(i))}serializeU128(e){let t=BigInt(e)&u,i=BigInt(e)>>BigInt(64);this.serializeU64(t),this.serializeU64(i)}serializeU256(e){let t=BigInt(e)&h,i=BigInt(e)>>BigInt(128);this.serializeU128(t),this.serializeU128(i)}serializeU32AsUleb128(e){let t=e,i=[];for(;t>>>7;)i.push(t&127|128),t>>>=7;i.push(t),this.appendToBuffer(new Uint8Array(i))}toUint8Array(){return new Uint8Array(this.buffer).slice(0,this.offset)}serialize(e){e.serialize(this)}serializeVector(e){this.serializeU32AsUleb128(e.length),e.forEach(t=>{t.serialize(this)})}};s([o(0,U)],n.prototype,"serializeU8",1),s([o(0,b)],n.prototype,"serializeU16",1),s([o(0,f)],n.prototype,"serializeU32",1),s([o(BigInt(0),u)],n.prototype,"serializeU64",1),s([o(BigInt(0),h)],n.prototype,"serializeU128",1),s([o(BigInt(0),y)],n.prototype,"serializeU256",1),s([o(0,f)],n.prototype,"serializeU32AsUleb128",1);function A(r){if(typeof r!="boolean")throw new Error(`${r} is not a boolean value`)}var g=(r,e,t)=>`${r} is out of range: [${e}, ${t}]`;function w(r,e,t){let i=BigInt(r);if(i>BigInt(t)||i<BigInt(e))throw new Error(g(r,e,t))}function o(r,e){return(t,i,a)=>{let p=a.value;return a.value=function(l){return w(l,r,e),p.apply(this,[l])},a}}export{B as a,n as b,A as c,g as d,w as e};
2
- //# sourceMappingURL=chunk-52C73T26.mjs.map
1
+ import{b as c}from"./chunk-BCUSI3N6.mjs";import{a as U,b,c as f,d as u,e as h,f as y}from"./chunk-56CNRT2K.mjs";import{a as s}from"./chunk-FVA2OPG4.mjs";var B=class{bcsToBytes(){let e=new n;return this.serialize(e),e.toUint8Array()}bcsToHex(){let e=this.bcsToBytes();return c.fromHexInput(e)}},n=class{constructor(e=64){if(e<=0)throw new Error("Length needs to be greater than 0");this.buffer=new ArrayBuffer(e),this.offset=0}ensureBufferWillHandleSize(e){for(;this.buffer.byteLength<this.offset+e;){let t=new ArrayBuffer(this.buffer.byteLength*2);new Uint8Array(t).set(new Uint8Array(this.buffer)),this.buffer=t}}appendToBuffer(e){this.ensureBufferWillHandleSize(e.length),new Uint8Array(this.buffer,this.offset).set(e),this.offset+=e.length}serializeWithFunction(e,t,i){this.ensureBufferWillHandleSize(t);let a=new DataView(this.buffer,this.offset);e.apply(a,[0,i,!0]),this.offset+=t}serializeStr(e){let t=new TextEncoder;this.serializeBytes(t.encode(e))}serializeBytes(e){this.serializeU32AsUleb128(e.length),this.appendToBuffer(e)}serializeFixedBytes(e){this.appendToBuffer(e)}serializeBool(e){A(e);let t=e?1:0;this.appendToBuffer(new Uint8Array([t]))}serializeU8(e){this.appendToBuffer(new Uint8Array([e]))}serializeU16(e){this.serializeWithFunction(DataView.prototype.setUint16,2,e)}serializeU32(e){this.serializeWithFunction(DataView.prototype.setUint32,4,e)}serializeU64(e){let t=BigInt(e)&BigInt(f),i=BigInt(e)>>BigInt(32);this.serializeU32(Number(t)),this.serializeU32(Number(i))}serializeU128(e){let t=BigInt(e)&u,i=BigInt(e)>>BigInt(64);this.serializeU64(t),this.serializeU64(i)}serializeU256(e){let t=BigInt(e)&h,i=BigInt(e)>>BigInt(128);this.serializeU128(t),this.serializeU128(i)}serializeU32AsUleb128(e){let t=e,i=[];for(;t>>>7;)i.push(t&127|128),t>>>=7;i.push(t),this.appendToBuffer(new Uint8Array(i))}toUint8Array(){return new Uint8Array(this.buffer).slice(0,this.offset)}serialize(e){e.serialize(this)}serializeVector(e){this.serializeU32AsUleb128(e.length),e.forEach(t=>{t.serialize(this)})}};s([o(0,U)],n.prototype,"serializeU8",1),s([o(0,b)],n.prototype,"serializeU16",1),s([o(0,f)],n.prototype,"serializeU32",1),s([o(BigInt(0),u)],n.prototype,"serializeU64",1),s([o(BigInt(0),h)],n.prototype,"serializeU128",1),s([o(BigInt(0),y)],n.prototype,"serializeU256",1),s([o(0,f)],n.prototype,"serializeU32AsUleb128",1);function A(r){if(typeof r!="boolean")throw new Error(`${r} is not a boolean value`)}var g=(r,e,t)=>`${r} is out of range: [${e}, ${t}]`;function w(r,e,t){let i=BigInt(r);if(i>BigInt(t)||i<BigInt(e))throw new Error(g(r,e,t))}function o(r,e){return(t,i,a)=>{let p=a.value;return a.value=function(l){return w(l,r,e),p.apply(this,[l])},a}}export{B as a,n as b,A as c,g as d,w as e};
2
+ //# sourceMappingURL=chunk-36QXVFR5.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as P}from"./chunk-TM7NDDT3.mjs";import{a as v}from"./chunk-AH44UPM4.mjs";import{e as d}from"./chunk-JQIGQMNZ.mjs";import{d as C,e as w,f as h,g as k,h as T,j as b,k as O,l as q}from"./chunk-S3EDNXZE.mjs";import{b as p,c as f}from"./chunk-S2VSJJRJ.mjs";import{a as _}from"./chunk-GHYE26Q5.mjs";import{a as A}from"./chunk-2YZSEM2G.mjs";import{a as m}from"./chunk-IENCDVPF.mjs";import{b as y}from"./chunk-2X7A4HUS.mjs";import{b as l}from"./chunk-T2AGN5YT.mjs";import{a as g}from"./chunk-5EN52MUT.mjs";import{b as c}from"./chunk-QRS4DGP3.mjs";async function S(t){let{aptosConfig:n,accountAddress:e}=t,{data:o}=await p({aptosConfig:n,originMethod:"getInfo",path:`accounts/${c.from(e).toString()}`});return o}async function H(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return f({aptosConfig:n,originMethod:"getModules",path:`accounts/${c.from(e).toString()}/modules`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??1e3}})}async function J(t){return t.options?.ledgerVersion!==void 0?G(t):v(async()=>G(t),`module-${t.accountAddress}-${t.moduleName}`,1e3*60*5)()}async function G(t){let{aptosConfig:n,accountAddress:e,moduleName:o,options:s}=t,{data:r}=await p({aptosConfig:n,originMethod:"getModule",path:`accounts/${c.from(e).toString()}/module/${o}`,params:{ledger_version:s?.ledgerVersion}});return r}async function U(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return f({aptosConfig:n,originMethod:"getTransactions",path:`accounts/${c.from(e).toString()}/transactions`,params:{start:o?.offset,limit:o?.limit}})}async function X(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return f({aptosConfig:n,originMethod:"getResources",path:`accounts/${c.from(e).toString()}/resources`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??999}})}async function K(t){let{aptosConfig:n,accountAddress:e,resourceType:o,options:s}=t,{data:r}=await p({aptosConfig:n,originMethod:"getResource",path:`accounts/${c.from(e).toString()}/resource/${o}`,params:{ledger_version:s?.ledgerVersion}});return r.data}async function Q(t){let{aptosConfig:n,authenticationKey:e,options:o}=t,s=await K({aptosConfig:n,accountAddress:"0x1",resourceType:"0x1::account::OriginatingAddress",options:o}),{address_map:{handle:r}}=s,a=c.from(e);try{let i=await P({aptosConfig:n,handle:r,data:{key:a.toString(),key_type:"address",value_type:"address"},options:o});return c.from(i)}catch(i){if(i instanceof _&&i.data.error_code==="table_item_not_found")return a;throw i}}async function Y(t){let{aptosConfig:n,accountAddress:e}=t,s={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}},a=await d({aptosConfig:n,query:{query:O,variables:{where_condition:s}},originMethod:"getAccountTokensCount"});return a.current_token_ownerships_v2_aggregate.aggregate?a.current_token_ownerships_v2_aggregate.aggregate.count:0}async function Z(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(r.token_standard={_eq:o?.tokenStandard});let a={query:T,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedTokens"})).current_token_ownerships_v2}async function oo(t){let{aptosConfig:n,accountAddress:e,collectionAddress:o,options:s}=t,r=c.from(e).toStringLong(),a=c.from(o).toStringLong(),i={owner_address:{_eq:r},current_token_data:{collection_id:{_eq:a}},amount:{_gt:0}};s?.tokenStandard&&(i.token_standard={_eq:s?.tokenStandard});let u={query:b,variables:{where_condition:i,offset:s?.offset,limit:s?.limit,order_by:s?.orderBy}};return(await d({aptosConfig:n,query:u,originMethod:"getAccountOwnedTokensFromCollectionAddress"})).current_token_ownerships_v2}async function to(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(r.current_collection={token_standard:{_eq:o?.tokenStandard}});let a={query:h,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCollectionsWithOwnedTokens"})).current_collection_ownership_v2_view}async function eo(t){let{aptosConfig:n,accountAddress:e}=t,o=c.from(e).toStringLong(),r=await d({aptosConfig:n,query:{query:q,variables:{address:o}},originMethod:"getAccountTransactionsCount"});return r.account_transactions_aggregate.aggregate?r.account_transactions_aggregate.aggregate.count:0}async function no(t){let{aptosConfig:n,accountAddress:e,coinType:o}=t,s=c.from(e).toStringLong(),r=await I({aptosConfig:n,accountAddress:s,options:{where:{asset_type:{_eq:o}}}});return r[0]?r[0].amount:0}async function I(t){let{aptosConfig:n,accountAddress:e,options:o}=t,s=c.from(e).toStringLong(),r={...o?.where,owner_address:{_eq:s}},a={query:w,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCoinsData"})).current_fungible_asset_balances}async function ro(t){let{aptosConfig:n,accountAddress:e}=t,o=c.from(e).toStringLong(),r=await d({aptosConfig:n,query:{query:C,variables:{address:o}},originMethod:"getAccountCoinsCount"});if(!r.current_fungible_asset_balances_aggregate.aggregate)throw Error("Failed to get the count of account coins");return r.current_fungible_asset_balances_aggregate.aggregate.count}async function so(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()}},a={query:k,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedObjects"})).current_objects}async function co(t){let{aptosConfig:n,privateKey:e}=t,o=new m(e.publicKey());if(e instanceof y){let r=g.fromPublicKey({publicKey:o}).derivedAddress();return A.fromPrivateKey({privateKey:e,address:r})}if(e instanceof l){let s=g.fromPublicKey({publicKey:o});if(await M({authKey:s,aptosConfig:n})){let u=s.derivedAddress();return A.fromPrivateKey({privateKey:e,address:u,legacy:!1})}let a=g.fromPublicKey({publicKey:o.publicKey});if(await M({authKey:a,aptosConfig:n})){let u=a.derivedAddress();return A.fromPrivateKey({privateKey:e,address:u,legacy:!0})}}throw new Error(`Can't derive account from private key ${e}`)}async function M(t){let{aptosConfig:n,authKey:e}=t,o=await Q({aptosConfig:n,authenticationKey:e.derivedAddress()});try{return await S({aptosConfig:n,accountAddress:o}),!0}catch(s){if(s.status===404)return!1;throw new Error(`Error while looking for an account info ${o.toString()}`)}}export{S as a,H as b,J as c,U as d,X as e,K as f,Q as g,Y as h,Z as i,oo as j,to as k,eo as l,no as m,I as n,ro as o,so as p,co as q,M as r};
2
+ //# sourceMappingURL=chunk-3HSXKDOC.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/internal/account.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file contains the underlying implementations for exposed API surface in\n * the {@link api/account}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * account namespace and without having a dependency cycle error.\n */\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { AptosApiError, getAptosFullNode, paginateWithCursor } from \"../client\";\nimport { AccountAddress, AccountAddressInput } from \"../core/accountAddress\";\nimport { Account } from \"../account\";\nimport { AnyPublicKey, Ed25519PublicKey, PrivateKey } from \"../core/crypto\";\nimport { queryIndexer } from \"./general\";\nimport {\n AccountData,\n GetAccountCoinsDataResponse,\n GetAccountCollectionsWithOwnedTokenResponse,\n GetAccountOwnedObjectsResponse,\n GetAccountOwnedTokensFromCollectionResponse,\n GetAccountOwnedTokensQueryResponse,\n LedgerVersionArg,\n MoveModuleBytecode,\n MoveResource,\n MoveStructId,\n OrderByArg,\n PaginationArgs,\n TokenStandardArg,\n TransactionResponse,\n WhereArg,\n} from \"../types\";\nimport {\n GetAccountCoinsCountQuery,\n GetAccountCoinsDataQuery,\n GetAccountCollectionsWithOwnedTokensQuery,\n GetAccountOwnedObjectsQuery,\n GetAccountOwnedTokensFromCollectionQuery,\n GetAccountOwnedTokensQuery,\n GetAccountTokensCountQuery,\n GetAccountTransactionsCountQuery,\n} from \"../types/generated/operations\";\nimport {\n GetAccountCoinsCount,\n GetAccountCoinsData,\n GetAccountCollectionsWithOwnedTokens,\n GetAccountOwnedObjects,\n GetAccountOwnedTokens,\n GetAccountOwnedTokensFromCollection,\n GetAccountTokensCount,\n GetAccountTransactionsCount,\n} from \"../types/generated/queries\";\nimport { memoizeAsync } from \"../utils/memoize\";\nimport { Secp256k1PrivateKey, AuthenticationKey, Ed25519PrivateKey } from \"../core\";\nimport { CurrentFungibleAssetBalancesBoolExp } from \"../types/generated/types\";\nimport { getTableItem } from \"./table\";\n\nexport async function getInfo(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n}): Promise<AccountData> {\n const { aptosConfig, accountAddress } = args;\n const { data } = await getAptosFullNode<{}, AccountData>({\n aptosConfig,\n originMethod: \"getInfo\",\n path: `accounts/${AccountAddress.from(accountAddress).toString()}`,\n });\n return data;\n}\n\nexport async function getModules(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n options?: PaginationArgs & LedgerVersionArg;\n}): Promise<MoveModuleBytecode[]> {\n const { aptosConfig, accountAddress, options } = args;\n return paginateWithCursor<{}, MoveModuleBytecode[]>({\n aptosConfig,\n originMethod: \"getModules\",\n path: `accounts/${AccountAddress.from(accountAddress).toString()}/modules`,\n params: {\n ledger_version: options?.ledgerVersion,\n start: options?.offset,\n limit: options?.limit ?? 1000,\n },\n });\n}\n\n/**\n * Queries for a move module given account address and module name\n *\n * @param args.accountAddress Hex-encoded 32 byte Aptos account address\n * @param args.moduleName The name of the module\n * @param args.query.ledgerVersion Specifies ledger version of transactions. By default, latest version will be used\n * @returns The move module.\n */\nexport async function getModule(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n moduleName: string;\n options?: LedgerVersionArg;\n}): Promise<MoveModuleBytecode> {\n // We don't memoize the account module by ledger version, as it's not a common use case, this would be handled\n // by the developer directly\n if (args.options?.ledgerVersion !== undefined) {\n return getModuleInner(args);\n }\n\n return memoizeAsync(\n async () => getModuleInner(args),\n `module-${args.accountAddress}-${args.moduleName}`,\n 1000 * 60 * 5, // 5 minutes\n )();\n}\n\nasync function getModuleInner(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n moduleName: string;\n options?: LedgerVersionArg;\n}): Promise<MoveModuleBytecode> {\n const { aptosConfig, accountAddress, moduleName, options } = args;\n\n const { data } = await getAptosFullNode<{}, MoveModuleBytecode>({\n aptosConfig,\n originMethod: \"getModule\",\n path: `accounts/${AccountAddress.from(accountAddress).toString()}/module/${moduleName}`,\n params: { ledger_version: options?.ledgerVersion },\n });\n return data;\n}\n\nexport async function getTransactions(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n options?: PaginationArgs;\n}): Promise<TransactionResponse[]> {\n const { aptosConfig, accountAddress, options } = args;\n return paginateWithCursor<{}, TransactionResponse[]>({\n aptosConfig,\n originMethod: \"getTransactions\",\n path: `accounts/${AccountAddress.from(accountAddress).toString()}/transactions`,\n params: { start: options?.offset, limit: options?.limit },\n });\n}\n\nexport async function getResources(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n options?: PaginationArgs & LedgerVersionArg;\n}): Promise<MoveResource[]> {\n const { aptosConfig, accountAddress, options } = args;\n return paginateWithCursor<{}, MoveResource[]>({\n aptosConfig,\n originMethod: \"getResources\",\n path: `accounts/${AccountAddress.from(accountAddress).toString()}/resources`,\n params: {\n ledger_version: options?.ledgerVersion,\n start: options?.offset,\n limit: options?.limit ?? 999,\n },\n });\n}\n\nexport async function getResource<T extends {}>(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n resourceType: MoveStructId;\n options?: LedgerVersionArg;\n}): Promise<T> {\n const { aptosConfig, accountAddress, resourceType, options } = args;\n const { data } = await getAptosFullNode<{}, MoveResource>({\n aptosConfig,\n originMethod: \"getResource\",\n path: `accounts/${AccountAddress.from(accountAddress).toString()}/resource/${resourceType}`,\n params: { ledger_version: options?.ledgerVersion },\n });\n return data.data as T;\n}\n\nexport async function lookupOriginalAccountAddress(args: {\n aptosConfig: AptosConfig;\n authenticationKey: AccountAddressInput;\n options?: LedgerVersionArg;\n}): Promise<AccountAddress> {\n const { aptosConfig, authenticationKey, options } = args;\n type OriginatingAddress = {\n address_map: { handle: string };\n };\n const resource = await getResource<OriginatingAddress>({\n aptosConfig,\n accountAddress: \"0x1\",\n resourceType: \"0x1::account::OriginatingAddress\",\n options,\n });\n\n const {\n address_map: { handle },\n } = resource;\n\n const authKeyAddress = AccountAddress.from(authenticationKey);\n\n // If the address is not found in the address map, which means its not rotated\n // then return the address as is\n try {\n const originalAddress = await getTableItem<string>({\n aptosConfig,\n handle,\n data: {\n key: authKeyAddress.toString(),\n key_type: \"address\",\n value_type: \"address\",\n },\n options,\n });\n\n return AccountAddress.from(originalAddress);\n } catch (err) {\n if (err instanceof AptosApiError && err.data.error_code === \"table_item_not_found\") {\n return authKeyAddress;\n }\n\n throw err;\n }\n}\n\nexport async function getAccountTokensCount(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n}): Promise<number> {\n const { aptosConfig, accountAddress } = args;\n\n const address = AccountAddress.from(accountAddress).toStringLong();\n\n const whereCondition: { owner_address: { _eq: string }; amount: { _gt: number } } = {\n owner_address: { _eq: address },\n amount: { _gt: 0 },\n };\n\n const graphqlQuery = {\n query: GetAccountTokensCount,\n variables: { where_condition: whereCondition },\n };\n\n const data = await queryIndexer<GetAccountTokensCountQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getAccountTokensCount\",\n });\n\n // commonjs (aka cjs) doesnt handle Nullish Coalescing for some reason\n // might be because of how ts infer the graphql generated scheme type\n return data.current_token_ownerships_v2_aggregate.aggregate\n ? data.current_token_ownerships_v2_aggregate.aggregate.count\n : 0;\n}\n\nexport async function getAccountOwnedTokens(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;\n}): Promise<GetAccountOwnedTokensQueryResponse> {\n const { aptosConfig, accountAddress, options } = args;\n const address = AccountAddress.from(accountAddress).toStringLong();\n\n const whereCondition: { owner_address: { _eq: string }; amount: { _gt: number }; token_standard?: { _eq: string } } =\n {\n owner_address: { _eq: address },\n amount: { _gt: 0 },\n };\n\n if (options?.tokenStandard) {\n whereCondition.token_standard = { _eq: options?.tokenStandard };\n }\n\n const graphqlQuery = {\n query: GetAccountOwnedTokens,\n variables: {\n where_condition: whereCondition,\n offset: options?.offset,\n limit: options?.limit,\n order_by: options?.orderBy,\n },\n };\n\n const data = await queryIndexer<GetAccountOwnedTokensQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getAccountOwnedTokens\",\n });\n\n return data.current_token_ownerships_v2;\n}\n\nexport async function getAccountOwnedTokensFromCollectionAddress(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n collectionAddress: AccountAddressInput;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;\n}): Promise<GetAccountOwnedTokensFromCollectionResponse> {\n const { aptosConfig, accountAddress, collectionAddress, options } = args;\n const ownerAddress = AccountAddress.from(accountAddress).toStringLong();\n const collAddress = AccountAddress.from(collectionAddress).toStringLong();\n\n const whereCondition: {\n owner_address: { _eq: string };\n current_token_data: { collection_id: { _eq: string } };\n amount: { _gt: number };\n token_standard?: { _eq: string };\n } = {\n owner_address: { _eq: ownerAddress },\n current_token_data: { collection_id: { _eq: collAddress } },\n amount: { _gt: 0 },\n };\n\n if (options?.tokenStandard) {\n whereCondition.token_standard = { _eq: options?.tokenStandard };\n }\n\n const graphqlQuery = {\n query: GetAccountOwnedTokensFromCollection,\n variables: {\n where_condition: whereCondition,\n offset: options?.offset,\n limit: options?.limit,\n order_by: options?.orderBy,\n },\n };\n\n const data = await queryIndexer<GetAccountOwnedTokensFromCollectionQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getAccountOwnedTokensFromCollectionAddress\",\n });\n\n return data.current_token_ownerships_v2;\n}\n\nexport async function getAccountCollectionsWithOwnedTokens(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;\n}): Promise<GetAccountCollectionsWithOwnedTokenResponse> {\n const { aptosConfig, accountAddress, options } = args;\n const address = AccountAddress.from(accountAddress).toStringLong();\n\n const whereCondition: {\n owner_address: { _eq: string };\n amount: { _gt: number };\n current_collection?: { token_standard: { _eq: string } };\n } = {\n owner_address: { _eq: address },\n amount: { _gt: 0 },\n };\n\n if (options?.tokenStandard) {\n whereCondition.current_collection = {\n token_standard: { _eq: options?.tokenStandard },\n };\n }\n\n const graphqlQuery = {\n query: GetAccountCollectionsWithOwnedTokens,\n variables: {\n where_condition: whereCondition,\n offset: options?.offset,\n limit: options?.limit,\n order_by: options?.orderBy,\n },\n };\n\n const data = await queryIndexer<GetAccountCollectionsWithOwnedTokensQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getAccountCollectionsWithOwnedTokens\",\n });\n\n return data.current_collection_ownership_v2_view;\n}\n\nexport async function getAccountTransactionsCount(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n}): Promise<number> {\n const { aptosConfig, accountAddress } = args;\n\n const address = AccountAddress.from(accountAddress).toStringLong();\n\n const graphqlQuery = {\n query: GetAccountTransactionsCount,\n variables: { address },\n };\n\n const data = await queryIndexer<GetAccountTransactionsCountQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getAccountTransactionsCount\",\n });\n\n // commonjs (aka cjs) doesnt handle Nullish Coalescing for some reason\n // might be because of how ts infer the graphql generated scheme type\n return data.account_transactions_aggregate.aggregate ? data.account_transactions_aggregate.aggregate.count : 0;\n}\n\nexport async function getAccountCoinAmount(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n coinType: MoveStructId;\n}): Promise<number> {\n const { aptosConfig, accountAddress, coinType } = args;\n const address = AccountAddress.from(accountAddress).toStringLong();\n\n const data = await getAccountCoinsData({\n aptosConfig,\n accountAddress: address,\n options: {\n where: { asset_type: { _eq: coinType } },\n },\n });\n\n // commonjs (aka cjs) doesnt handle Nullish Coalescing for some reason\n // might be because of how ts infer the graphql generated scheme type\n return data[0] ? data[0].amount : 0;\n}\n\nexport async function getAccountCoinsData(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n options?: PaginationArgs & OrderByArg<GetAccountCoinsDataResponse[0]> & WhereArg<CurrentFungibleAssetBalancesBoolExp>;\n}): Promise<GetAccountCoinsDataResponse> {\n const { aptosConfig, accountAddress, options } = args;\n const address = AccountAddress.from(accountAddress).toStringLong();\n\n const whereCondition: { owner_address: { _eq: string } } = {\n ...options?.where,\n owner_address: { _eq: address },\n };\n\n const graphqlQuery = {\n query: GetAccountCoinsData,\n variables: {\n where_condition: whereCondition,\n offset: options?.offset,\n limit: options?.limit,\n order_by: options?.orderBy,\n },\n };\n\n const data = await queryIndexer<GetAccountCoinsDataQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getAccountCoinsData\",\n });\n\n return data.current_fungible_asset_balances;\n}\n\nexport async function getAccountCoinsCount(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n}): Promise<number> {\n const { aptosConfig, accountAddress } = args;\n const address = AccountAddress.from(accountAddress).toStringLong();\n\n const graphqlQuery = {\n query: GetAccountCoinsCount,\n variables: { address },\n };\n\n const data = await queryIndexer<GetAccountCoinsCountQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getAccountCoinsCount\",\n });\n\n if (!data.current_fungible_asset_balances_aggregate.aggregate) {\n throw Error(\"Failed to get the count of account coins\");\n }\n\n return data.current_fungible_asset_balances_aggregate.aggregate.count;\n}\n\nexport async function getAccountOwnedObjects(args: {\n aptosConfig: AptosConfig;\n accountAddress: AccountAddressInput;\n options?: PaginationArgs & OrderByArg<GetAccountOwnedObjectsResponse[0]>;\n}): Promise<GetAccountOwnedObjectsResponse> {\n const { aptosConfig, accountAddress, options } = args;\n const address = AccountAddress.from(accountAddress).toStringLong();\n\n const whereCondition: { owner_address: { _eq: string } } = {\n owner_address: { _eq: address },\n };\n const graphqlQuery = {\n query: GetAccountOwnedObjects,\n variables: {\n where_condition: whereCondition,\n offset: options?.offset,\n limit: options?.limit,\n order_by: options?.orderBy,\n },\n };\n const data = await queryIndexer<GetAccountOwnedObjectsQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getAccountOwnedObjects\",\n });\n\n return data.current_objects;\n}\n\n/**\n * NOTE: There is a potential issue once unified single signer scheme will be adopted\n * by the community.\n *\n * Becuase on could create 2 accounts with the same private key with this new authenticator type,\n * we’ll need to determine the order in which we lookup the accounts. First unified\n * scheme and then legacy scheme vs first legacy scheme and then unified scheme.\n *\n */\nexport async function deriveAccountFromPrivateKey(args: {\n aptosConfig: AptosConfig;\n privateKey: PrivateKey;\n}): Promise<Account> {\n const { aptosConfig, privateKey } = args;\n const publicKey = new AnyPublicKey(privateKey.publicKey());\n\n if (privateKey instanceof Secp256k1PrivateKey) {\n // private key is secp256k1, therefore we know it for sure uses a single signer key\n const authKey = AuthenticationKey.fromPublicKey({ publicKey });\n const address = authKey.derivedAddress();\n return Account.fromPrivateKey({ privateKey, address });\n }\n\n if (privateKey instanceof Ed25519PrivateKey) {\n // lookup single sender ed25519\n const singleSenderTransactionAuthenticatorAuthKey = AuthenticationKey.fromPublicKey({\n publicKey,\n });\n const isSingleSenderTransactionAuthenticator = await isAccountExist({\n authKey: singleSenderTransactionAuthenticatorAuthKey,\n aptosConfig,\n });\n if (isSingleSenderTransactionAuthenticator) {\n const address = singleSenderTransactionAuthenticatorAuthKey.derivedAddress();\n return Account.fromPrivateKey({ privateKey, address, legacy: false });\n }\n // lookup legacy ed25519\n const legacyAuthKey = AuthenticationKey.fromPublicKey({\n publicKey: publicKey.publicKey as Ed25519PublicKey,\n });\n const isLegacyEd25519 = await isAccountExist({ authKey: legacyAuthKey, aptosConfig });\n if (isLegacyEd25519) {\n const address = legacyAuthKey.derivedAddress();\n return Account.fromPrivateKey({ privateKey, address, legacy: true });\n }\n }\n // if we are here, it means we couldn't find an address with an\n // auth key that matches the provided private key\n throw new Error(`Can't derive account from private key ${privateKey}`);\n}\n\nexport async function isAccountExist(args: { aptosConfig: AptosConfig; authKey: AuthenticationKey }): Promise<boolean> {\n const { aptosConfig, authKey } = args;\n const accountAddress = await lookupOriginalAccountAddress({\n aptosConfig,\n authenticationKey: authKey.derivedAddress(),\n });\n\n try {\n await getInfo({\n aptosConfig,\n accountAddress,\n });\n return true;\n } catch (error: any) {\n // account not found\n if (error.status === 404) {\n return false;\n }\n throw new Error(`Error while looking for an account info ${accountAddress.toString()}`);\n }\n}\n"],"mappings":"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","names":["getInfo","args","aptosConfig","accountAddress","data","getAptosFullNode","AccountAddress","getModules","options","paginateWithCursor","getModule","getModuleInner","memoizeAsync","moduleName","getTransactions","getResources","getResource","resourceType","lookupOriginalAccountAddress","authenticationKey","resource","handle","authKeyAddress","originalAddress","getTableItem","err","AptosApiError","getAccountTokensCount","whereCondition","queryIndexer","GetAccountTokensCount","getAccountOwnedTokens","graphqlQuery","GetAccountOwnedTokens","getAccountOwnedTokensFromCollectionAddress","collectionAddress","ownerAddress","collAddress","GetAccountOwnedTokensFromCollection","getAccountCollectionsWithOwnedTokens","GetAccountCollectionsWithOwnedTokens","getAccountTransactionsCount","address","GetAccountTransactionsCount","getAccountCoinAmount","coinType","getAccountCoinsData","GetAccountCoinsData","getAccountCoinsCount","GetAccountCoinsCount","getAccountOwnedObjects","GetAccountOwnedObjects","deriveAccountFromPrivateKey","privateKey","publicKey","AnyPublicKey","Secp256k1PrivateKey","AuthenticationKey","Account","Ed25519PrivateKey","singleSenderTransactionAuthenticatorAuthKey","isAccountExist","legacyAuthKey","authKey","error"]}
@@ -0,0 +1,2 @@
1
+ import{a as d,b}from"./chunk-MCRRHBFQ.mjs";import{a as h,b as z}from"./chunk-PIVZMT5D.mjs";import{a as p,b as g}from"./chunk-IENCDVPF.mjs";import{a as o,c as y}from"./chunk-T2AGN5YT.mjs";import{a as c}from"./chunk-36QXVFR5.mjs";var r=class extends c{static deserialize(i){let e=i.deserializeUleb128AsU32();switch(e){case 0:return u.load(i);case 1:return l.load(i);case 2:return n.load(i);case 3:return a.load(i);default:throw new Error(`Unknown variant index for AccountAuthenticator: ${e}`)}}isEd25519(){return this instanceof u}isMultiEd25519(){return this instanceof l}isSingleKey(){return this instanceof n}isMultiKey(){return this instanceof a}},u=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(0),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=o.deserialize(i),s=y.deserialize(i);return new t(e,s)}},l=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(1),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=d.deserialize(i),s=b.deserialize(i);return new t(e,s)}},n=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(2),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=p.deserialize(i),s=g.deserialize(i);return new t(e,s)}},a=class t extends r{constructor(i,e){super(),this.public_keys=i,this.signatures=e}serialize(i){i.serializeU32AsUleb128(3),this.public_keys.serialize(i),this.signatures.serialize(i)}static load(i){let e=h.deserialize(i),s=z.deserialize(i);return new t(e,s)}};export{r as a,u as b,l as c,n as d,a as e};
2
+ //# sourceMappingURL=chunk-3N6N3KOS.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/transactions/authenticator/account.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\nimport { Serializer, Deserializer, Serializable } from \"../../bcs\";\nimport { AnyPublicKey, AnySignature } from \"../../core/crypto\";\nimport { Ed25519PublicKey, Ed25519Signature } from \"../../core/crypto/ed25519\";\nimport { MultiEd25519PublicKey, MultiEd25519Signature } from \"../../core/crypto/multiEd25519\";\nimport { MultiKey, MultiKeySignature } from \"../../core/crypto/multiKey\";\nimport { AccountAuthenticatorVariant } from \"../../types\";\n\nexport abstract class AccountAuthenticator extends Serializable {\n abstract serialize(serializer: Serializer): void;\n\n static deserialize(deserializer: Deserializer): AccountAuthenticator {\n const index = deserializer.deserializeUleb128AsU32();\n switch (index) {\n case AccountAuthenticatorVariant.Ed25519:\n return AccountAuthenticatorEd25519.load(deserializer);\n case AccountAuthenticatorVariant.MultiEd25519:\n return AccountAuthenticatorMultiEd25519.load(deserializer);\n case AccountAuthenticatorVariant.SingleKey:\n return AccountAuthenticatorSingleKey.load(deserializer);\n case AccountAuthenticatorVariant.MultiKey:\n return AccountAuthenticatorMultiKey.load(deserializer);\n default:\n throw new Error(`Unknown variant index for AccountAuthenticator: ${index}`);\n }\n }\n\n isEd25519(): this is AccountAuthenticatorEd25519 {\n return this instanceof AccountAuthenticatorEd25519;\n }\n\n isMultiEd25519(): this is AccountAuthenticatorMultiEd25519 {\n return this instanceof AccountAuthenticatorMultiEd25519;\n }\n\n isSingleKey(): this is AccountAuthenticatorSingleKey {\n return this instanceof AccountAuthenticatorSingleKey;\n }\n\n isMultiKey(): this is AccountAuthenticatorMultiKey {\n return this instanceof AccountAuthenticatorMultiKey;\n }\n}\n\n/**\n * Transaction authenticator Ed25519 for a multi signer transaction\n *\n * @param public_key Account's Ed25519 public key.\n * @param signature Account's Ed25519 signature\n *\n */\nexport class AccountAuthenticatorEd25519 extends AccountAuthenticator {\n public readonly public_key: Ed25519PublicKey;\n\n public readonly signature: Ed25519Signature;\n\n constructor(public_key: Ed25519PublicKey, signature: Ed25519Signature) {\n super();\n this.public_key = public_key;\n this.signature = signature;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(AccountAuthenticatorVariant.Ed25519);\n this.public_key.serialize(serializer);\n this.signature.serialize(serializer);\n }\n\n static load(deserializer: Deserializer): AccountAuthenticatorEd25519 {\n const public_key = Ed25519PublicKey.deserialize(deserializer);\n const signature = Ed25519Signature.deserialize(deserializer);\n return new AccountAuthenticatorEd25519(public_key, signature);\n }\n}\n\n/**\n * Transaction authenticator Multi Ed25519 for a multi signers transaction\n *\n * @param public_key Account's MultiEd25519 public key.\n * @param signature Account's MultiEd25519 signature\n *\n */\nexport class AccountAuthenticatorMultiEd25519 extends AccountAuthenticator {\n public readonly public_key: MultiEd25519PublicKey;\n\n public readonly signature: MultiEd25519Signature;\n\n constructor(public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature) {\n super();\n this.public_key = public_key;\n this.signature = signature;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(AccountAuthenticatorVariant.MultiEd25519);\n this.public_key.serialize(serializer);\n this.signature.serialize(serializer);\n }\n\n static load(deserializer: Deserializer): AccountAuthenticatorMultiEd25519 {\n const public_key = MultiEd25519PublicKey.deserialize(deserializer);\n const signature = MultiEd25519Signature.deserialize(deserializer);\n return new AccountAuthenticatorMultiEd25519(public_key, signature);\n }\n}\n\n/**\n * AccountAuthenticatorSingleKey for a single signer\n *\n * @param public_key AnyPublicKey\n * @param signature AnySignature\n *\n */\nexport class AccountAuthenticatorSingleKey extends AccountAuthenticator {\n public readonly public_key: AnyPublicKey;\n\n public readonly signature: AnySignature;\n\n constructor(public_key: AnyPublicKey, signature: AnySignature) {\n super();\n this.public_key = public_key;\n this.signature = signature;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(AccountAuthenticatorVariant.SingleKey);\n this.public_key.serialize(serializer);\n this.signature.serialize(serializer);\n }\n\n static load(deserializer: Deserializer): AccountAuthenticatorSingleKey {\n const public_key = AnyPublicKey.deserialize(deserializer);\n const signature = AnySignature.deserialize(deserializer);\n return new AccountAuthenticatorSingleKey(public_key, signature);\n }\n}\n\n/**\n * AccountAuthenticatorMultiKey for a multi signer\n *\n * @param public_keys MultiKey\n * @param signatures Signature\n *\n */\nexport class AccountAuthenticatorMultiKey extends AccountAuthenticator {\n public readonly public_keys: MultiKey;\n\n public readonly signatures: MultiKeySignature;\n\n constructor(public_keys: MultiKey, signatures: MultiKeySignature) {\n super();\n this.public_keys = public_keys;\n this.signatures = signatures;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeU32AsUleb128(AccountAuthenticatorVariant.MultiKey);\n this.public_keys.serialize(serializer);\n this.signatures.serialize(serializer);\n }\n\n static load(deserializer: Deserializer): AccountAuthenticatorMultiKey {\n const public_keys = MultiKey.deserialize(deserializer);\n const signatures = MultiKeySignature.deserialize(deserializer);\n return new AccountAuthenticatorMultiKey(public_keys, signatures);\n }\n}\n"],"mappings":"oOAYO,IAAeA,EAAf,cAA4CC,CAAa,CAG9D,OAAO,YAAYC,EAAkD,CACnE,IAAMC,EAAQD,EAAa,wBAAwB,EACnD,OAAQC,EAAO,CACb,OACE,OAAOC,EAA4B,KAAKF,CAAY,EACtD,OACE,OAAOG,EAAiC,KAAKH,CAAY,EAC3D,OACE,OAAOI,EAA8B,KAAKJ,CAAY,EACxD,OACE,OAAOK,EAA6B,KAAKL,CAAY,EACvD,QACE,MAAM,IAAI,MAAM,mDAAmDC,CAAK,EAAE,CAC9E,CACF,CAEA,WAAiD,CAC/C,OAAO,gBAAgBC,CACzB,CAEA,gBAA2D,CACzD,OAAO,gBAAgBC,CACzB,CAEA,aAAqD,CACnD,OAAO,gBAAgBC,CACzB,CAEA,YAAmD,CACjD,OAAO,gBAAgBC,CACzB,CACF,EASaH,EAAN,MAAMI,UAAoCR,CAAqB,CAKpE,YAAYS,EAA8BC,EAA6B,CACrE,MAAM,EACN,KAAK,WAAaD,EAClB,KAAK,UAAYC,CACnB,CAEA,UAAUC,EAA8B,CACtCA,EAAW,uBAAyD,EACpE,KAAK,WAAW,UAAUA,CAAU,EACpC,KAAK,UAAU,UAAUA,CAAU,CACrC,CAEA,OAAO,KAAKT,EAAyD,CACnE,IAAMO,EAAaG,EAAiB,YAAYV,CAAY,EACtDQ,EAAYG,EAAiB,YAAYX,CAAY,EAC3D,OAAO,IAAIM,EAA4BC,EAAYC,CAAS,CAC9D,CACF,EASaL,EAAN,MAAMS,UAAyCd,CAAqB,CAKzE,YAAYS,EAAmCC,EAAkC,CAC/E,MAAM,EACN,KAAK,WAAaD,EAClB,KAAK,UAAYC,CACnB,CAEA,UAAUC,EAA8B,CACtCA,EAAW,uBAA8D,EACzE,KAAK,WAAW,UAAUA,CAAU,EACpC,KAAK,UAAU,UAAUA,CAAU,CACrC,CAEA,OAAO,KAAKT,EAA8D,CACxE,IAAMO,EAAaM,EAAsB,YAAYb,CAAY,EAC3DQ,EAAYM,EAAsB,YAAYd,CAAY,EAChE,OAAO,IAAIY,EAAiCL,EAAYC,CAAS,CACnE,CACF,EASaJ,EAAN,MAAMW,UAAsCjB,CAAqB,CAKtE,YAAYS,EAA0BC,EAAyB,CAC7D,MAAM,EACN,KAAK,WAAaD,EAClB,KAAK,UAAYC,CACnB,CAEA,UAAUC,EAA8B,CACtCA,EAAW,uBAA2D,EACtE,KAAK,WAAW,UAAUA,CAAU,EACpC,KAAK,UAAU,UAAUA,CAAU,CACrC,CAEA,OAAO,KAAKT,EAA2D,CACrE,IAAMO,EAAaS,EAAa,YAAYhB,CAAY,EAClDQ,EAAYS,EAAa,YAAYjB,CAAY,EACvD,OAAO,IAAIe,EAA8BR,EAAYC,CAAS,CAChE,CACF,EASaH,EAAN,MAAMa,UAAqCpB,CAAqB,CAKrE,YAAYqB,EAAuBC,EAA+B,CAChE,MAAM,EACN,KAAK,YAAcD,EACnB,KAAK,WAAaC,CACpB,CAEA,UAAUX,EAA8B,CACtCA,EAAW,uBAA0D,EACrE,KAAK,YAAY,UAAUA,CAAU,EACrC,KAAK,WAAW,UAAUA,CAAU,CACtC,CAEA,OAAO,KAAKT,EAA0D,CACpE,IAAMmB,EAAcE,EAAS,YAAYrB,CAAY,EAC/CoB,EAAaE,EAAkB,YAAYtB,CAAY,EAC7D,OAAO,IAAIkB,EAA6BC,EAAaC,CAAU,CACjE,CACF","names":["AccountAuthenticator","Serializable","deserializer","index","AccountAuthenticatorEd25519","AccountAuthenticatorMultiEd25519","AccountAuthenticatorSingleKey","AccountAuthenticatorMultiKey","_AccountAuthenticatorEd25519","public_key","signature","serializer","Ed25519PublicKey","Ed25519Signature","_AccountAuthenticatorMultiEd25519","MultiEd25519PublicKey","MultiEd25519Signature","_AccountAuthenticatorSingleKey","AnyPublicKey","AnySignature","_AccountAuthenticatorMultiKey","public_keys","signatures","MultiKey","MultiKeySignature"]}
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-UF534PKA.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
- //# sourceMappingURL=chunk-NWYIE7ZX.mjs.map
1
+ import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-K7HX7JQH.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
+ //# sourceMappingURL=chunk-477G7LHJ.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as e}from"./chunk-36QXVFR5.mjs";import{b as r}from"./chunk-BCUSI3N6.mjs";var t=class extends e{toString(){let n=this.toUint8Array();return r.fromHexInput(n).toString()}},a=class extends t{};export{t as a,a as b};
2
+ //# sourceMappingURL=chunk-4NHWV5AI.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as s}from"./chunk-IOSQVDZI.mjs";import{a as o}from"./chunk-52C73T26.mjs";import{b as n}from"./chunk-AOCNYMMX.mjs";import{sha3_256 as d}from"@noble/hashes/sha3";var r=class r extends o{constructor(t){super();let{data:e}=t,i=n.fromHexInput(e);if(i.toUint8Array().length!==r.LENGTH)throw new Error(`Authentication Key length should be ${r.LENGTH}`);this.data=i}serialize(t){t.serializeFixedBytes(this.data.toUint8Array())}static deserialize(t){let e=t.deserializeFixedBytes(r.LENGTH);return new r({data:e})}toString(){return this.data.toString()}toUint8Array(){return this.data.toUint8Array()}static fromSchemeAndBytes(t){let{scheme:e,input:i}=t,u=n.fromHexInput(i).toUint8Array(),h=new Uint8Array([...u,e]),a=d.create();a.update(h);let y=a.digest();return new r({data:y})}static fromPublicKeyAndScheme(t){let{publicKey:e}=t;return e.authKey()}static fromPublicKey(t){let{publicKey:e}=t;return e.authKey()}derivedAddress(){return new s(this.data.toUint8Array())}};r.LENGTH=32;var c=r;export{c as a};
2
- //# sourceMappingURL=chunk-NPFNYP75.mjs.map
1
+ import{b as s}from"./chunk-QRS4DGP3.mjs";import{a as o}from"./chunk-36QXVFR5.mjs";import{b as n}from"./chunk-BCUSI3N6.mjs";import{sha3_256 as d}from"@noble/hashes/sha3";var r=class r extends o{constructor(t){super();let{data:e}=t,i=n.fromHexInput(e);if(i.toUint8Array().length!==r.LENGTH)throw new Error(`Authentication Key length should be ${r.LENGTH}`);this.data=i}serialize(t){t.serializeFixedBytes(this.data.toUint8Array())}static deserialize(t){let e=t.deserializeFixedBytes(r.LENGTH);return new r({data:e})}toString(){return this.data.toString()}toUint8Array(){return this.data.toUint8Array()}static fromSchemeAndBytes(t){let{scheme:e,input:i}=t,u=n.fromHexInput(i).toUint8Array(),h=new Uint8Array([...u,e]),a=d.create();a.update(h);let y=a.digest();return new r({data:y})}static fromPublicKeyAndScheme(t){let{publicKey:e}=t;return e.authKey()}static fromPublicKey(t){let{publicKey:e}=t;return e.authKey()}derivedAddress(){return new s(this.data.toUint8Array())}};r.LENGTH=32;var c=r;export{c as a};
2
+ //# sourceMappingURL=chunk-5EN52MUT.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-3JPVQHOR.mjs";import{a as R}from"./chunk-AH44UPM4.mjs";import{h as x,i as P}from"./chunk-IR46T46A.mjs";import{b as c,c as A}from"./chunk-APDALGDD.mjs";import{a as w}from"./chunk-6FBKUTGF.mjs";import{d as C}from"./chunk-CYNQRMO5.mjs";async function v(s){let{aptosConfig:n,options:t}=s;return A({aptosConfig:n,originMethod:"getTransactions",path:"transactions",params:{start:t?.offset,limit:t?.limit}})}async function D(s){let{aptosConfig:n}=s;return R(async()=>{let{data:t}=await c({aptosConfig:n,originMethod:"getGasPriceEstimation",path:"estimate_gas_price"});return t},`gas-price-${n.network}`,1e3*60*5)()}async function N(s){let{aptosConfig:n,ledgerVersion:t}=s,{data:o}=await c({aptosConfig:n,originMethod:"getTransactionByVersion",path:`transactions/by_version/${t}`});return o}async function T(s){let{aptosConfig:n,transactionHash:t}=s,{data:o}=await c({aptosConfig:n,path:`transactions/by_hash/${t}`,originMethod:"getTransactionByHash"});return o}async function G(s){let{aptosConfig:n,transactionHash:t}=s;try{return(await T({aptosConfig:n,transactionHash:t})).type==="pending_transaction"}catch(o){if(o?.status===404)return!0;throw o}}async function b(s){let{aptosConfig:n,transactionHash:t}=s,{data:o}=await c({aptosConfig:n,path:`transactions/wait_by_hash/${t}`,originMethod:"longWaitForTransaction"});return o}async function W(s){let{aptosConfig:n,transactionHash:t,options:o}=s,r=o?.timeoutSecs??20,u=o?.checkSuccess??!0,a=!0,p=0,e,g,m=200,E=1.5;function d(i){if(!(i instanceof w)||(g=i,i.status!==404&&i.status>=400&&i.status<500))throw i}try{e=await T({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction"}catch(i){d(i)}if(a){let i=Date.now();try{e=await b({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction"}catch(l){d(l)}p=(Date.now()-i)/1e3}for(;a&&!(p>=r);){try{if(e=await T({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction",!a)break}catch(i){d(i)}await h(m),p+=m/1e3,m*=E}if(e===void 0)throw g||new f(`Fetching transaction ${t} failed and timed out after ${r} seconds`,e);if(e.type==="pending_transaction")throw new f(`Transaction ${t} timed out in pending state after ${r} seconds`,e);if(!u)return e;if(!e.success)throw new y(`Transaction ${t} failed with an error: ${e.vm_status}`,e);return e}async function O(s){let{aptosConfig:n,processorType:t}=s,o=BigInt(s.minimumLedgerVersion),r=3e3,u=new Date().getTime(),a=BigInt(-1);for(;a<o;){if(new Date().getTime()-u>r)throw new Error("waitForLastSuccessIndexerVersionSync timeout");if(t===void 0?a=await x({aptosConfig:n}):a=(await P({aptosConfig:n,processorType:t})).last_success_version,a>=o)break;await h(200)}}var f=class extends Error{constructor(t,o){super(t);this.lastSubmittedTransaction=o}},y=class extends Error{constructor(t,o){super(t);this.transaction=o}};export{v as a,D as b,N as c,T as d,G as e,b as f,W as g,O as h,f as i,y as j};
2
- //# sourceMappingURL=chunk-L5IL2IAB.mjs.map
1
+ import{a as h}from"./chunk-3JPVQHOR.mjs";import{a as R}from"./chunk-AH44UPM4.mjs";import{g as x,h as P}from"./chunk-JQIGQMNZ.mjs";import{b as c,c as A}from"./chunk-S2VSJJRJ.mjs";import{a as C}from"./chunk-GHYE26Q5.mjs";import{d as w}from"./chunk-CYNQRMO5.mjs";async function v(o){let{aptosConfig:n,options:t}=o;return A({aptosConfig:n,originMethod:"getTransactions",path:"transactions",params:{start:t?.offset,limit:t?.limit}})}async function D(o){let{aptosConfig:n}=o;return R(async()=>{let{data:t}=await c({aptosConfig:n,originMethod:"getGasPriceEstimation",path:"estimate_gas_price"});return t},`gas-price-${n.network}`,1e3*60*5)()}async function N(o){let{aptosConfig:n,ledgerVersion:t}=o,{data:s}=await c({aptosConfig:n,originMethod:"getTransactionByVersion",path:`transactions/by_version/${t}`});return s}async function T(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await c({aptosConfig:n,path:`transactions/by_hash/${t}`,originMethod:"getTransactionByHash"});return s}async function G(o){let{aptosConfig:n,transactionHash:t}=o;try{return(await T({aptosConfig:n,transactionHash:t})).type==="pending_transaction"}catch(s){if(s?.status===404)return!0;throw s}}async function b(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await c({aptosConfig:n,path:`transactions/wait_by_hash/${t}`,originMethod:"longWaitForTransaction"});return s}async function W(o){let{aptosConfig:n,transactionHash:t,options:s}=o,r=s?.timeoutSecs??20,u=s?.checkSuccess??!0,a=!0,p=0,e,g,m=200,E=1.5;function d(i){if(!(i instanceof C)||(g=i,i.status!==404&&i.status>=400&&i.status<500))throw i}try{e=await T({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction"}catch(i){d(i)}if(a){let i=Date.now();try{e=await b({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction"}catch(l){d(l)}p=(Date.now()-i)/1e3}for(;a&&!(p>=r);){try{if(e=await T({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction",!a)break}catch(i){d(i)}await h(m),p+=m/1e3,m*=E}if(e===void 0)throw g||new f(`Fetching transaction ${t} failed and timed out after ${r} seconds`,e);if(e.type==="pending_transaction")throw new f(`Transaction ${t} timed out in pending state after ${r} seconds`,e);if(!u)return e;if(!e.success)throw new y(`Transaction ${t} failed with an error: ${e.vm_status}`,e);return e}async function O(o){let{aptosConfig:n,processorType:t}=o,s=BigInt(o.minimumLedgerVersion),r=3e3,u=new Date().getTime(),a=BigInt(-1);for(;a<s;){if(new Date().getTime()-u>r)throw new Error("waitForLastSuccessIndexerVersionSync timeout");if(t===void 0?a=await x({aptosConfig:n}):a=(await P({aptosConfig:n,processorType:t})).last_success_version,a>=s)break;await h(200)}}var f=class extends Error{constructor(n,t){super(n),this.lastSubmittedTransaction=t}},y=class extends Error{constructor(n,t){super(n),this.transaction=t}};export{v as a,D as b,N as c,T as d,G as e,b as f,W as g,O as h,f as i,y as j};
2
+ //# sourceMappingURL=chunk-5VIESFOC.mjs.map
@@ -1,2 +1,2 @@
1
- import{h as e}from"./chunk-L5IL2IAB.mjs";async function i(o){o.minimumLedgerVersion!==void 0&&await e({aptosConfig:o.config,minimumLedgerVersion:o.minimumLedgerVersion,processorType:o.processorType})}export{i as a};
2
- //# sourceMappingURL=chunk-BIAEC6FO.mjs.map
1
+ import{h as e}from"./chunk-5VIESFOC.mjs";async function i(o){o.minimumLedgerVersion!==void 0&&await e({aptosConfig:o.config,minimumLedgerVersion:o.minimumLedgerVersion,processorType:o.processorType})}export{i as a};
2
+ //# sourceMappingURL=chunk-5YLAWRI2.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-UF534PKA.mjs";import{f as t,i as o}from"./chunk-DMKUAQB7.mjs";import{e as n}from"./chunk-CYNQRMO5.mjs";var u={typeParameters:[{constraints:[]}],parameters:[new o,new t]};async function y(e){let{aptosConfig:i,sender:s,recipient:c,amount:p,coinType:a,options:m}=e;return r({aptosConfig:i,sender:s,data:{function:"0x1::aptos_account::transfer_coins",typeArguments:[a??n],functionArguments:[c,p],abi:u},options:m})}export{y as a};
2
- //# sourceMappingURL=chunk-N77VJHW5.mjs.map
1
+ import{a as r}from"./chunk-K7HX7JQH.mjs";import{f as t,i as o}from"./chunk-U3YYSIIT.mjs";import{e as n}from"./chunk-CYNQRMO5.mjs";var u={typeParameters:[{constraints:[]}],parameters:[new o,new t]};async function y(e){let{aptosConfig:i,sender:s,recipient:c,amount:p,coinType:a,options:m}=e;return r({aptosConfig:i,sender:s,data:{function:"0x1::aptos_account::transfer_coins",typeArguments:[a??n],functionArguments:[c,p],abi:u},options:m})}export{y as a};
2
+ //# sourceMappingURL=chunk-6JLYD5Q2.mjs.map
@@ -0,0 +1,2 @@
1
+ import{d as o}from"./chunk-JFIAWBCK.mjs";import{b as i}from"./chunk-3N6N3KOS.mjs";import{b as n}from"./chunk-T2AGN5YT.mjs";import{b as s}from"./chunk-QRS4DGP3.mjs";var c=class a{constructor(t){this.signingScheme=0;let{privateKey:e,address:r}=t;this.privateKey=e,this.publicKey=e.publicKey(),this.accountAddress=r?s.from(r):this.publicKey.authKey().derivedAddress()}static generate(){let t=n.generate();return new a({privateKey:t})}static fromDerivationPath(t){let{path:e,mnemonic:r}=t,u=n.fromDerivationPath(e,r);return new a({privateKey:u})}verifySignature(t){return this.publicKey.verifySignature(t)}signWithAuthenticator(t){return new i(this.publicKey,this.privateKey.sign(t))}signTransactionWithAuthenticator(t){return new i(this.publicKey,this.signTransaction(t))}sign(t){return this.privateKey.sign(t)}signTransaction(t){return this.sign(o(t))}};export{c as a};
2
+ //# sourceMappingURL=chunk-6XWDDCQD.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/account/Ed25519Account.ts"],"sourcesContent":["import { AccountAuthenticatorEd25519 } from \"../transactions/authenticator/account\";\nimport { HexInput, SigningScheme } from \"../types\";\nimport { AccountAddress, AccountAddressInput } from \"../core/accountAddress\";\nimport { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from \"../core/crypto\";\nimport type { Account } from \"./Account\";\nimport { AnyRawTransaction } from \"../transactions/types\";\nimport { generateSigningMessageForTransaction } from \"../transactions/transactionBuilder/signingMessage\";\n\nexport interface Ed25519SignerConstructorArgs {\n privateKey: Ed25519PrivateKey;\n address?: AccountAddressInput;\n}\n\nexport interface Ed25519SignerFromDerivationPathArgs {\n path: string;\n mnemonic: string;\n}\n\nexport interface VerifyEd25519SignatureArgs {\n message: HexInput;\n signature: Ed25519Signature;\n}\n\n/**\n * Signer implementation for the Ed25519 authentication scheme.\n * This extends an {@link Ed25519Account} by adding signing capabilities through an {@link Ed25519PrivateKey}.\n *\n * Note: Generating a signer instance does not create the account on-chain.\n */\nexport class Ed25519Account implements Account {\n /**\n * Private key associated with the account\n */\n readonly privateKey: Ed25519PrivateKey;\n\n readonly publicKey: Ed25519PublicKey;\n\n readonly accountAddress: AccountAddress;\n\n readonly signingScheme = SigningScheme.Ed25519;\n\n // region Constructors\n\n constructor(args: Ed25519SignerConstructorArgs) {\n const { privateKey, address } = args;\n this.privateKey = privateKey;\n this.publicKey = privateKey.publicKey();\n this.accountAddress = address ? AccountAddress.from(address) : this.publicKey.authKey().derivedAddress();\n }\n\n /**\n * Derives a signer from a randomly generated private key\n */\n static generate() {\n const privateKey = Ed25519PrivateKey.generate();\n return new Ed25519Account({ privateKey });\n }\n\n /**\n * Derives an account with bip44 path and mnemonics\n *\n * @param args.path the BIP44 derive hardened path e.g. m/44'/637'/0'/0'/0'\n * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}\n * @param args.mnemonic the mnemonic seed phrase of the account\n */\n static fromDerivationPath(args: Ed25519SignerFromDerivationPathArgs) {\n const { path, mnemonic } = args;\n const privateKey = Ed25519PrivateKey.fromDerivationPath(path, mnemonic);\n return new Ed25519Account({ privateKey });\n }\n\n // endregion\n\n // region Account\n\n /**\n * Verify the given message and signature with the public key.\n *\n * @param args.message raw message data in HexInput format\n * @param args.signature signed message Signature\n * @returns\n */\n verifySignature(args: VerifyEd25519SignatureArgs): boolean {\n return this.publicKey.verifySignature(args);\n }\n\n /**\n * Sign a message using the account's Ed25519 private key.\n * @param message the signing message, as binary input\n * @return the AccountAuthenticator containing the signature, together with the account's public key\n */\n signWithAuthenticator(message: HexInput): AccountAuthenticatorEd25519 {\n return new AccountAuthenticatorEd25519(this.publicKey, this.privateKey.sign(message));\n }\n\n /**\n * Sign a transaction using the account's Ed25519 private key.\n * @param transaction the raw transaction\n * @return the AccountAuthenticator containing the signature of the transaction, together with the account's public key\n */\n signTransactionWithAuthenticator(transaction: AnyRawTransaction): AccountAuthenticatorEd25519 {\n return new AccountAuthenticatorEd25519(this.publicKey, this.signTransaction(transaction));\n }\n\n /**\n * Sign the given message using the account's Ed25519 private key.\n * @param message in HexInput format\n * @returns Signature\n */\n sign(message: HexInput): Ed25519Signature {\n return this.privateKey.sign(message);\n }\n\n /**\n * Sign the given transaction using the available signing capabilities.\n * @param transaction the transaction to be signed\n * @returns Signature\n */\n signTransaction(transaction: AnyRawTransaction): Ed25519Signature {\n return this.sign(generateSigningMessageForTransaction(transaction));\n }\n\n // endregion\n}\n"],"mappings":"oKA6BO,IAAMA,EAAN,MAAMC,CAAkC,CAc7C,YAAYC,EAAoC,CAJhD,KAAS,cAAgB,EAKvB,GAAM,CAAE,WAAAC,EAAY,QAAAC,CAAQ,EAAIF,EAChC,KAAK,WAAaC,EAClB,KAAK,UAAYA,EAAW,UAAU,EACtC,KAAK,eAAiBC,EAAUC,EAAe,KAAKD,CAAO,EAAI,KAAK,UAAU,QAAQ,EAAE,eAAe,CACzG,CAKA,OAAO,UAAW,CAChB,IAAMD,EAAaG,EAAkB,SAAS,EAC9C,OAAO,IAAIL,EAAe,CAAE,WAAAE,CAAW,CAAC,CAC1C,CASA,OAAO,mBAAmBD,EAA2C,CACnE,GAAM,CAAE,KAAAK,EAAM,SAAAC,CAAS,EAAIN,EACrBC,EAAaG,EAAkB,mBAAmBC,EAAMC,CAAQ,EACtE,OAAO,IAAIP,EAAe,CAAE,WAAAE,CAAW,CAAC,CAC1C,CAaA,gBAAgBD,EAA2C,CACzD,OAAO,KAAK,UAAU,gBAAgBA,CAAI,CAC5C,CAOA,sBAAsBO,EAAgD,CACpE,OAAO,IAAIC,EAA4B,KAAK,UAAW,KAAK,WAAW,KAAKD,CAAO,CAAC,CACtF,CAOA,iCAAiCE,EAA6D,CAC5F,OAAO,IAAID,EAA4B,KAAK,UAAW,KAAK,gBAAgBC,CAAW,CAAC,CAC1F,CAOA,KAAKF,EAAqC,CACxC,OAAO,KAAK,WAAW,KAAKA,CAAO,CACrC,CAOA,gBAAgBE,EAAkD,CAChE,OAAO,KAAK,KAAKC,EAAqCD,CAAW,CAAC,CACpE,CAGF","names":["Ed25519Account","_Ed25519Account","args","privateKey","address","AccountAddress","Ed25519PrivateKey","path","mnemonic","message","AccountAuthenticatorEd25519","transaction","generateSigningMessageForTransaction"]}
@@ -1,2 +1,2 @@
1
- import{c as A}from"./chunk-U43IJHQN.mjs";import{a as x,b as c,c as w,d as g,e as M,f as C,g as O,h,i as _,k as V,l as G,m as j,n as k,o as z,p as D,r as i,s as L}from"./chunk-FXNFWLQC.mjs";import{n as I}from"./chunk-DMKUAQB7.mjs";import{c as p}from"./chunk-4374JPA6.mjs";import{b as U}from"./chunk-IOSQVDZI.mjs";import{a as o,b as S,c as T}from"./chunk-FS3NSGBF.mjs";import{a as d,b as E,c as B,d as v,e as $,f as b,g as F}from"./chunk-QIAHBEEW.mjs";var R=new TextEncoder;function Z(n){return n?.map(e=>c(e)?A(e):e)??[]}async function P(n,e,t,u){let r=await p({aptosConfig:u,accountAddress:n,moduleName:e});if(r.abi)return r.abi.exposed_functions.find(f=>f.name===t)}async function N(n,e,t,u){let r=await P(n,e,t,u);if(!r)throw new Error(`Could not find entry function ABI for '${n}::${e}::${t}'`);if(!r.is_entry)throw new Error(`'${n}::${e}::${t}' is not an entry function`);let f=L(r),y=[];for(let s=f;s<r.params.length;s+=1)y.push(A(r.params[s],{allowGenerics:!0}));return{signers:f,typeParameters:r.generic_type_params,parameters:y}}async function a(n,e,t,u){let r=await P(n,e,t,u);if(!r)throw new Error(`Could not find view function ABI for '${n}::${e}::${t}'`);if(!r.is_view)throw new Error(`'${n}::${e}::${t}' is not an view function`);let f=[];for(let s=0;s<r.params.length;s+=1)f.push(A(r.params[s],{allowGenerics:!0}));let y=[];for(let s=0;s<r.return.length;s+=1)y.push(A(r.return[s],{allowGenerics:!0}));return{typeParameters:r.generic_type_params,parameters:f,returnTypes:y}}function nn(n,e,t,u,r){if(u>=e.parameters.length)throw new Error(`Too many arguments for '${n}', expected ${e.parameters.length}`);let f=e.parameters[u];return l(t,f,u,r)}function l(n,e,t,u){return C(n)?(m(e,n,t),n):X(n,e,t,u)}function X(n,e,t,u){if(e.isBool()){if(x(n))return new d(n);i("boolean",t)}if(e.isAddress()){if(c(n))return U.fromString(n);i("string | AccountAddress",t)}if(e.isU8()){if(w(n))return new E(n);i("number",t)}if(e.isU16()){if(w(n))return new B(n);i("number",t)}if(e.isU32()){if(w(n))return new v(n);i("number",t)}if(e.isU64()){if(g(n))return new $(BigInt(n));i("bigint | number | string",t)}if(e.isU128()){if(g(n))return new b(BigInt(n));i("bigint | number | string",t)}if(e.isU256()){if(g(n))return new F(BigInt(n));i("bigint | number | string",t)}if(e.isGeneric()){let r=e.value;if(r<0||r>=u.length)throw new Error(`Generic argument ${e.toString()} is invalid for argument ${t}`);return l(n,u[r],t,u)}if(e.isVector()){if(e.value.isU8()){if(c(n))return o.U8(R.encode(n));if(n instanceof Uint8Array)return o.U8(n);if(n instanceof ArrayBuffer)return o.U8(new Uint8Array(n))}if(Array.isArray(n))return new o(n.map(r=>l(r,e.value,t,u)));throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}if(e.isStruct()){if(e.isString()){if(c(n))return new S(n);i("string",t)}if(e.isObject()){if(c(n))return U.fromString(n);i("string | AccountAddress",t)}if(e.isOption())return M(n)?new T(null):new T(l(n,e.value.typeArgs[0],t,u));throw new Error(`Unsupported struct input type for argument ${t}, type '${e.toString()}'`)}throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}function m(n,e,t){if(n.isBool()){if(O(e))return;i("Bool",t)}if(n.isAddress()){if(h(e))return;i("AccountAddress",t)}if(n.isU8()){if(V(e))return;i("U8",t)}if(n.isU16()){if(G(e))return;i("U16",t)}if(n.isU32()){if(j(e))return;i("U32",t)}if(n.isU64()){if(k(e))return;i("U64",t)}if(n.isU128()){if(z(e))return;i("U128",t)}if(n.isU256()){if(D(e))return;i("U256",t)}if(n.isVector()){if(e instanceof o){e.values.length>0&&m(n.value,e.values[0],t);return}i("MoveVector",t)}if(n instanceof I){if(n.isString()){if(_(e))return;i("MoveString",t)}if(n.isObject()){if(h(e))return;i("AccountAddress",t)}if(n.isOption()){if(e instanceof T){e.value!==void 0&&m(n.value.typeArgs[0],e.value,t);return}i("MoveOption",t)}}throw new Error(`Type mismatch for argument ${t}, expected '${n.toString()}'`)}export{Z as a,P as b,N as c,a as d,nn as e,l as f};
2
- //# sourceMappingURL=chunk-BE4FOV6X.mjs.map
1
+ import{c as A}from"./chunk-MJPUASSD.mjs";import{a as x,b as c,c as w,d as g,e as M,f as C,g as O,h,i as _,k as V,l as G,m as j,n as k,o as z,p as D,r as i,s as L}from"./chunk-UPSCPEEE.mjs";import{c as I}from"./chunk-3HSXKDOC.mjs";import{n as p}from"./chunk-U3YYSIIT.mjs";import{b as U}from"./chunk-QRS4DGP3.mjs";import{a as o,b as S,c as T}from"./chunk-G56GPLTB.mjs";import{a as d,b as E,c as B,d as v,e as $,f as b,g as F}from"./chunk-SRDIYE3M.mjs";var R=new TextEncoder;function Z(n){return n?.map(e=>c(e)?A(e):e)??[]}async function P(n,e,t,u){let r=await I({aptosConfig:u,accountAddress:n,moduleName:e});if(r.abi)return r.abi.exposed_functions.find(f=>f.name===t)}async function N(n,e,t,u){let r=await P(n,e,t,u);if(!r)throw new Error(`Could not find entry function ABI for '${n}::${e}::${t}'`);if(!r.is_entry)throw new Error(`'${n}::${e}::${t}' is not an entry function`);let f=L(r),y=[];for(let s=f;s<r.params.length;s+=1)y.push(A(r.params[s],{allowGenerics:!0}));return{signers:f,typeParameters:r.generic_type_params,parameters:y}}async function a(n,e,t,u){let r=await P(n,e,t,u);if(!r)throw new Error(`Could not find view function ABI for '${n}::${e}::${t}'`);if(!r.is_view)throw new Error(`'${n}::${e}::${t}' is not an view function`);let f=[];for(let s=0;s<r.params.length;s+=1)f.push(A(r.params[s],{allowGenerics:!0}));let y=[];for(let s=0;s<r.return.length;s+=1)y.push(A(r.return[s],{allowGenerics:!0}));return{typeParameters:r.generic_type_params,parameters:f,returnTypes:y}}function nn(n,e,t,u,r){if(u>=e.parameters.length)throw new Error(`Too many arguments for '${n}', expected ${e.parameters.length}`);let f=e.parameters[u];return l(t,f,u,r)}function l(n,e,t,u){return C(n)?(m(e,n,t),n):X(n,e,t,u)}function X(n,e,t,u){if(e.isBool()){if(x(n))return new d(n);i("boolean",t)}if(e.isAddress()){if(c(n))return U.fromString(n);i("string | AccountAddress",t)}if(e.isU8()){if(w(n))return new E(n);i("number",t)}if(e.isU16()){if(w(n))return new B(n);i("number",t)}if(e.isU32()){if(w(n))return new v(n);i("number",t)}if(e.isU64()){if(g(n))return new $(BigInt(n));i("bigint | number | string",t)}if(e.isU128()){if(g(n))return new b(BigInt(n));i("bigint | number | string",t)}if(e.isU256()){if(g(n))return new F(BigInt(n));i("bigint | number | string",t)}if(e.isGeneric()){let r=e.value;if(r<0||r>=u.length)throw new Error(`Generic argument ${e.toString()} is invalid for argument ${t}`);return l(n,u[r],t,u)}if(e.isVector()){if(e.value.isU8()){if(c(n))return o.U8(R.encode(n));if(n instanceof Uint8Array)return o.U8(n);if(n instanceof ArrayBuffer)return o.U8(new Uint8Array(n))}if(Array.isArray(n))return new o(n.map(r=>l(r,e.value,t,u)));throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}if(e.isStruct()){if(e.isString()){if(c(n))return new S(n);i("string",t)}if(e.isObject()){if(c(n))return U.fromString(n);i("string | AccountAddress",t)}if(e.isOption())return M(n)?new T(null):new T(l(n,e.value.typeArgs[0],t,u));throw new Error(`Unsupported struct input type for argument ${t}, type '${e.toString()}'`)}throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}function m(n,e,t){if(n.isBool()){if(O(e))return;i("Bool",t)}if(n.isAddress()){if(h(e))return;i("AccountAddress",t)}if(n.isU8()){if(V(e))return;i("U8",t)}if(n.isU16()){if(G(e))return;i("U16",t)}if(n.isU32()){if(j(e))return;i("U32",t)}if(n.isU64()){if(k(e))return;i("U64",t)}if(n.isU128()){if(z(e))return;i("U128",t)}if(n.isU256()){if(D(e))return;i("U256",t)}if(n.isVector()){if(e instanceof o){e.values.length>0&&m(n.value,e.values[0],t);return}i("MoveVector",t)}if(n instanceof p){if(n.isString()){if(_(e))return;i("MoveString",t)}if(n.isObject()){if(h(e))return;i("AccountAddress",t)}if(n.isOption()){if(e instanceof T){e.value!==void 0&&m(n.value.typeArgs[0],e.value,t);return}i("MoveOption",t)}}throw new Error(`Type mismatch for argument ${t}, expected '${n.toString()}'`)}export{Z as a,P as b,N as c,a as d,nn as e,l as f};
2
+ //# sourceMappingURL=chunk-7NEETXEA.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as m}from"./chunk-U3YYSIIT.mjs";import{a as g}from"./chunk-35EWRSDK.mjs";import{a as p}from"./chunk-B7X6PSE7.mjs";import{b as y}from"./chunk-QRS4DGP3.mjs";import{a as v}from"./chunk-G56GPLTB.mjs";import{a as F,b as d,c as T,d as x,e as E,f as _,g as w}from"./chunk-SRDIYE3M.mjs";import{a as S}from"./chunk-N3U47Y6Y.mjs";import{a as u}from"./chunk-36QXVFR5.mjs";function D(t){let e=t.deserializeUleb128AsU32();switch(e){case 0:return d.deserialize(t);case 1:return E.deserialize(t);case 2:return _.deserialize(t);case 3:return y.deserialize(t);case 4:return v.deserialize(t,d);case 5:return F.deserialize(t);case 6:return T.deserialize(t);case 7:return x.deserialize(t);case 8:return w.deserialize(t);default:throw new Error(`Unknown variant index for ScriptTransactionArgument: ${e}`)}}var a=class extends u{static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return A.load(e);case 2:return z.load(e);case 3:return h.load(e);default:throw new Error(`Unknown variant index for TransactionPayload: ${r}`)}}},A=class t extends a{constructor(e){super(),this.script=e}serialize(e){e.serializeU32AsUleb128(0),this.script.serialize(e)}static load(e){let r=U.deserialize(e);return new t(r)}},z=class t extends a{constructor(e){super(),this.entryFunction=e}serialize(e){e.serializeU32AsUleb128(2),this.entryFunction.serialize(e)}static load(e){let r=l.deserialize(e);return new t(r)}},h=class t extends a{constructor(e){super(),this.multiSig=e}serialize(e){e.serializeU32AsUleb128(3),this.multiSig.serialize(e)}static load(e){let r=f.deserialize(e);return new t(r)}},l=class t{constructor(e,r,i,n){this.module_name=e,this.function_name=r,this.type_args=i,this.args=n}static build(e,r,i,n){return new t(g.fromStr(e),new p(r),i,n)}serialize(e){this.module_name.serialize(e),this.function_name.serialize(e),e.serializeVector(this.type_args),e.serializeU32AsUleb128(this.args.length),this.args.forEach(r=>{r.serializeForEntryFunction(e)})}static deserialize(e){let r=g.deserialize(e),i=p.deserialize(e),n=e.deserializeVector(m),o=e.deserializeUleb128AsU32(),s=new Array;for(let c=0;c<o;c+=1){let M=e.deserializeUleb128AsU32(),B=S.deserialize(e,M);s.push(B)}return new t(r,i,n,s)}},U=class t{constructor(e,r,i){this.bytecode=e,this.type_args=r,this.args=i}serialize(e){e.serializeBytes(this.bytecode),e.serializeVector(this.type_args),e.serializeU32AsUleb128(this.args.length),this.args.forEach(r=>{r.serializeForScriptFunction(e)})}static deserialize(e){let r=e.deserializeBytes(),i=e.deserializeVector(m),n=e.deserializeUleb128AsU32(),o=new Array;for(let s=0;s<n;s+=1){let c=D(e);o.push(c)}return new t(r,i,o)}},f=class t{constructor(e,r){this.multisig_address=e,this.transaction_payload=r}serialize(e){this.multisig_address.serialize(e),this.transaction_payload===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.transaction_payload.serialize(e))}static deserialize(e){let r=y.deserialize(e),i=e.deserializeBool(),n;return i&&(n=b.deserialize(e)),new t(r,n)}},b=class t extends u{constructor(e){super(),this.transaction_payload=e}serialize(e){e.serializeU32AsUleb128(0),this.transaction_payload.serialize(e)}static deserialize(e){return e.deserializeUleb128AsU32(),new t(l.deserialize(e))}};export{D as a,a as b,A as c,z as d,h as e,l as f,U as g,f as h,b as i};
2
+ //# sourceMappingURL=chunk-7VRZLDIJ.mjs.map