@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
@@ -0,0 +1,2 @@
1
+ import{a as D,c as tn,d as en,e as R}from"./chunk-7NEETXEA.mjs";import{q as nn,t as y}from"./chunk-UPSCPEEE.mjs";import{a as Q}from"./chunk-3HSXKDOC.mjs";import{b as Y}from"./chunk-5VIESFOC.mjs";import{a as J}from"./chunk-AH44UPM4.mjs";import{a as j}from"./chunk-JQIGQMNZ.mjs";import{a as Z}from"./chunk-ROXFCLDT.mjs";import{e as F}from"./chunk-HYCGMFC2.mjs";import{a as L}from"./chunk-BHLICYAI.mjs";import{a as A}from"./chunk-HNEAPYNI.mjs";import{a as z}from"./chunk-P6GWG2CY.mjs";import{a as K,c as H,d as X}from"./chunk-BO2TLWNT.mjs";import{c as _,d as k,e as O,f as S,g as V,h as q,i as v}from"./chunk-7VRZLDIJ.mjs";import{b,d as x,e as B,f as E}from"./chunk-AQAH67IV.mjs";import{a as C}from"./chunk-PF57EOJY.mjs";import{b as U,c as G}from"./chunk-CYNQRMO5.mjs";import{a as W,b as p,d as g}from"./chunk-3N6N3KOS.mjs";import{a as N,b as P}from"./chunk-IENCDVPF.mjs";import{a as $,c as M}from"./chunk-2X7A4HUS.mjs";import{a as w,c as I}from"./chunk-T2AGN5YT.mjs";import{b as u}from"./chunk-QRS4DGP3.mjs";import{b as h}from"./chunk-BCUSI3N6.mjs";import{sha3_256 as un}from"@noble/hashes/sha3";async function kn(n){if(nn(n))return An(n);let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await rn({key:"entry-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:tn});return dn({...n,abi:a})}function dn(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=D(n.typeArguments);if(r.length!==t.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${t.typeParameters.length}, received ${r.length}`);let o=n.functionArguments.map((s,d)=>R(n.function,t,s,d,r));if(o.length!==t.parameters.length)throw new Error(`Too few arguments for '${e}::${i}::${a}', expected ${t.parameters.length} but got ${o.length}`);let c=S.build(`${e}::${i}`,a,r,o);if("multisigAddress"in n){let s=u.from(n.multisigAddress);return new O(new q(s,new v(c)))}return new k(c)}async function On(n){let{moduleAddress:t,moduleName:e,functionName:i}=y(n.function),a=await rn({key:"view-function",moduleAddress:t,moduleName:e,functionName:i,aptosConfig:n.aptosConfig,abi:n.abi,fetch:en});return mn({abi:a,...n})}function mn(n){let t=n.abi,{moduleAddress:e,moduleName:i,functionName:a}=y(n.function),r=D(n.typeArguments);if(r.length!==t.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${t.typeParameters.length}, received ${r.length}`);let o=n?.functionArguments?.map((c,s)=>R(n.function,t,c,s,r))??[];if(o.length!==t.parameters.length)throw new Error(`Too few arguments for '${e}::${i}::${a}', expected ${t.parameters.length} but got ${o.length}`);return S.build(`${e}::${i}`,a,r,o)}function An(n){return new _(new V(h.fromHexInput(n.bytecode).toUint8Array(),n.typeArguments??[],n.functionArguments))}async function yn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=async()=>F[t.network]?{chainId:F[t.network]}:{chainId:(await j({aptosConfig:t})).chain_id},c=async()=>a?.gasUnitPrice?{gasEstimate:a.gasUnitPrice}:{gasEstimate:(await Y({aptosConfig:t})).gas_estimate},s=async()=>{let f=async()=>a?.accountSequenceNumber!==void 0?a.accountSequenceNumber:(await Q({aptosConfig:t,accountAddress:e})).sequence_number;if(r&&u.from(r).equals(u.ZERO))try{return await f()}catch{return 0}else return f()},[{chainId:d},{gasEstimate:m},T]=await Promise.all([o(),c(),s()]),{maxGasAmount:on,gasUnitPrice:sn,expireTimestamp:cn}={maxGasAmount:a?.maxGasAmount?BigInt(a.maxGasAmount):BigInt(2e5),gasUnitPrice:a?.gasUnitPrice??BigInt(m),expireTimestamp:a?.expireTimestamp??BigInt(Math.floor(Date.now()/1e3)+20)};return new K(u.from(e),BigInt(T),i,BigInt(on),BigInt(sn),BigInt(cn),new C(d))}async function Vn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=await yn({aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r});if("secondarySignerAddresses"in n){let c=n.secondarySignerAddresses?.map(s=>u.from(s))??[];return new L(o,c,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}return new z(o,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}function qn(n){let{signerPublicKey:t,transaction:e,secondarySignersPublicKeys:i,feePayerPublicKey:a}=n,r=l(t);if(e.feePayerAddress){let c=new X(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress),s=[];i&&(s=i.map(T=>l(T)));let d=l(a),m=new B(r,e.secondarySignerAddresses??[],s,{address:e.feePayerAddress,authenticator:d});return new A(c.raw_txn,m).bcsToBytes()}if(e.secondarySignerAddresses){let c=new H(e.rawTransaction,e.secondarySignerAddresses),s=[];s=i.map(m=>l(m));let d=new x(r,e.secondarySignerAddresses,s);return new A(c.raw_txn,d).bcsToBytes()}let o;if(r instanceof p)o=new b(r.public_key,r.signature);else if(r instanceof g)o=new E(r);else throw new Error("Invalid public key");return new A(e.rawTransaction,o).bcsToBytes()}function l(n){if(n instanceof N){if(n.publicKey instanceof w)return new g(n,new P(new I(new Uint8Array(64))));if(n.publicKey instanceof $)return new g(n,new P(new M(new Uint8Array(64))))}return new p(new w(n.toUint8Array()),new I(new Uint8Array(64)))}function fn(n){let{transaction:t,feePayerAuthenticator:e,additionalSignersAuthenticators:i}=n,a=Z(W,n.senderAuthenticator),r;if(t.feePayerAddress){if(!e)throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");r=new B(a,t.secondarySignerAddresses??[],i??[],{address:t.feePayerAddress,authenticator:e})}else if(t.secondarySignerAddresses){if(!i)throw new Error("Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction");r=new x(a,t.secondarySignerAddresses,i)}else a instanceof p?r=new b(a.public_key,a.signature):r=new E(a);return new A(t.rawTransaction,r).bcsToBytes()}function an(n){let t=un.create();for(let e of n)t.update(e);return t.digest()}var pn=an(["APTOS::Transaction"]);function vn(n){let t=fn(n);return new h(an([pn,new Uint8Array([0]),t])).toString()}async function rn({key:n,moduleAddress:t,moduleName:e,functionName:i,aptosConfig:a,abi:r,fetch:o}){return r!==void 0?r:J(async()=>o(t,e,i,a),`${n}-${a.network}-${t}-${e}-${i}`,1e3*60*5)()}export{kn as a,dn as b,On as c,mn as d,yn as e,Vn as f,qn as g,l as h,fn as i,an as j,vn as k};
2
+ //# sourceMappingURL=chunk-TGQARO3F.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/transactions/transactionBuilder/transactionBuilder.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file handles the transaction creation lifecycle.\n * It holds different operations to generate a transaction payload, a raw transaction,\n * and a signed transaction that can be simulated, signed and submitted to chain.\n */\nimport { sha3_256 as sha3Hash } from \"@noble/hashes/sha3\";\nimport { AptosConfig } from \"../../api/aptosConfig\";\nimport { AccountAddress, AccountAddressInput, Hex, PublicKey } from \"../../core\";\nimport { AnyPublicKey, AnySignature, Secp256k1PublicKey, Secp256k1Signature } from \"../../core/crypto\";\nimport { Ed25519PublicKey, Ed25519Signature } from \"../../core/crypto/ed25519\";\nimport { getInfo } from \"../../internal/account\";\nimport { getLedgerInfo } from \"../../internal/general\";\nimport { getGasPriceEstimation } from \"../../internal/transaction\";\nimport { NetworkToChainId } from \"../../utils/apiEndpoints\";\nimport { DEFAULT_MAX_GAS_AMOUNT, DEFAULT_TXN_EXP_SEC_FROM_NOW } from \"../../utils/const\";\nimport { normalizeBundle } from \"../../utils/normalizeBundle\";\nimport {\n AccountAuthenticator,\n AccountAuthenticatorEd25519,\n AccountAuthenticatorSingleKey,\n} from \"../authenticator/account\";\nimport {\n TransactionAuthenticator,\n TransactionAuthenticatorEd25519,\n TransactionAuthenticatorFeePayer,\n TransactionAuthenticatorMultiAgent,\n TransactionAuthenticatorSingleSender,\n} from \"../authenticator/transaction\";\nimport {\n ChainId,\n EntryFunction,\n FeePayerRawTransaction,\n MultiAgentRawTransaction,\n MultiSig,\n MultiSigTransactionPayload,\n RawTransaction,\n Script,\n TransactionPayloadEntryFunction,\n TransactionPayloadMultiSig,\n TransactionPayloadScript,\n} from \"../instances\";\nimport { SignedTransaction } from \"../instances/signedTransaction\";\nimport {\n AnyRawTransaction,\n AnyTransactionPayloadInstance,\n EntryFunctionArgumentTypes,\n InputGenerateMultiAgentRawTransactionArgs,\n InputGenerateRawTransactionArgs,\n InputGenerateSingleSignerRawTransactionArgs,\n InputGenerateTransactionOptions,\n InputScriptData,\n InputSimulateTransactionData,\n InputMultiSigDataWithRemoteABI,\n InputEntryFunctionDataWithRemoteABI,\n InputGenerateTransactionPayloadDataWithRemoteABI,\n InputSubmitTransactionData,\n InputGenerateTransactionPayloadDataWithABI,\n InputEntryFunctionDataWithABI,\n InputMultiSigDataWithABI,\n InputViewFunctionDataWithRemoteABI,\n InputViewFunctionDataWithABI,\n FunctionABI,\n} from \"../types\";\nimport { convertArgument, fetchEntryFunctionAbi, fetchViewFunctionAbi, standardizeTypeTags } from \"./remoteAbi\";\nimport { memoizeAsync } from \"../../utils/memoize\";\nimport { getFunctionParts, isScriptDataInput } from \"./helpers\";\nimport { SimpleTransaction } from \"../instances/simpleTransaction\";\nimport { MultiAgentTransaction } from \"../instances/multiAgentTransaction\";\n\n/**\n * We are defining function signatures, each with its specific input and output.\n * These are the possible function signature for our `generateTransactionPayload` function.\n * When we call our `generateTransactionPayload` function with the relevant type properties,\n * Typescript can infer the return type based on the appropriate function overload.\n */\nexport async function generateTransactionPayload(args: InputScriptData): Promise<TransactionPayloadScript>;\nexport async function generateTransactionPayload(\n args: InputEntryFunctionDataWithRemoteABI,\n): Promise<TransactionPayloadEntryFunction>;\nexport async function generateTransactionPayload(\n args: InputMultiSigDataWithRemoteABI,\n): Promise<TransactionPayloadMultiSig>;\n\n/**\n * Builds a transaction payload based on the data argument and returns\n * a transaction payload - TransactionPayloadScript | TransactionPayloadMultiSig | TransactionPayloadEntryFunction\n *\n * This uses the RemoteABI by default, and the remote ABI can be skipped by using generateTransactionPayloadWithABI\n *\n * @param args.data GenerateTransactionPayloadData\n *\n * @return TransactionPayload\n */\nexport async function generateTransactionPayload(\n args: InputGenerateTransactionPayloadDataWithRemoteABI,\n): Promise<AnyTransactionPayloadInstance> {\n if (isScriptDataInput(args)) {\n return generateTransactionPayloadScript(args);\n }\n const { moduleAddress, moduleName, functionName } = getFunctionParts(args.function);\n\n const functionAbi = await fetchAbi({\n key: \"entry-function\",\n moduleAddress,\n moduleName,\n functionName,\n aptosConfig: args.aptosConfig,\n abi: args.abi,\n fetch: fetchEntryFunctionAbi,\n });\n\n // Fill in the ABI\n return generateTransactionPayloadWithABI({ ...args, abi: functionAbi });\n}\n\nexport function generateTransactionPayloadWithABI(args: InputEntryFunctionDataWithABI): TransactionPayloadEntryFunction;\nexport function generateTransactionPayloadWithABI(args: InputMultiSigDataWithABI): TransactionPayloadMultiSig;\nexport function generateTransactionPayloadWithABI(\n args: InputGenerateTransactionPayloadDataWithABI,\n): AnyTransactionPayloadInstance {\n const functionAbi = args.abi;\n const { moduleAddress, moduleName, functionName } = getFunctionParts(args.function);\n\n // Ensure that all type arguments are typed properly\n const typeArguments = standardizeTypeTags(args.typeArguments);\n\n // Check the type argument count against the ABI\n if (typeArguments.length !== functionAbi.typeParameters.length) {\n throw new Error(\n `Type argument count mismatch, expected ${functionAbi.typeParameters.length}, received ${typeArguments.length}`,\n );\n }\n\n // Check all BCS types, and convert any non-BCS types\n const functionArguments: Array<EntryFunctionArgumentTypes> = args.functionArguments.map((arg, i) =>\n convertArgument(args.function, functionAbi, arg, i, typeArguments),\n );\n\n // Check that all arguments are accounted for\n if (functionArguments.length !== functionAbi.parameters.length) {\n throw new Error(\n // eslint-disable-next-line max-len\n `Too few arguments for '${moduleAddress}::${moduleName}::${functionName}', expected ${functionAbi.parameters.length} but got ${functionArguments.length}`,\n );\n }\n\n // Generate entry function payload\n const entryFunctionPayload = EntryFunction.build(\n `${moduleAddress}::${moduleName}`,\n functionName,\n typeArguments,\n functionArguments,\n );\n\n // Send it as multi sig if it's a multisig payload\n if (\"multisigAddress\" in args) {\n const multisigAddress = AccountAddress.from(args.multisigAddress);\n return new TransactionPayloadMultiSig(\n new MultiSig(multisigAddress, new MultiSigTransactionPayload(entryFunctionPayload)),\n );\n }\n\n // Otherwise send as an entry function\n return new TransactionPayloadEntryFunction(entryFunctionPayload);\n}\n\nexport async function generateViewFunctionPayload(args: InputViewFunctionDataWithRemoteABI): Promise<EntryFunction> {\n const { moduleAddress, moduleName, functionName } = getFunctionParts(args.function);\n\n const functionAbi = await fetchAbi({\n key: \"view-function\",\n moduleAddress,\n moduleName,\n functionName,\n aptosConfig: args.aptosConfig,\n abi: args.abi,\n fetch: fetchViewFunctionAbi,\n });\n\n // Fill in the ABI\n return generateViewFunctionPayloadWithABI({ abi: functionAbi, ...args });\n}\n\nexport function generateViewFunctionPayloadWithABI(args: InputViewFunctionDataWithABI): EntryFunction {\n const functionAbi = args.abi;\n const { moduleAddress, moduleName, functionName } = getFunctionParts(args.function);\n\n // Ensure that all type arguments are typed properly\n const typeArguments = standardizeTypeTags(args.typeArguments);\n\n // Check the type argument count against the ABI\n if (typeArguments.length !== functionAbi.typeParameters.length) {\n throw new Error(\n `Type argument count mismatch, expected ${functionAbi.typeParameters.length}, received ${typeArguments.length}`,\n );\n }\n\n // Check all BCS types, and convert any non-BCS types\n const functionArguments: Array<EntryFunctionArgumentTypes> =\n args?.functionArguments?.map((arg, i) => convertArgument(args.function, functionAbi, arg, i, typeArguments)) ?? [];\n\n // Check that all arguments are accounted for\n if (functionArguments.length !== functionAbi.parameters.length) {\n throw new Error(\n // eslint-disable-next-line max-len\n `Too few arguments for '${moduleAddress}::${moduleName}::${functionName}', expected ${functionAbi.parameters.length} but got ${functionArguments.length}`,\n );\n }\n\n // Generate entry function payload\n return EntryFunction.build(`${moduleAddress}::${moduleName}`, functionName, typeArguments, functionArguments);\n}\n\nfunction generateTransactionPayloadScript(args: InputScriptData) {\n return new TransactionPayloadScript(\n new Script(Hex.fromHexInput(args.bytecode).toUint8Array(), args.typeArguments ?? [], args.functionArguments),\n );\n}\n\n/**\n * Generates a raw transaction\n *\n * @param args.aptosConfig AptosConfig\n * @param args.sender The transaction's sender account address as a hex input\n * @param args.payload The transaction payload - can create by using generateTransactionPayload()\n *\n * @returns RawTransaction\n */\nexport async function generateRawTransaction(args: {\n aptosConfig: AptosConfig;\n sender: AccountAddressInput;\n payload: AnyTransactionPayloadInstance;\n options?: InputGenerateTransactionOptions;\n feePayerAddress?: AccountAddressInput;\n}): Promise<RawTransaction> {\n const { aptosConfig, sender, payload, options, feePayerAddress } = args;\n\n const getChainId = async () => {\n if (NetworkToChainId[aptosConfig.network]) {\n return { chainId: NetworkToChainId[aptosConfig.network] };\n }\n const info = await getLedgerInfo({ aptosConfig });\n return { chainId: info.chain_id };\n };\n\n const getGasUnitPrice = async () => {\n if (options?.gasUnitPrice) {\n return { gasEstimate: options.gasUnitPrice };\n }\n const estimation = await getGasPriceEstimation({ aptosConfig });\n return { gasEstimate: estimation.gas_estimate };\n };\n\n const getSequenceNumberForAny = async () => {\n const getSequenceNumber = async () => {\n if (options?.accountSequenceNumber !== undefined) {\n return options.accountSequenceNumber;\n }\n\n return (await getInfo({ aptosConfig, accountAddress: sender })).sequence_number;\n };\n\n /**\n * Check if is sponsored transaction to honor AIP-52\n * {@link https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-52.md}\n */\n if (feePayerAddress && AccountAddress.from(feePayerAddress).equals(AccountAddress.ZERO)) {\n // Handle sponsored transaction generation with the option that\n // the main signer has not been created on chain\n try {\n // Check if main signer has been created on chain, if not assign sequence number 0\n return await getSequenceNumber();\n } catch (e: any) {\n return 0;\n }\n } else {\n return getSequenceNumber();\n }\n };\n const [{ chainId }, { gasEstimate }, sequenceNumber] = await Promise.all([\n getChainId(),\n getGasUnitPrice(),\n getSequenceNumberForAny(),\n ]);\n\n const { maxGasAmount, gasUnitPrice, expireTimestamp } = {\n maxGasAmount: options?.maxGasAmount ? BigInt(options.maxGasAmount) : BigInt(DEFAULT_MAX_GAS_AMOUNT),\n gasUnitPrice: options?.gasUnitPrice ?? BigInt(gasEstimate),\n expireTimestamp: options?.expireTimestamp ?? BigInt(Math.floor(Date.now() / 1000) + DEFAULT_TXN_EXP_SEC_FROM_NOW),\n };\n\n return new RawTransaction(\n AccountAddress.from(sender),\n BigInt(sequenceNumber),\n payload,\n BigInt(maxGasAmount),\n BigInt(gasUnitPrice),\n BigInt(expireTimestamp),\n new ChainId(chainId),\n );\n}\n\n/**\n * We are defining function signatures, each with its specific input and output.\n * These are the possible function signature for our `generateTransaction` function.\n * When we call our `generateTransaction` function with the relevant type properties,\n * Typescript can infer the return type based on the appropriate function overload.\n */\nexport async function buildTransaction(args: InputGenerateSingleSignerRawTransactionArgs): Promise<SimpleTransaction>;\nexport async function buildTransaction(args: InputGenerateMultiAgentRawTransactionArgs): Promise<MultiAgentTransaction>;\n\n/**\n * Generates a transaction based on the provided arguments\n *\n * Note: we can start with one function to support all different payload/transaction types,\n * and if to complex to use, we could have function for each type\n *\n * @param args.aptosConfig AptosConfig\n * @param args.sender The transaction's sender account address as a hex input\n * @param args.payload The transaction payload - can create by using generateTransactionPayload()\n * @param args.options optional. Transaction options object\n * @param args.secondarySignerAddresses optional. For when want to create a multi signers transaction\n * @param args.feePayerAddress optional. For when want to create a fee payer (aka sponsored) transaction\n *\n * @return An instance of a RawTransaction, plus optional secondary/fee payer addresses\n * ```\n * {\n * rawTransaction: RawTransaction,\n * secondarySignerAddresses? : Array<AccountAddress>,\n * feePayerAddress?: AccountAddress\n * }\n * ```\n */\nexport async function buildTransaction(args: InputGenerateRawTransactionArgs): Promise<AnyRawTransaction> {\n const { aptosConfig, sender, payload, options, feePayerAddress } = args;\n // generate raw transaction\n const rawTxn = await generateRawTransaction({\n aptosConfig,\n sender,\n payload,\n options,\n feePayerAddress,\n });\n\n // if multi agent transaction\n if (\"secondarySignerAddresses\" in args) {\n const signers: Array<AccountAddress> =\n args.secondarySignerAddresses?.map((signer) => AccountAddress.from(signer)) ?? [];\n\n return new MultiAgentTransaction(\n rawTxn,\n signers,\n args.feePayerAddress ? AccountAddress.from(args.feePayerAddress) : undefined,\n );\n }\n // return the raw transaction\n return new SimpleTransaction(rawTxn, args.feePayerAddress ? AccountAddress.from(args.feePayerAddress) : undefined);\n}\n\n/**\n * Simulate a transaction before signing and submit to chain\n *\n * @param args.transaction A aptos transaction type to sign\n * @param args.signerPublicKey The signer public key\n * @param args.secondarySignersPublicKeys optional. The secondary signers public keys if multi signers transaction\n * @param args.feePayerPublicKey optional. The fee payer public key is a fee payer (aka sponsored) transaction\n * @param args.options optional. SimulateTransactionOptions\n *\n * @returns A signed serialized transaction that can be simulated\n */\nexport function generateSignedTransactionForSimulation(args: InputSimulateTransactionData): Uint8Array {\n const { signerPublicKey, transaction, secondarySignersPublicKeys, feePayerPublicKey } = args;\n\n const accountAuthenticator = getAuthenticatorForSimulation(signerPublicKey);\n\n // fee payer transaction\n if (transaction.feePayerAddress) {\n const transactionToSign = new FeePayerRawTransaction(\n transaction.rawTransaction,\n transaction.secondarySignerAddresses ?? [],\n transaction.feePayerAddress,\n );\n let secondaryAccountAuthenticators: Array<AccountAuthenticator> = [];\n if (secondarySignersPublicKeys) {\n secondaryAccountAuthenticators = secondarySignersPublicKeys.map((publicKey) =>\n getAuthenticatorForSimulation(publicKey),\n );\n }\n const feePayerAuthenticator = getAuthenticatorForSimulation(feePayerPublicKey!);\n\n const transactionAuthenticator = new TransactionAuthenticatorFeePayer(\n accountAuthenticator,\n transaction.secondarySignerAddresses ?? [],\n secondaryAccountAuthenticators,\n {\n address: transaction.feePayerAddress,\n authenticator: feePayerAuthenticator,\n },\n );\n return new SignedTransaction(transactionToSign.raw_txn, transactionAuthenticator).bcsToBytes();\n }\n\n // multi agent transaction\n if (transaction.secondarySignerAddresses) {\n const transactionToSign = new MultiAgentRawTransaction(\n transaction.rawTransaction,\n transaction.secondarySignerAddresses,\n );\n\n let secondaryAccountAuthenticators: Array<AccountAuthenticator> = [];\n\n secondaryAccountAuthenticators = secondarySignersPublicKeys!.map((publicKey) =>\n getAuthenticatorForSimulation(publicKey),\n );\n\n const transactionAuthenticator = new TransactionAuthenticatorMultiAgent(\n accountAuthenticator,\n transaction.secondarySignerAddresses,\n secondaryAccountAuthenticators,\n );\n\n return new SignedTransaction(transactionToSign.raw_txn, transactionAuthenticator).bcsToBytes();\n }\n\n // single signer raw transaction\n let transactionAuthenticator;\n if (accountAuthenticator instanceof AccountAuthenticatorEd25519) {\n transactionAuthenticator = new TransactionAuthenticatorEd25519(\n accountAuthenticator.public_key,\n accountAuthenticator.signature,\n );\n } else if (accountAuthenticator instanceof AccountAuthenticatorSingleKey) {\n transactionAuthenticator = new TransactionAuthenticatorSingleSender(accountAuthenticator);\n } else {\n throw new Error(\"Invalid public key\");\n }\n return new SignedTransaction(transaction.rawTransaction, transactionAuthenticator).bcsToBytes();\n}\n\nexport function getAuthenticatorForSimulation(publicKey: PublicKey) {\n // TODO add support for AnyMultiKey\n if (publicKey instanceof AnyPublicKey) {\n if (publicKey.publicKey instanceof Ed25519PublicKey) {\n return new AccountAuthenticatorSingleKey(publicKey, new AnySignature(new Ed25519Signature(new Uint8Array(64))));\n }\n if (publicKey.publicKey instanceof Secp256k1PublicKey) {\n return new AccountAuthenticatorSingleKey(publicKey, new AnySignature(new Secp256k1Signature(new Uint8Array(64))));\n }\n }\n\n // legacy code\n return new AccountAuthenticatorEd25519(\n new Ed25519PublicKey(publicKey.toUint8Array()),\n new Ed25519Signature(new Uint8Array(64)),\n );\n}\n\n/**\n * Prepare a transaction to be submitted to chain\n *\n * @param args.transaction A aptos transaction type\n * @param args.senderAuthenticator The account authenticator of the transaction sender\n * @param args.secondarySignerAuthenticators optional. For when the transaction is a multi signers transaction\n *\n * @returns A SignedTransaction\n */\nexport function generateSignedTransaction(args: InputSubmitTransactionData): Uint8Array {\n const { transaction, feePayerAuthenticator, additionalSignersAuthenticators } = args;\n const senderAuthenticator = normalizeBundle(AccountAuthenticator, args.senderAuthenticator);\n\n let txnAuthenticator: TransactionAuthenticator;\n if (transaction.feePayerAddress) {\n if (!feePayerAuthenticator) {\n throw new Error(\"Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction\");\n }\n txnAuthenticator = new TransactionAuthenticatorFeePayer(\n senderAuthenticator,\n transaction.secondarySignerAddresses ?? [],\n additionalSignersAuthenticators ?? [],\n {\n address: transaction.feePayerAddress,\n authenticator: feePayerAuthenticator,\n },\n );\n } else if (transaction.secondarySignerAddresses) {\n if (!additionalSignersAuthenticators) {\n throw new Error(\n \"Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction\",\n );\n }\n txnAuthenticator = new TransactionAuthenticatorMultiAgent(\n senderAuthenticator,\n transaction.secondarySignerAddresses,\n additionalSignersAuthenticators,\n );\n } else if (senderAuthenticator instanceof AccountAuthenticatorEd25519) {\n txnAuthenticator = new TransactionAuthenticatorEd25519(\n senderAuthenticator.public_key,\n senderAuthenticator.signature,\n );\n } else {\n txnAuthenticator = new TransactionAuthenticatorSingleSender(senderAuthenticator);\n }\n\n return new SignedTransaction(transaction.rawTransaction, txnAuthenticator).bcsToBytes();\n}\n\n/**\n * Hashes the set of values with a SHA-3 256 hash\n * @param input array of UTF-8 strings or Uint8array byte arrays\n */\nexport function hashValues(input: (Uint8Array | string)[]): Uint8Array {\n const hash = sha3Hash.create();\n for (const item of input) {\n hash.update(item);\n }\n return hash.digest();\n}\n\n/**\n * The domain separated prefix for hashing transacitons\n */\nconst TRANSACTION_PREFIX = hashValues([\"APTOS::Transaction\"]);\n\n/**\n * Generates a user transaction hash for the given transaction payload. It must already have an authenticator\n * @param args InputSubmitTransactionData\n */\nexport function generateUserTransactionHash(args: InputSubmitTransactionData): string {\n const signedTransaction = generateSignedTransaction(args);\n\n // Transaction signature is defined as, the domain separated prefix based on struct (Transaction)\n // Then followed by the type of the transaction for the enum, UserTransaction is 0\n // Then followed by BCS encoded bytes of the signed transaction\n return new Hex(hashValues([TRANSACTION_PREFIX, new Uint8Array([0]), signedTransaction])).toString();\n}\n\n/**\n * Fetches and caches ABIs with allowing for pass-through on provided ABIs\n * @param key\n * @param moduleAddress\n * @param moduleName\n * @param functionName\n * @param aptosConfig\n * @param abi\n * @param fetch\n */\nasync function fetchAbi<T extends FunctionABI>({\n key,\n moduleAddress,\n moduleName,\n functionName,\n aptosConfig,\n abi,\n fetch,\n}: {\n key: string;\n moduleAddress: string;\n moduleName: string;\n functionName: string;\n aptosConfig: AptosConfig;\n abi?: T;\n fetch: (moduleAddress: string, moduleName: string, functionName: string, aptosConfig: AptosConfig) => Promise<T>;\n}): Promise<T> {\n if (abi !== undefined) {\n return abi;\n }\n\n // We fetch the entry function ABI, and then pretend that we already had the ABI\n return memoizeAsync(\n async () => fetch(moduleAddress, moduleName, functionName, aptosConfig),\n `${key}-${aptosConfig.network}-${moduleAddress}-${moduleName}-${functionName}`,\n 1000 * 60 * 5, // 5 minutes\n )();\n}\n"],"mappings":"uhCAQA,OAAS,YAAYA,OAAgB,qBAwFrC,eAAsBC,GACpBC,EACwC,CACxC,GAAIC,GAAkBD,CAAI,EACxB,OAAOE,GAAiCF,CAAI,EAE9C,GAAM,CAAE,cAAAG,EAAe,WAAAC,EAAY,aAAAC,CAAa,EAAIC,EAAiBN,EAAK,QAAQ,EAE5EO,EAAc,MAAMC,GAAS,CACjC,IAAK,iBACL,cAAAL,EACA,WAAAC,EACA,aAAAC,EACA,YAAaL,EAAK,YAClB,IAAKA,EAAK,IACV,MAAOS,EACT,CAAC,EAGD,OAAOC,GAAkC,CAAE,GAAGV,EAAM,IAAKO,CAAY,CAAC,CACxE,CAIO,SAASG,GACdV,EAC+B,CAC/B,IAAMO,EAAcP,EAAK,IACnB,CAAE,cAAAG,EAAe,WAAAC,EAAY,aAAAC,CAAa,EAAIC,EAAiBN,EAAK,QAAQ,EAG5EW,EAAgBC,EAAoBZ,EAAK,aAAa,EAG5D,GAAIW,EAAc,SAAWJ,EAAY,eAAe,OACtD,MAAM,IAAI,MACR,0CAA0CA,EAAY,eAAe,MAAM,c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GAAoB,IAAI,WAAW,CAAC,CAAC,CAAC,EAAGE,CAAiB,CAAC,CAAC,EAAE,SAAS,CACpG,CAYA,eAAe3F,GAAgC,CAC7C,IAAA4F,EACA,cAAAjG,EACA,WAAAC,EACA,aAAAC,EACA,YAAA2B,EACA,IAAAqE,EACA,MAAAC,CACF,EAQe,CACb,OAAID,IAAQ,OACHA,EAIFE,EACL,SAAYD,EAAMnG,EAAeC,EAAYC,EAAc2B,CAAW,EACtE,GAAGoE,CAAG,IAAIpE,EAAY,OAAO,IAAI7B,CAAa,IAAIC,CAAU,IAAIC,CAAY,GAC5E,IAAO,GAAK,CACd,EAAE,CACJ","names":["sha3Hash","generateTransactionPayload","args","isScriptDataInput","generateTransactionPayloadScript","moduleAddress","moduleName","functionName","getFunctionParts","functionAbi","fetchAbi","fetchEntryFunctionAbi","generateTransactionPayloadWithABI","typeArguments","standardizeTypeTags","functionArguments","arg","i","convertArgument","entryFunctionPayload","EntryFunction","multisigAddress","AccountAddress","TransactionPayloadMultiSig","MultiSig","MultiSigTransactionPayload","TransactionPayloadEntryFunction","generateViewFunctionPayload","fetchViewFunctionAbi","generateViewFunctionPayloadWithABI","TransactionPayloadScript","Script","Hex","generateRawTransaction","aptosConfig","sender","payload","options","feePayerAddress","getChainId","NetworkToChainId","getLedgerInfo","getGasUnitPrice","getGasPriceEstimation","getSequenceNumberForAny","getSequenceNumber","getInfo","chainId","gasEstimate","sequenceNumber","maxGasAmount","gasUnitPrice","expireTimestamp","RawTransaction","ChainId","buildTransaction","rawTxn","signers","signer","MultiAgentTransaction","SimpleTransaction","generateSignedTransactionForSimulation","signerPublicKey","transaction","secondarySignersPublicKeys","feePayerPublicKey","accountAuthenticator","getAuthenticatorForSimulation","transactionToSign","FeePayerRawTransaction","secondaryAccountAuthenticators","publicKey","feePayerAuthenticator","transactionAuthenticator","TransactionAuthenticatorFeePayer","SignedTransaction","MultiAgentRawTransaction","TransactionAuthenticatorMultiAgent","AccountAuthenticatorEd25519","TransactionAuthenticatorEd25519","AccountAuthenticatorSingleKey","TransactionAuthenticatorSingleSender","AnyPublicKey","Ed25519PublicKey","AnySignature","Ed25519Signature","Secp256k1PublicKey","Secp256k1Signature","generateSignedTransaction","additionalSignersAuthenticators","senderAuthenticator","normalizeBundle","AccountAuthenticator","txnAuthenticator","hashValues","input","hash","sha3Hash","item","TRANSACTION_PREFIX","generateUserTransactionHash","signedTransaction","key","abi","fetch","memoizeAsync"]}
@@ -0,0 +1,2 @@
1
+ import{e as s}from"./chunk-JQIGQMNZ.mjs";import{w as i,x as m}from"./chunk-S3EDNXZE.mjs";import{b as n}from"./chunk-YMB2XW2O.mjs";async function b(t){let{aptosConfig:a,handle:e,data:o,options:r}=t;return(await n({aptosConfig:a,originMethod:"getTableItem",path:`tables/${e}/item`,params:{ledger_version:r?.ledgerVersion},body:o})).data}async function f(t){let{aptosConfig:a,options:e}=t,o={query:i,variables:{where_condition:e?.where,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await s({aptosConfig:a,query:o,originMethod:"getTableItemsData"})).table_items}async function T(t){let{aptosConfig:a,options:e}=t,o={query:m,variables:{where_condition:e?.where,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await s({aptosConfig:a,query:o,originMethod:"getTableItemsMetadata"})).table_metadatas}export{b as a,f as b,T as c};
2
+ //# sourceMappingURL=chunk-TM7NDDT3.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/internal/table.ts"],"sourcesContent":["import { AptosConfig } from \"../api/aptosConfig\";\nimport { postAptosFullNode } from \"../client\";\nimport {\n TableItemRequest,\n LedgerVersionArg,\n PaginationArgs,\n WhereArg,\n OrderByArg,\n GetTableItemsDataResponse,\n GetTableItemsMetadataResponse,\n} from \"../types\";\nimport { GetTableItemsDataQuery, GetTableItemsMetadataQuery } from \"../types/generated/operations\";\nimport { GetTableItemsData, GetTableItemsMetadata } from \"../types/generated/queries\";\nimport { TableItemsBoolExp, TableMetadatasBoolExp } from \"../types/generated/types\";\nimport { queryIndexer } from \"./general\";\n\nexport async function getTableItem<T>(args: {\n aptosConfig: AptosConfig;\n handle: string;\n data: TableItemRequest;\n options?: LedgerVersionArg;\n}): Promise<T> {\n const { aptosConfig, handle, data, options } = args;\n const response = await postAptosFullNode<TableItemRequest, any>({\n aptosConfig,\n originMethod: \"getTableItem\",\n path: `tables/${handle}/item`,\n params: { ledger_version: options?.ledgerVersion },\n body: data,\n });\n return response.data as T;\n}\n\nexport async function getTableItemsData(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs & WhereArg<TableItemsBoolExp> & OrderByArg<GetTableItemsDataResponse[0]>;\n}) {\n const { aptosConfig, options } = args;\n\n const graphqlQuery = {\n query: GetTableItemsData,\n variables: {\n where_condition: options?.where,\n offset: options?.offset,\n limit: options?.limit,\n order_by: options?.orderBy,\n },\n };\n\n const data = await queryIndexer<GetTableItemsDataQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getTableItemsData\",\n });\n\n return data.table_items;\n}\n\nexport async function getTableItemsMetadata(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs & WhereArg<TableMetadatasBoolExp> & OrderByArg<GetTableItemsMetadataResponse[0]>;\n}): Promise<GetTableItemsMetadataResponse> {\n const { aptosConfig, options } = args;\n\n const graphqlQuery = {\n query: GetTableItemsMetadata,\n variables: {\n where_condition: options?.where,\n offset: options?.offset,\n limit: options?.limit,\n order_by: options?.orderBy,\n },\n };\n\n const data = await queryIndexer<GetTableItemsMetadataQuery>({\n aptosConfig,\n query: graphqlQuery,\n originMethod: \"getTableItemsMetadata\",\n });\n\n return data.table_metadatas;\n}\n"],"mappings":"kIAgBA,eAAsBA,EAAgBC,EAKvB,CACb,GAAM,CAAE,YAAAC,EAAa,OAAAC,EAAQ,KAAAC,EAAM,QAAAC,CAAQ,EAAIJ,EAQ/C,OAPiB,MAAMK,EAAyC,CAC9D,YAAAJ,EACA,aAAc,eACd,KAAM,UAAUC,CAAM,QACtB,OAAQ,CAAE,eAAgBE,GAAS,aAAc,EACjD,KAAMD,CACR,CAAC,GACe,IAClB,CAEA,eAAsBG,EAAkBN,EAGrC,CACD,GAAM,CAAE,YAAAC,EAAa,QAAAG,CAAQ,EAAIJ,EAE3BO,EAAe,CACnB,MAAOC,EACP,UAAW,CACT,gBAAiBJ,GAAS,MAC1B,OAAQA,GAAS,OACjB,MAAOA,GAAS,MAChB,SAAUA,GAAS,OACrB,CACF,EAQA,OANa,MAAMK,EAAqC,CACtD,YAAAR,EACA,MAAOM,EACP,aAAc,mBAChB,CAAC,GAEW,WACd,CAEA,eAAsBG,EAAsBV,EAGD,CACzC,GAAM,CAAE,YAAAC,EAAa,QAAAG,CAAQ,EAAIJ,EAE3BO,EAAe,CACnB,MAAOI,EACP,UAAW,CACT,gBAAiBP,GAAS,MAC1B,OAAQA,GAAS,OACjB,MAAOA,GAAS,MAChB,SAAUA,GAAS,OACrB,CACF,EAQA,OANa,MAAMK,EAAyC,CAC1D,YAAAR,EACA,MAAOM,EACP,aAAc,uBAChB,CAAC,GAEW,eACd","names":["getTableItem","args","aptosConfig","handle","data","options","postAptosFullNode","getTableItemsData","graphqlQuery","GetTableItemsData","queryIndexer","getTableItemsMetadata","GetTableItemsMetadata"]}
@@ -1,2 +1,2 @@
1
- import{a as o,b as r,c as t,d as s}from"./chunk-WCVUDO5S.mjs";import{a as n}from"./chunk-BIAEC6FO.mjs";var i=class{constructor(e){this.config=e}async getModuleEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),o({aptosConfig:this.config,...e})}async getAccountEventsByCreationNumber(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),r({aptosConfig:this.config,...e})}async getAccountEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),t({aptosConfig:this.config,...e})}async getEvents(e){return await n({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"events_processor"}),s({aptosConfig:this.config,...e})}};export{i as a};
2
- //# sourceMappingURL=chunk-3YZGJLW7.mjs.map
1
+ import{a as o,b as r,c as t,d as s}from"./chunk-XFSDV3ND.mjs";import{a as n}from"./chunk-5YLAWRI2.mjs";var i=class{constructor(e){this.config=e}async getModuleEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),o({aptosConfig:this.config,...e})}async getAccountEventsByCreationNumber(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),r({aptosConfig:this.config,...e})}async getAccountEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),t({aptosConfig:this.config,...e})}async getEvents(e){return await n({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"events_processor"}),s({aptosConfig:this.config,...e})}};export{i as a};
2
+ //# sourceMappingURL=chunk-TT2XR5ZI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-DSTKXJMA.mjs";import{b as a}from"./chunk-IOSQVDZI.mjs";import{a as x}from"./chunk-52C73T26.mjs";var t=class extends x{static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return c.load(e);case 1:return u.load(e);case 2:return p.load(e);case 3:return z.load(e);case 4:return S.load(e);case 5:return U.load(e);case 6:return y.load(e);case 7:return b.load(e);case 8:return d.load(e);case 9:return g.load(e);case 10:return T.load(e);case 255:return h.load(e);default:throw new Error(`Unknown variant index for TypeTag: ${r}`)}}isBool(){return this instanceof c}isAddress(){return this instanceof S}isGeneric(){return this instanceof h}isSigner(){return this instanceof U}isVector(){return this instanceof y}isStruct(){return this instanceof b}isU8(){return this instanceof u}isU16(){return this instanceof d}isU32(){return this instanceof g}isU64(){return this instanceof p}isU128(){return this instanceof z}isU256(){return this instanceof T}},c=class i extends t{toString(){return"bool"}serialize(e){e.serializeU32AsUleb128(0)}static load(e){return new i}},u=class i extends t{toString(){return"u8"}serialize(e){e.serializeU32AsUleb128(1)}static load(e){return new i}},d=class i extends t{toString(){return"u16"}serialize(e){e.serializeU32AsUleb128(8)}static load(e){return new i}},g=class i extends t{toString(){return"u32"}serialize(e){e.serializeU32AsUleb128(9)}static load(e){return new i}},p=class i extends t{toString(){return"u64"}serialize(e){e.serializeU32AsUleb128(2)}static load(e){return new i}},z=class i extends t{toString(){return"u128"}serialize(e){e.serializeU32AsUleb128(3)}static load(e){return new i}},T=class i extends t{toString(){return"u256"}serialize(e){e.serializeU32AsUleb128(10)}static load(e){return new i}},S=class i extends t{toString(){return"address"}serialize(e){e.serializeU32AsUleb128(4)}static load(e){return new i}},U=class i extends t{toString(){return"signer"}serialize(e){e.serializeU32AsUleb128(5)}static load(e){return new i}},f=class i extends t{constructor(r){super();this.value=r}toString(){return`&${this.value.toString()}`}serialize(r){r.serializeU32AsUleb128(254)}static load(r){let s=t.deserialize(r);return new i(s)}},h=class i extends t{constructor(r){super();this.value=r;if(r<0)throw new Error("Generic type parameter index cannot be negative")}toString(){return`T${this.value}`}serialize(r){r.serializeU32AsUleb128(255),r.serializeU32(this.value)}static load(r){let s=r.deserializeU32();return new i(s)}},y=class i extends t{constructor(r){super();this.value=r}toString(){return`vector<${this.value.toString()}>`}static u8(){return new i(new u)}serialize(r){r.serializeU32AsUleb128(6),this.value.serialize(r)}static load(r){let s=t.deserialize(r);return new i(s)}},b=class i extends t{constructor(r){super();this.value=r}toString(){let r="";return this.value.typeArgs.length>0&&(r=`<${this.value.typeArgs.map(s=>s.toString()).join(", ")}>`),`${this.value.address.toString()}::${this.value.moduleName.identifier}::${this.value.name.identifier}${r}`}serialize(r){r.serializeU32AsUleb128(7),this.value.serialize(r)}static load(r){let s=o.deserialize(r);return new i(s)}isTypeTag(r,s,l){return this.value.moduleName.identifier===s&&this.value.name.identifier===l&&this.value.address.equals(r)}isString(){return this.isTypeTag(a.ONE,"string","String")}isOption(){return this.isTypeTag(a.ONE,"option","Option")}isObject(){return this.isTypeTag(a.ONE,"object","Object")}},o=class i extends x{constructor(r,s,l,v){super();this.address=r,this.moduleName=s,this.name=l,this.typeArgs=v}serialize(r){r.serialize(this.address),r.serialize(this.moduleName),r.serialize(this.name),r.serializeVector(this.typeArgs)}static deserialize(r){let s=a.deserialize(r),l=n.deserialize(r),v=n.deserialize(r),A=r.deserializeVector(t);return new i(s,l,v,A)}};function E(){return new o(a.ONE,new n("aptos_coin"),new n("AptosCoin"),[])}function V(){return new o(a.ONE,new n("string"),new n("String"),[])}function j(i){return new o(a.ONE,new n("option"),new n("Option"),[i])}function G(i){return new o(a.ONE,new n("object"),new n("Object"),[i])}export{t as a,c as b,u as c,d,g as e,p as f,z as g,T as h,S as i,U as j,f as k,h as l,y as m,b as n,o,E as p,V as q,j as r,G as s};
2
- //# sourceMappingURL=chunk-DMKUAQB7.mjs.map
1
+ import{a as n}from"./chunk-B7X6PSE7.mjs";import{b as a}from"./chunk-QRS4DGP3.mjs";import{a as v}from"./chunk-36QXVFR5.mjs";var t=class extends v{static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return c.load(e);case 1:return u.load(e);case 2:return p.load(e);case 3:return z.load(e);case 4:return S.load(e);case 5:return U.load(e);case 6:return y.load(e);case 7:return b.load(e);case 8:return d.load(e);case 9:return g.load(e);case 10:return T.load(e);case 255:return h.load(e);default:throw new Error(`Unknown variant index for TypeTag: ${r}`)}}isBool(){return this instanceof c}isAddress(){return this instanceof S}isGeneric(){return this instanceof h}isSigner(){return this instanceof U}isVector(){return this instanceof y}isStruct(){return this instanceof b}isU8(){return this instanceof u}isU16(){return this instanceof d}isU32(){return this instanceof g}isU64(){return this instanceof p}isU128(){return this instanceof z}isU256(){return this instanceof T}},c=class i extends t{toString(){return"bool"}serialize(e){e.serializeU32AsUleb128(0)}static load(e){return new i}},u=class i extends t{toString(){return"u8"}serialize(e){e.serializeU32AsUleb128(1)}static load(e){return new i}},d=class i extends t{toString(){return"u16"}serialize(e){e.serializeU32AsUleb128(8)}static load(e){return new i}},g=class i extends t{toString(){return"u32"}serialize(e){e.serializeU32AsUleb128(9)}static load(e){return new i}},p=class i extends t{toString(){return"u64"}serialize(e){e.serializeU32AsUleb128(2)}static load(e){return new i}},z=class i extends t{toString(){return"u128"}serialize(e){e.serializeU32AsUleb128(3)}static load(e){return new i}},T=class i extends t{toString(){return"u256"}serialize(e){e.serializeU32AsUleb128(10)}static load(e){return new i}},S=class i extends t{toString(){return"address"}serialize(e){e.serializeU32AsUleb128(4)}static load(e){return new i}},U=class i extends t{toString(){return"signer"}serialize(e){e.serializeU32AsUleb128(5)}static load(e){return new i}},x=class i extends t{constructor(r){super();this.value=r}toString(){return`&${this.value.toString()}`}serialize(r){r.serializeU32AsUleb128(254)}static load(r){let s=t.deserialize(r);return new i(s)}},h=class i extends t{constructor(r){super();this.value=r;if(r<0)throw new Error("Generic type parameter index cannot be negative")}toString(){return`T${this.value}`}serialize(r){r.serializeU32AsUleb128(255),r.serializeU32(this.value)}static load(r){let s=r.deserializeU32();return new i(s)}},y=class i extends t{constructor(r){super();this.value=r}toString(){return`vector<${this.value.toString()}>`}static u8(){return new i(new u)}serialize(r){r.serializeU32AsUleb128(6),this.value.serialize(r)}static load(r){let s=t.deserialize(r);return new i(s)}},b=class i extends t{constructor(r){super();this.value=r}toString(){let r="";return this.value.typeArgs.length>0&&(r=`<${this.value.typeArgs.map(s=>s.toString()).join(", ")}>`),`${this.value.address.toString()}::${this.value.moduleName.identifier}::${this.value.name.identifier}${r}`}serialize(r){r.serializeU32AsUleb128(7),this.value.serialize(r)}static load(r){let s=o.deserialize(r);return new i(s)}isTypeTag(r,s,l){return this.value.moduleName.identifier===s&&this.value.name.identifier===l&&this.value.address.equals(r)}isString(){return this.isTypeTag(a.ONE,"string","String")}isOption(){return this.isTypeTag(a.ONE,"option","Option")}isObject(){return this.isTypeTag(a.ONE,"object","Object")}},o=class i extends v{constructor(e,r,s,l){super(),this.address=e,this.moduleName=r,this.name=s,this.typeArgs=l}serialize(e){e.serialize(this.address),e.serialize(this.moduleName),e.serialize(this.name),e.serializeVector(this.typeArgs)}static deserialize(e){let r=a.deserialize(e),s=n.deserialize(e),l=n.deserialize(e),f=e.deserializeVector(t);return new i(r,s,l,f)}};function O(){return new o(a.ONE,new n("aptos_coin"),new n("AptosCoin"),[])}function E(){return new o(a.ONE,new n("string"),new n("String"),[])}function V(i){return new o(a.ONE,new n("option"),new n("Option"),[i])}function j(i){return new o(a.ONE,new n("object"),new n("Object"),[i])}export{t as a,c as b,u as c,d,g as e,p as f,z as g,T as h,S as i,U as j,x as k,h as l,y as m,b as n,o,O as p,E as q,V as r,j as s};
2
+ //# sourceMappingURL=chunk-U3YYSIIT.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as r}from"./chunk-36QXVFR5.mjs";import{b as t}from"./chunk-BCUSI3N6.mjs";var o=class extends r{toString(){let i=this.toUint8Array();return t.fromHexInput(i).toString()}};export{o as a};
2
+ //# sourceMappingURL=chunk-UGPALAPN.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-UNU3RVRJ.mjs";import{h as t}from"./chunk-L5IL2IAB.mjs";var r=class{constructor(o){this.config=o}async fundAccount(o){let n=await i({aptosConfig:this.config,...o});return o.options?.waitForIndexer!==!1&&await t({aptosConfig:this.config,minimumLedgerVersion:BigInt(n.version)}),n}};export{r as a};
2
- //# sourceMappingURL=chunk-5HY3DEPF.mjs.map
1
+ import{a as i}from"./chunk-ZBXOX3S7.mjs";import{h as t}from"./chunk-5VIESFOC.mjs";var r=class{constructor(o){this.config=o}async fundAccount(o){let n=await i({aptosConfig:this.config,...o});return o.options?.waitForIndexer!==!1&&await t({aptosConfig:this.config,minimumLedgerVersion:BigInt(n.version)}),n}};export{r as a};
2
+ //# sourceMappingURL=chunk-UKSRF2Q3.mjs.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-UO3NZ5AH.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +1,2 @@
1
- import{b as f}from"./chunk-IOSQVDZI.mjs";import{a as m,b as a,c as g}from"./chunk-FS3NSGBF.mjs";import{a as i,b as o,c as u,d as s,e as c,f as p,g as y}from"./chunk-QIAHBEEW.mjs";import{a as r}from"./chunk-TBMAJ6AW.mjs";function M(n){return typeof n=="boolean"}function D(n){return typeof n=="string"}function N(n){return typeof n=="number"}function P(n){return typeof n=="number"||typeof n=="bigint"||typeof n=="string"}function w(n){return n==null}function G(n){return A(n)||x(n)||S(n)||B(n)||U(n)||I(n)||b(n)||T(n)||E(n)||d(n)||n instanceof m||n instanceof g}function A(n){return n instanceof i}function T(n){return n instanceof f}function E(n){return n instanceof a}function d(n){return n instanceof r}function x(n){return n instanceof o}function S(n){return n instanceof u}function B(n){return n instanceof s}function U(n){return n instanceof c}function I(n){return n instanceof p}function b(n){return n instanceof y}function $(n){return"bytecode"in n}function R(n,t){throw new Error(`Type mismatch for argument ${t}, expected '${n}'`)}function W(n){let t=n.params.findIndex(e=>e!=="signer"&&e!=="&signer");return t<0?n.params.length:t}function L(n){let t=n.split("::");if(t.length!==3)throw new Error(`Invalid function ${n}`);let e=t[0],F=t[1],l=t[2];return{moduleAddress:e,moduleName:F,functionName:l}}export{M as a,D as b,N as c,P as d,w as e,G as f,A as g,T as h,E as i,d as j,x as k,S as l,B as m,U as n,I as o,b as p,$ as q,R as r,W as s,L as t};
2
- //# sourceMappingURL=chunk-FXNFWLQC.mjs.map
1
+ import{b as f}from"./chunk-QRS4DGP3.mjs";import{a as m,b as a,c as g}from"./chunk-G56GPLTB.mjs";import{a as i,b as o,c as u,d as s,e as c,f as p,g as y}from"./chunk-SRDIYE3M.mjs";import{a as r}from"./chunk-CEHCDA3G.mjs";function M(n){return typeof n=="boolean"}function D(n){return typeof n=="string"}function N(n){return typeof n=="number"}function P(n){return typeof n=="number"||typeof n=="bigint"||typeof n=="string"}function w(n){return n==null}function G(n){return A(n)||x(n)||S(n)||B(n)||U(n)||I(n)||b(n)||T(n)||E(n)||d(n)||n instanceof m||n instanceof g}function A(n){return n instanceof i}function T(n){return n instanceof f}function E(n){return n instanceof a}function d(n){return n instanceof r}function x(n){return n instanceof o}function S(n){return n instanceof u}function B(n){return n instanceof s}function U(n){return n instanceof c}function I(n){return n instanceof p}function b(n){return n instanceof y}function $(n){return"bytecode"in n}function R(n,t){throw new Error(`Type mismatch for argument ${t}, expected '${n}'`)}function W(n){let t=n.params.findIndex(e=>e!=="signer"&&e!=="&signer");return t<0?n.params.length:t}function L(n){let t=n.split("::");if(t.length!==3)throw new Error(`Invalid function ${n}`);let e=t[0],F=t[1],l=t[2];return{moduleAddress:e,moduleName:F,functionName:l}}export{M as a,D as b,N as c,P as d,w as e,G as f,A as g,T as h,E as i,d as j,x as k,S as l,B as m,U as n,I as o,b as p,$ as q,R as r,W as s,L as t};
2
+ //# sourceMappingURL=chunk-UPSCPEEE.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as h}from"./chunk-GKJ2NJG5.mjs";import{a}from"./chunk-PLXGSUZA.mjs";import{a as c}from"./chunk-TT2XR5ZI.mjs";import{a as f}from"./chunk-UKSRF2Q3.mjs";import{a as g}from"./chunk-GIAABV7R.mjs";import{a as l}from"./chunk-J6OFSYUA.mjs";import{a as u}from"./chunk-QIHR7HD6.mjs";import{a as m}from"./chunk-JB5H65CE.mjs";import{a as s}from"./chunk-ACG4ZGRQ.mjs";import{a as p}from"./chunk-QQ5PHEJF.mjs";import{a as A}from"./chunk-RTSWVT2Q.mjs";import{a as r}from"./chunk-XBHFMNYB.mjs";var t=class{constructor(i){this.config=new A(i),this.account=new s(this.config),this.ans=new p(this.config),this.coin=new r(this.config),this.digitalAsset=new a(this.config),this.event=new c(this.config),this.faucet=new f(this.config),this.fungibleAsset=new g(this.config),this.general=new l(this.config),this.staking=new u(this.config),this.transaction=new h(this.config),this.table=new m(this.config)}};function n(y,i,d){Object.getOwnPropertyNames(i.prototype).forEach(e=>{let o=Object.getOwnPropertyDescriptor(i.prototype,e);o&&(o.value=function(...b){return this[d][e](...b)},Object.defineProperty(y.prototype,e,o))})}n(t,s,"account");n(t,p,"ans");n(t,r,"coin");n(t,a,"digitalAsset");n(t,c,"event");n(t,f,"faucet");n(t,g,"fungibleAsset");n(t,l,"general");n(t,u,"staking");n(t,h,"transaction");n(t,m,"table");export{t as a};
2
+ //# sourceMappingURL=chunk-WXWWYH73.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/api/aptos.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account } from \"./account\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { Coin } from \"./coin\";\nimport { DigitalAsset } from \"./digitalAsset\";\nimport { Event } from \"./event\";\nimport { Faucet } from \"./faucet\";\nimport { FungibleAsset } from \"./fungibleAsset\";\nimport { General } from \"./general\";\nimport { ANS } from \"./ans\";\nimport { Staking } from \"./staking\";\nimport { Transaction } from \"./transaction\";\nimport { Table } from \"./table\";\n\n/**\n * This class is the main entry point into Aptos's\n * APIs and separates functionality into different namespaces.\n *\n * To use the SDK, create a new Aptos instance to get access\n * to all the sdk functionality.\n *\n * @example\n *\n * const aptos = new Aptos();\n */\nexport class Aptos {\n readonly config: AptosConfig;\n\n readonly account: Account;\n\n readonly ans: ANS;\n\n readonly coin: Coin;\n\n readonly digitalAsset: DigitalAsset;\n\n readonly event: Event;\n\n readonly faucet: Faucet;\n\n readonly fungibleAsset: FungibleAsset;\n\n readonly general: General;\n\n readonly staking: Staking;\n\n readonly transaction: Transaction;\n\n readonly table: Table;\n\n constructor(settings?: AptosConfig) {\n this.config = new AptosConfig(settings);\n this.account = new Account(this.config);\n this.ans = new ANS(this.config);\n this.coin = new Coin(this.config);\n this.digitalAsset = new DigitalAsset(this.config);\n this.event = new Event(this.config);\n this.faucet = new Faucet(this.config);\n this.fungibleAsset = new FungibleAsset(this.config);\n this.general = new General(this.config);\n this.staking = new Staking(this.config);\n this.transaction = new Transaction(this.config);\n this.table = new Table(this.config);\n }\n}\n\n// extends Aptos interface so all the methods and properties\n// from the other classes will be recognized by typescript.\nexport interface Aptos\n extends Account,\n ANS,\n Coin,\n DigitalAsset,\n Event,\n Faucet,\n FungibleAsset,\n General,\n Staking,\n Table,\n Omit<Transaction, \"build\" | \"simulate\" | \"submit\" | \"batch\"> {}\n\n/**\nIn TypeScript, we can’t inherit or extend from more than one class,\nMixins helps us to get around that by creating a partial classes\nthat we can combine to form a single class that contains all the methods and properties from the partial classes.\n{@link https://www.typescriptlang.org/docs/handbook/mixins.html#alternative-pattern}\n\nHere, we combine any subclass and the Aptos class.\n*/\nfunction applyMixin(targetClass: any, baseClass: any, baseClassProp: string) {\n // Mixin instance methods\n Object.getOwnPropertyNames(baseClass.prototype).forEach((propertyName) => {\n const propertyDescriptor = Object.getOwnPropertyDescriptor(baseClass.prototype, propertyName);\n if (!propertyDescriptor) return;\n // eslint-disable-next-line func-names\n propertyDescriptor.value = function (...args: any) {\n return (this as any)[baseClassProp][propertyName](...args);\n };\n Object.defineProperty(targetClass.prototype, propertyName, propertyDescriptor);\n });\n}\n\napplyMixin(Aptos, Account, \"account\");\napplyMixin(Aptos, ANS, \"ans\");\napplyMixin(Aptos, Coin, \"coin\");\napplyMixin(Aptos, DigitalAsset, \"digitalAsset\");\napplyMixin(Aptos, Event, \"event\");\napplyMixin(Aptos, Faucet, \"faucet\");\napplyMixin(Aptos, FungibleAsset, \"fungibleAsset\");\napplyMixin(Aptos, General, \"general\");\napplyMixin(Aptos, Staking, \"staking\");\napplyMixin(Aptos, Transaction, \"transaction\");\napplyMixin(Aptos, Table, \"table\");\n"],"mappings":"ueA2BO,IAAMA,EAAN,KAAY,CAyBjB,YAAYC,EAAwB,CAClC,KAAK,OAAS,IAAIC,EAAYD,CAAQ,EACtC,KAAK,QAAU,IAAIE,EAAQ,KAAK,MAAM,EACtC,KAAK,IAAM,IAAIC,EAAI,KAAK,MAAM,EAC9B,KAAK,KAAO,IAAIC,EAAK,KAAK,MAAM,EAChC,KAAK,aAAe,IAAIC,EAAa,KAAK,MAAM,EAChD,KAAK,MAAQ,IAAIC,EAAM,KAAK,MAAM,EAClC,KAAK,OAAS,IAAIC,EAAO,KAAK,MAAM,EACpC,KAAK,cAAgB,IAAIC,EAAc,KAAK,MAAM,EAClD,KAAK,QAAU,IAAIC,EAAQ,KAAK,MAAM,EACtC,KAAK,QAAU,IAAIC,EAAQ,KAAK,MAAM,EACtC,KAAK,YAAc,IAAIC,EAAY,KAAK,MAAM,EAC9C,KAAK,MAAQ,IAAIC,EAAM,KAAK,MAAM,CACpC,CACF,EAyBA,SAASC,EAAWC,EAAkBC,EAAgBC,EAAuB,CAE3E,OAAO,oBAAoBD,EAAU,SAAS,EAAE,QAASE,GAAiB,CACxE,IAAMC,EAAqB,OAAO,yBAAyBH,EAAU,UAAWE,CAAY,EACvFC,IAELA,EAAmB,MAAQ,YAAaC,EAAW,CACjD,OAAQ,KAAaH,CAAa,EAAEC,CAAY,EAAE,GAAGE,CAAI,CAC3D,EACA,OAAO,eAAeL,EAAY,UAAWG,EAAcC,CAAkB,EAC/E,CAAC,CACH,CAEAL,EAAWd,EAAOG,EAAS,SAAS,EACpCW,EAAWd,EAAOI,EAAK,KAAK,EAC5BU,EAAWd,EAAOK,EAAM,MAAM,EAC9BS,EAAWd,EAAOM,EAAc,cAAc,EAC9CQ,EAAWd,EAAOO,EAAO,OAAO,EAChCO,EAAWd,EAAOQ,EAAQ,QAAQ,EAClCM,EAAWd,EAAOS,EAAe,eAAe,EAChDK,EAAWd,EAAOU,EAAS,SAAS,EACpCI,EAAWd,EAAOW,EAAS,SAAS,EACpCG,EAAWd,EAAOY,EAAa,aAAa,EAC5CE,EAAWd,EAAOa,EAAO,OAAO","names":["Aptos","settings","AptosConfig","Account","ANS","Coin","DigitalAsset","Event","Faucet","FungibleAsset","General","Staking","Transaction","Table","applyMixin","targetClass","baseClass","baseClassProp","propertyName","propertyDescriptor","args"]}
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-N77VJHW5.mjs";var t=class{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}};export{t as a};
2
- //# sourceMappingURL=chunk-6OV2PQS5.mjs.map
1
+ import{a as o}from"./chunk-6JLYD5Q2.mjs";var t=class{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}};export{t as a};
2
+ //# sourceMappingURL=chunk-XBHFMNYB.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-UF534PKA.mjs";import{a as g}from"./chunk-2G4ZSGL4.mjs";import{b as w}from"./chunk-IOSQVDZI.mjs";import{f as A}from"./chunk-IR46T46A.mjs";import{t as f}from"./chunk-S4SEFF4K.mjs";var T=["A name must be between 3 and 63 characters long,","and can only contain lowercase a-z, 0-9, and hyphens.","A name may not start or end with a hyphen."].join(" ");function E(e){return!(!e||e.length<3||e.length>63||!/^[a-z\d][a-z\d-]{1,61}[a-z\d]$/.test(e))}function c(e){let[n,t,...o]=e.replace(/\.apt$/,"").split(".");if(o.length>0)throw new Error(`${e} is invalid. A name can only have two parts, a domain and a subdomain separated by a "."`);if(!E(n))throw new Error(`${n} is not valid. ${T}`);if(t&&!E(t))throw new Error(`${t} is not valid. ${T}`);return{domainName:t||n,subdomainName:t?n:void 0}}var V="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",G="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",P={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:G,custom:null,devnet:null};function d(e){let n=P[e.network];if(!n)throw new Error(`The ANS contract is not deployed to ${e.network}`);return n}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function j(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function Y(e){let{aptosConfig:n,expiration:t,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(n),{domainName:N,subdomainName:l}=c(o),S=t.policy==="subdomain:independent"||t.policy==="subdomain:follow-domain";if(l&&!S)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(S&&!l)throw new Error(`Policy is set to ${t.policy} but no subdomain was provided`);if(t.policy==="domain"){let h=t.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let D=h*31536e3;return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[N,D,s,i]},options:a})}if(!l)throw new Error(`${t.policy} requires a subdomain to be provided.`);let _=await I({aptosConfig:n,name:N});if(!_)throw new Error("The domain does not exist");let x=t.policy==="subdomain:independent"?t.expirationDate:_;if(x>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[N,l,Math.round(x/1e3),t.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function I(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t);try{let i=await g({aptosConfig:n,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function K(e){let{aptosConfig:n,address:t}=e,o=d(n),r=await g({aptosConfig:n,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(t).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function W(e){let{aptosConfig:n,sender:t,name:o,options:r}=e,s=d(n);if(!o)return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function F(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function H(e){let{aptosConfig:n,sender:t,name:o,address:r,options:s}=e,i=d(n),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function J(e){let{aptosConfig:n,name:t}=e,{domainName:o,subdomainName:r=""}=c(t),a=(await A({aptosConfig:n,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r},is_active:{_eq:!0}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=y(a)),a}async function X(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountNames",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(y)}async function Z(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountDomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(y)}async function ee(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(y)}async function ne(e){let{aptosConfig:n,options:t,domain:o}=e;return(await A({aptosConfig:n,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""},is_active:{_eq:!0}}}}})).current_aptos_names.map(y)}async function C(e){let{aptosConfig:n}=e,t=d(n),[o]=await g({aptosConfig:n,payload:{function:`${t}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function te(e){let{aptosConfig:n,sender:t,name:o,years:r=1,options:s}=e,i=d(n),a=r*31536e3,{domainName:u,subdomainName:p}=c(o);if(p)throw new Error("Subdomains cannot be renewed");if(r!==1)throw new Error("Currently, only 1 year renewals are supported");return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function y(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,E as b,c,V as d,G as e,j as f,Y as g,I as h,K as i,W as j,F as k,H as l,J as m,X as n,Z as o,ee as p,ne as q,te as r};
2
- //# sourceMappingURL=chunk-RW2A63WK.mjs.map
1
+ import{a as g}from"./chunk-IZQV2SU6.mjs";import{a as m}from"./chunk-K7HX7JQH.mjs";import{e as A}from"./chunk-JQIGQMNZ.mjs";import{t as f}from"./chunk-S3EDNXZE.mjs";import{b as w}from"./chunk-QRS4DGP3.mjs";var T=["A name must be between 3 and 63 characters long,","and can only contain lowercase a-z, 0-9, and hyphens.","A name may not start or end with a hyphen."].join(" ");function E(e){return!(!e||e.length<3||e.length>63||!/^[a-z\d][a-z\d-]{1,61}[a-z\d]$/.test(e))}function c(e){let[n,t,...o]=e.replace(/\.apt$/,"").split(".");if(o.length>0)throw new Error(`${e} is invalid. A name can only have two parts, a domain and a subdomain separated by a "."`);if(!E(n))throw new Error(`${n} is not valid. ${T}`);if(t&&!E(t))throw new Error(`${t} is not valid. ${T}`);return{domainName:t||n,subdomainName:t?n:void 0}}var z="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",G="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",P={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:G,custom:null,devnet:null};function d(e){let n=P[e.network];if(!n)throw new Error(`The ANS contract is not deployed to ${e.network}`);return n}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function V(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function j(e){let{aptosConfig:n,expiration:t,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(n),{domainName:N,subdomainName:l}=c(o),S=t.policy==="subdomain:independent"||t.policy==="subdomain:follow-domain";if(l&&!S)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(S&&!l)throw new Error(`Policy is set to ${t.policy} but no subdomain was provided`);if(t.policy==="domain"){let h=t.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let D=h*31536e3;return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[N,D,s,i]},options:a})}if(!l)throw new Error(`${t.policy} requires a subdomain to be provided.`);let _=await I({aptosConfig:n,name:N});if(!_)throw new Error("The domain does not exist");let x=t.policy==="subdomain:independent"?t.expirationDate:_;if(x>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[N,l,Math.round(x/1e3),t.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function I(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t);try{let i=await g({aptosConfig:n,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function Y(e){let{aptosConfig:n,address:t}=e,o=d(n),r=await g({aptosConfig:n,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(t).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function K(e){let{aptosConfig:n,sender:t,name:o,options:r}=e,s=d(n);if(!o)return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function W(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function F(e){let{aptosConfig:n,sender:t,name:o,address:r,options:s}=e,i=d(n),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function H(e){let{aptosConfig:n,name:t}=e,{domainName:o,subdomainName:r=""}=c(t),a=(await A({aptosConfig:n,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r},is_active:{_eq:!0}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=y(a)),a}async function J(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountNames",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(y)}async function X(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountDomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(y)}async function Z(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(y)}async function ee(e){let{aptosConfig:n,options:t,domain:o}=e;return(await A({aptosConfig:n,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""},is_active:{_eq:!0}}}}})).current_aptos_names.map(y)}async function C(e){let{aptosConfig:n}=e,t=d(n),[o]=await g({aptosConfig:n,payload:{function:`${t}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function ne(e){let{aptosConfig:n,sender:t,name:o,years:r=1,options:s}=e,i=d(n),a=r*31536e3,{domainName:u,subdomainName:p}=c(o);if(p)throw new Error("Subdomains cannot be renewed");if(r!==1)throw new Error("Currently, only 1 year renewals are supported");return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function y(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,E as b,c,z as d,G as e,V as f,j as g,I as h,Y as i,K as j,W as k,F as l,H as m,J as n,X as o,Z as p,ee as q,ne as r};
2
+ //# sourceMappingURL=chunk-XD46HTI2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/internal/ans.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/name}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * name namespace and without having a dependency cycle error.\n */\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { Account } from \"../account\";\nimport { AccountAddress, AccountAddressInput } from \"../core\";\nimport { InputGenerateTransactionOptions } from \"../transactions/types\";\nimport { GetANSNameResponse, MoveAddressType, OrderByArg, PaginationArgs, WhereArg } from \"../types\";\nimport { GetNamesQuery } from \"../types/generated/operations\";\nimport { GetNames } from \"../types/generated/queries\";\nimport { CurrentAptosNamesBoolExp } from \"../types/generated/types\";\nimport { Network } from \"../utils/apiEndpoints\";\nimport { queryIndexer } from \"./general\";\nimport { view } from \"./view\";\nimport { generateTransaction } from \"./transactionSubmission\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\n\nexport const VALIDATION_RULES_DESCRIPTION = [\n \"A name must be between 3 and 63 characters long,\",\n \"and can only contain lowercase a-z, 0-9, and hyphens.\",\n \"A name may not start or end with a hyphen.\",\n].join(\" \");\n\n/**\n *\n * @param fragment A fragment of a name, either the domain or subdomain\n * @returns boolean indicating if the fragment is a valid fragment\n */\nexport function isValidANSSegment(fragment: string): boolean {\n if (!fragment) return false;\n if (fragment.length < 3) return false;\n if (fragment.length > 63) return false;\n // only lowercase a-z and 0-9 are allowed, along with -. a domain may not start or end with a hyphen\n if (!/^[a-z\\d][a-z\\d-]{1,61}[a-z\\d]$/.test(fragment)) return false;\n return true;\n}\n\n/**\n * Checks if an ANS name is valid or not\n *\n * @param name A string of the domain name, can include or exclude the .apt suffix\n */\nexport function isValidANSName(name: string): { domainName: string; subdomainName?: string } {\n const [first, second, ...rest] = name.replace(/\\.apt$/, \"\").split(\".\");\n\n if (rest.length > 0) {\n throw new Error(`${name} is invalid. A name can only have two parts, a domain and a subdomain separated by a \".\"`);\n }\n\n if (!isValidANSSegment(first)) {\n throw new Error(`${first} is not valid. ${VALIDATION_RULES_DESCRIPTION}`);\n }\n\n if (second && !isValidANSSegment(second)) {\n throw new Error(`${second} is not valid. ${VALIDATION_RULES_DESCRIPTION}`);\n }\n\n return {\n domainName: second || first,\n subdomainName: second ? first : undefined,\n };\n}\n\nexport const LOCAL_ANS_ACCOUNT_PK =\n process.env.ANS_TEST_ACCOUNT_PRIVATE_KEY ?? \"0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221\";\nexport const LOCAL_ANS_ACCOUNT_ADDRESS =\n process.env.ANS_TEST_ACCOUNT_ADDRESS ?? \"0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82\";\n\nconst NetworkToAnsContract: Record<Network, string | null> = {\n [Network.TESTNET]: \"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c\",\n [Network.MAINNET]: \"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c\",\n [Network.LOCAL]: LOCAL_ANS_ACCOUNT_ADDRESS,\n [Network.CUSTOM]: null,\n [Network.DEVNET]: null,\n};\n\nfunction getRouterAddress(aptosConfig: AptosConfig): string {\n const address = NetworkToAnsContract[aptosConfig.network];\n if (!address) throw new Error(`The ANS contract is not deployed to ${aptosConfig.network}`);\n return address;\n}\n\nconst unwrapOption = <T>(option: any): T | undefined => {\n if (!!option && typeof option === \"object\" && \"vec\" in option && Array.isArray(option.vec)) {\n return option.vec[0];\n }\n\n return undefined;\n};\n\nexport async function getOwnerAddress(args: {\n aptosConfig: AptosConfig;\n name: string;\n}): Promise<AccountAddress | undefined> {\n const { aptosConfig, name } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n const { domainName, subdomainName } = isValidANSName(name);\n\n const res = await view({\n aptosConfig,\n payload: {\n function: `${routerAddress}::router::get_owner_addr`,\n functionArguments: [domainName, subdomainName],\n },\n });\n\n const owner = unwrapOption<MoveAddressType>(res[0]);\n\n return owner ? AccountAddress.from(owner) : undefined;\n}\n\nexport interface RegisterNameParameters {\n aptosConfig: AptosConfig;\n sender: Account;\n name: string;\n expiration:\n | { policy: \"domain\"; years?: 1 }\n | { policy: \"subdomain:follow-domain\" }\n | { policy: \"subdomain:independent\"; expirationDate: number };\n transferable?: boolean;\n toAddress?: AccountAddressInput;\n targetAddress?: AccountAddressInput;\n options?: InputGenerateTransactionOptions;\n}\n\nexport async function registerName(args: RegisterNameParameters): Promise<SimpleTransaction> {\n const { aptosConfig, expiration, name, sender, targetAddress, toAddress, options, transferable } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n const { domainName, subdomainName } = isValidANSName(name);\n\n const hasSubdomainPolicy =\n expiration.policy === \"subdomain:independent\" || expiration.policy === \"subdomain:follow-domain\";\n\n if (subdomainName && !hasSubdomainPolicy) {\n throw new Error(\n \"Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'\",\n );\n }\n\n if (hasSubdomainPolicy && !subdomainName) {\n throw new Error(`Policy is set to ${expiration.policy} but no subdomain was provided`);\n }\n\n if (expiration.policy === \"domain\") {\n const years = expiration.years ?? 1;\n if (years !== 1) {\n throw new Error(\"For now, names can only be registered for 1 year at a time\");\n }\n\n const secondsInYear = 31536000;\n const registrationDuration = years * secondsInYear;\n\n const transaction = await generateTransaction({\n aptosConfig,\n sender: sender.accountAddress.toString(),\n data: {\n function: `${routerAddress}::router::register_domain`,\n functionArguments: [domainName, registrationDuration, targetAddress, toAddress],\n },\n options,\n });\n\n return transaction;\n }\n\n // We are a subdomain\n if (!subdomainName) {\n throw new Error(`${expiration.policy} requires a subdomain to be provided.`);\n }\n\n const tldExpiration = await getExpiration({ aptosConfig, name: domainName });\n if (!tldExpiration) {\n throw new Error(\"The domain does not exist\");\n }\n\n const expirationDateInMillisecondsSinceEpoch =\n expiration.policy === \"subdomain:independent\" ? expiration.expirationDate : tldExpiration;\n\n if (expirationDateInMillisecondsSinceEpoch > tldExpiration) {\n throw new Error(\"The subdomain expiration time cannot be greater than the domain expiration time\");\n }\n\n const transaction = await generateTransaction({\n aptosConfig,\n sender: sender.accountAddress.toString(),\n data: {\n function: `${routerAddress}::router::register_subdomain`,\n functionArguments: [\n domainName,\n subdomainName,\n Math.round(expirationDateInMillisecondsSinceEpoch / 1000),\n expiration.policy === \"subdomain:follow-domain\" ? 1 : 0,\n !!transferable,\n targetAddress,\n toAddress,\n ],\n },\n options,\n });\n\n return transaction;\n}\n\nexport async function getExpiration(args: { aptosConfig: AptosConfig; name: string }): Promise<number | undefined> {\n const { aptosConfig, name } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n const { domainName, subdomainName } = isValidANSName(name);\n\n try {\n const res = await view({\n aptosConfig,\n payload: {\n function: `${routerAddress}::router::get_expiration`,\n functionArguments: [domainName, subdomainName],\n },\n });\n\n // Normalize expiration time from epoch seconds to epoch milliseconds\n return Number(res[0]) * 1000;\n } catch (e) {\n return undefined;\n }\n}\n\nexport async function getPrimaryName(args: {\n aptosConfig: AptosConfig;\n address: AccountAddressInput;\n}): Promise<string | undefined> {\n const { aptosConfig, address } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n\n const res = await view({\n aptosConfig,\n payload: {\n function: `${routerAddress}::router::get_primary_name`,\n functionArguments: [AccountAddress.from(address).toString()],\n },\n });\n\n const domainName = unwrapOption<MoveAddressType>(res[1]);\n const subdomainName = unwrapOption<MoveAddressType>(res[0]);\n\n if (!domainName) return undefined;\n\n return [subdomainName, domainName].filter(Boolean).join(\".\");\n}\n\nexport async function setPrimaryName(args: {\n aptosConfig: AptosConfig;\n sender: Account;\n name?: string;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, sender, name, options } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n\n if (!name) {\n const transaction = await generateTransaction({\n aptosConfig,\n sender: sender.accountAddress.toString(),\n data: {\n function: `${routerAddress}::router::clear_primary_name`,\n functionArguments: [],\n },\n options,\n });\n\n return transaction;\n }\n\n const { domainName, subdomainName } = isValidANSName(name);\n\n const transaction = await generateTransaction({\n aptosConfig,\n sender: sender.accountAddress.toString(),\n data: {\n function: `${routerAddress}::router::set_primary_name`,\n functionArguments: [domainName, subdomainName],\n },\n options,\n });\n\n return transaction;\n}\n\nexport async function getTargetAddress(args: {\n aptosConfig: AptosConfig;\n name: string;\n}): Promise<AccountAddress | undefined> {\n const { aptosConfig, name } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n const { domainName, subdomainName } = isValidANSName(name);\n\n const res = await view({\n aptosConfig,\n payload: {\n function: `${routerAddress}::router::get_target_addr`,\n functionArguments: [domainName, subdomainName],\n },\n });\n\n const target = unwrapOption<MoveAddressType>(res[0]);\n return target ? AccountAddress.from(target) : undefined;\n}\n\nexport async function setTargetAddress(args: {\n aptosConfig: AptosConfig;\n sender: Account;\n name: string;\n address: AccountAddressInput;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, sender, name, address, options } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n const { domainName, subdomainName } = isValidANSName(name);\n\n const transaction = await generateTransaction({\n aptosConfig,\n sender: sender.accountAddress.toString(),\n data: {\n function: `${routerAddress}::router::set_target_addr`,\n functionArguments: [domainName, subdomainName, address],\n },\n options,\n });\n\n return transaction;\n}\n\nexport async function getName(args: {\n aptosConfig: AptosConfig;\n name: string;\n}): Promise<GetANSNameResponse[0] | undefined> {\n const { aptosConfig, name } = args;\n const { domainName, subdomainName = \"\" } = isValidANSName(name);\n\n const where: CurrentAptosNamesBoolExp = {\n domain: { _eq: domainName },\n subdomain: { _eq: subdomainName },\n is_active: { _eq: true },\n };\n\n const data = await queryIndexer<GetNamesQuery>({\n aptosConfig,\n query: {\n query: GetNames,\n variables: {\n where_condition: where,\n limit: 1,\n },\n },\n originMethod: \"getName\",\n });\n\n // Convert the expiration_timestamp from an ISO string to milliseconds since epoch\n let res = data.current_aptos_names[0];\n if (res) {\n res = sanitizeANSName(res);\n }\n\n return res;\n}\n\ninterface QueryNamesOptions {\n options?: PaginationArgs & OrderByArg<GetANSNameResponse[0]> & WhereArg<CurrentAptosNamesBoolExp>;\n}\n\nexport interface GetAccountNamesArgs extends QueryNamesOptions {\n accountAddress: AccountAddressInput;\n}\n\nexport async function getAccountNames(\n args: { aptosConfig: AptosConfig } & GetAccountNamesArgs,\n): Promise<GetANSNameResponse> {\n const { aptosConfig, options, accountAddress } = args;\n\n const expirationDate = await getANSExpirationDate({ aptosConfig });\n\n const data = await queryIndexer<GetNamesQuery>({\n aptosConfig,\n originMethod: \"getAccountNames\",\n query: {\n query: GetNames,\n variables: {\n limit: options?.limit,\n offset: options?.offset,\n order_by: options?.orderBy,\n where_condition: {\n ...(args.options?.where ?? {}),\n owner_address: { _eq: accountAddress.toString() },\n expiration_timestamp: { _gte: expirationDate },\n },\n },\n },\n });\n\n return data.current_aptos_names.map(sanitizeANSName);\n}\n\nexport interface GetAccountDomainsArgs extends QueryNamesOptions {\n accountAddress: AccountAddressInput;\n}\n\nexport async function getAccountDomains(\n args: { aptosConfig: AptosConfig } & GetAccountDomainsArgs,\n): Promise<GetANSNameResponse> {\n const { aptosConfig, options, accountAddress } = args;\n\n const expirationDate = await getANSExpirationDate({ aptosConfig });\n\n const data = await queryIndexer<GetNamesQuery>({\n aptosConfig,\n originMethod: \"getAccountDomains\",\n query: {\n query: GetNames,\n variables: {\n limit: options?.limit,\n offset: options?.offset,\n order_by: options?.orderBy,\n where_condition: {\n ...(args.options?.where ?? {}),\n owner_address: { _eq: accountAddress.toString() },\n expiration_timestamp: { _gte: expirationDate },\n subdomain: { _eq: \"\" },\n },\n },\n },\n });\n\n return data.current_aptos_names.map(sanitizeANSName);\n}\n\nexport interface GetAccountSubdomainsArgs extends QueryNamesOptions {\n accountAddress: AccountAddressInput;\n}\n\nexport async function getAccountSubdomains(\n args: { aptosConfig: AptosConfig } & GetAccountSubdomainsArgs,\n): Promise<GetANSNameResponse> {\n const { aptosConfig, options, accountAddress } = args;\n\n const expirationDate = await getANSExpirationDate({ aptosConfig });\n\n const data = await queryIndexer<GetNamesQuery>({\n aptosConfig,\n originMethod: \"getAccountSubdomains\",\n query: {\n query: GetNames,\n variables: {\n limit: options?.limit,\n offset: options?.offset,\n order_by: options?.orderBy,\n where_condition: {\n ...(args.options?.where ?? {}),\n owner_address: { _eq: accountAddress.toString() },\n expiration_timestamp: { _gte: expirationDate },\n subdomain: { _neq: \"\" },\n },\n },\n },\n });\n\n return data.current_aptos_names.map(sanitizeANSName);\n}\n\nexport interface GetDomainSubdomainsArgs extends QueryNamesOptions {\n domain: string;\n}\n\nexport async function getDomainSubdomains(\n args: { aptosConfig: AptosConfig } & GetDomainSubdomainsArgs,\n): Promise<GetANSNameResponse> {\n const { aptosConfig, options, domain } = args;\n\n const data = await queryIndexer<GetNamesQuery>({\n aptosConfig,\n originMethod: \"getDomainSubdomains\",\n query: {\n query: GetNames,\n variables: {\n limit: options?.limit,\n offset: options?.offset,\n order_by: options?.orderBy,\n where_condition: {\n ...(args.options?.where ?? {}),\n domain: { _eq: domain },\n subdomain: { _neq: \"\" },\n is_active: { _eq: true },\n },\n },\n },\n });\n\n return data.current_aptos_names.map(sanitizeANSName);\n}\n\n/**\n * This function returns the expiration date in which a name is fully expired as\n * defined by the contract. The grace period allows for names to be past\n * expiration for a certain amount of time before they are released to the\n * public. The names will not function as normal, but the owner can renew\n * without others taking ownership of the name. At the time of writing, the\n * contract specified 30 days.\n *\n * @param args.aptosConfig an AptosConfig object\n * @returns\n */\nasync function getANSExpirationDate(args: { aptosConfig: AptosConfig }): Promise<string> {\n const { aptosConfig } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n\n const [gracePeriodInSeconds] = await view<[number]>({\n aptosConfig,\n payload: {\n function: `${routerAddress}::config::reregistration_grace_sec`,\n functionArguments: [],\n },\n });\n\n const gracePeriodInDays = gracePeriodInSeconds / 60 / 60 / 24;\n const now = () => new Date();\n return new Date(now().setDate(now().getDate() - gracePeriodInDays)).toISOString();\n}\n\nexport async function renewDomain(args: {\n aptosConfig: AptosConfig;\n sender: Account;\n name: string;\n years?: 1;\n options?: InputGenerateTransactionOptions;\n}): Promise<SimpleTransaction> {\n const { aptosConfig, sender, name, years = 1, options } = args;\n const routerAddress = getRouterAddress(aptosConfig);\n const renewalDuration = years * 31536000;\n const { domainName, subdomainName } = isValidANSName(name);\n\n if (subdomainName) {\n throw new Error(\"Subdomains cannot be renewed\");\n }\n\n if (years !== 1) {\n throw new Error(\"Currently, only 1 year renewals are supported\");\n }\n\n const transaction = await generateTransaction({\n aptosConfig,\n sender: sender.accountAddress.toString(),\n data: {\n function: `${routerAddress}::router::renew_domain`,\n functionArguments: [domainName, renewalDuration],\n },\n options,\n });\n\n return transaction;\n}\n\n/**\n * The indexer returns ISO strings for expiration, however the contract works in\n * epoch milliseconds. This function converts the ISO string to epoch\n * milliseconds. In the future, if other properties need sanitization, this can\n * be extended.\n */\nfunction sanitizeANSName(name: GetANSNameResponse[0]): GetANSNameResponse[0] {\n return {\n ...name,\n expiration_timestamp: new Date(name.expiration_timestamp).getTime(),\n };\n}\n"],"mappings":"6MAwBO,IAAMA,EAA+B,CAC1C,mDACA,wDACA,4CACF,EAAE,KAAK,GAAG,EAOH,SAASC,EAAkBC,EAA2B,CAK3D,MAJI,GAACA,GACDA,EAAS,OAAS,GAClBA,EAAS,OAAS,IAElB,CAAC,iCAAiC,KAAKA,CAAQ,EAErD,CAOO,SAASC,EAAeC,EAA8D,CAC3F,GAAM,CAACC,EAAOC,EAAQ,GAAGC,CAAI,EAAIH,EAAK,QAAQ,SAAU,EAAE,EAAE,MAAM,GAAG,EAErE,GAAIG,EAAK,OAAS,EAChB,MAAM,IAAI,MAAM,GAAGH,CAAI,0FAA0F,EAGnH,GAAI,CAAC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uC,EAAoBD,EAAuB,GAAK,GAAK,GACrDE,EAAM,IAAM,IAAI,KACtB,OAAO,IAAI,KAAKA,EAAI,EAAE,QAAQA,EAAI,EAAE,QAAQ,EAAID,CAAiB,CAAC,EAAE,YAAY,CAClF,CAEA,eAAsBE,GAAY1C,EAMH,CAC7B,GAAM,CAAE,YAAAL,EAAa,OAAAe,EAAQ,KAAAvB,EAAM,MAAA6B,EAAQ,EAAG,QAAAH,CAAQ,EAAIb,EACpDC,EAAgBP,EAAiBC,CAAW,EAC5CgD,EAAkB3B,EAAQ,QAC1B,CAAE,WAAAd,EAAY,cAAAC,CAAc,EAAIjB,EAAeC,CAAI,EAEzD,GAAIgB,EACF,MAAM,IAAI,MAAM,8BAA8B,EAGhD,GAAIa,IAAU,EACZ,MAAM,IAAI,MAAM,+CAA+C,EAajE,OAVoB,MAAME,EAAoB,CAC5C,YAAAvB,EACA,OAAQe,EAAO,eAAe,SAAS,EACvC,KAAM,CACJ,SAAU,GAAGT,CAAa,yBAC1B,kBAAmB,CAACC,EAAYyC,CAAe,CACjD,EACA,QAAA9B,CACF,CAAC,CAGH,CAQA,SAASiB,EAAgB3C,EAAoD,CAC3E,MAAO,CACL,GAAGA,EACH,qBAAsB,IAAI,KAAKA,EAAK,oBAAoB,EAAE,QAAQ,CACpE,CACF","names":["VALIDATION_RULES_DESCRIPTION","isValidANSSegment","fragment","isValidANSName","name","first","second","rest","LOCAL_ANS_ACCOUNT_PK","LOCAL_ANS_ACCOUNT_ADDRESS","NetworkToAnsContract","getRouterAddress","aptosConfig","address","unwrapOption","option","getOwnerAddress","args","routerAddress","domainName","subdomainName","res","view","owner","AccountAddress","registerName","expiration","sender","targetAddress","toAddress","options","transferable","hasSubdomainPolicy","years","registrationDuration","generateTransaction","tldExpiration","getExpiration","expirationDateInMillisecondsSinceEpoch","getPrimaryName","setPrimaryName","getTargetAddress","target","setTargetAddress","getName","queryIndexer","GetNames","sanitizeANSName","getAccountNames","accountAddress","expirationDate","getANSExpirationDate","getAccountDomains","getAccountSubdomains","getDomainSubdomains","domain","gracePeriodInSeconds","gracePeriodInDays","now","renewDomain","renewalDuration"]}
@@ -1,2 +1,2 @@
1
- import{b as p}from"./chunk-IOSQVDZI.mjs";import{f as a}from"./chunk-IR46T46A.mjs";import{q as d}from"./chunk-S4SEFF4K.mjs";var g=300,y=o=>{if(o&&o.length>g)throw new Error(`Event type length exceeds the maximum length of ${g}`)};async function f(o){let{aptosConfig:n,eventType:e,options:t}=o,r={where:{account_address:{_eq:"0x0000000000000000000000000000000000000000000000000000000000000000"},creation_number:{_eq:"0"},sequence_number:{_eq:"0"},indexed_type:{_eq:e}},pagination:t,orderBy:t?.orderBy};return c({aptosConfig:n,options:r})}async function h(o){let{accountAddress:n,aptosConfig:e,creationNumber:t,options:s}=o,i={where:{account_address:{_eq:p.from(n).toStringLong()},creation_number:{_eq:t}},pagination:s,orderBy:s?.orderBy};return c({aptosConfig:e,options:i})}async function _(o){let{accountAddress:n,aptosConfig:e,eventType:t,options:s}=o,i={where:{account_address:{_eq:p.from(n).toStringLong()},indexed_type:{_eq:t}},pagination:s,orderBy:s?.orderBy};return c({aptosConfig:e,options:i})}async function c(o){let{aptosConfig:n,options:e}=o;y(e?.where?.indexed_type?._eq);let t={query:d,variables:{where_condition:e?.where,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await a({aptosConfig:n,query:t,originMethod:"getEvents"})).events}export{f as a,h as b,_ as c,c as d};
2
- //# sourceMappingURL=chunk-WCVUDO5S.mjs.map
1
+ import{e as a}from"./chunk-JQIGQMNZ.mjs";import{q as d}from"./chunk-S3EDNXZE.mjs";import{b as p}from"./chunk-QRS4DGP3.mjs";var g=300,y=o=>{if(o&&o.length>g)throw new Error(`Event type length exceeds the maximum length of ${g}`)};async function f(o){let{aptosConfig:n,eventType:e,options:t}=o,r={where:{account_address:{_eq:"0x0000000000000000000000000000000000000000000000000000000000000000"},creation_number:{_eq:"0"},sequence_number:{_eq:"0"},indexed_type:{_eq:e}},pagination:t,orderBy:t?.orderBy};return c({aptosConfig:n,options:r})}async function h(o){let{accountAddress:n,aptosConfig:e,creationNumber:t,options:s}=o,i={where:{account_address:{_eq:p.from(n).toStringLong()},creation_number:{_eq:t}},pagination:s,orderBy:s?.orderBy};return c({aptosConfig:e,options:i})}async function _(o){let{accountAddress:n,aptosConfig:e,eventType:t,options:s}=o,i={where:{account_address:{_eq:p.from(n).toStringLong()},indexed_type:{_eq:t}},pagination:s,orderBy:s?.orderBy};return c({aptosConfig:e,options:i})}async function c(o){let{aptosConfig:n,options:e}=o;y(e?.where?.indexed_type?._eq);let t={query:d,variables:{where_condition:e?.where,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await a({aptosConfig:n,query:t,originMethod:"getEvents"})).events}export{f as a,h as b,_ as c,c as d};
2
+ //# sourceMappingURL=chunk-XFSDV3ND.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as i}from"./chunk-PXFIA4BL.mjs";async function s(e){let{type:t,originMethod:o,path:p,body:r,acceptType:R,contentType:f,params:c,aptosConfig:n,overrides:d}=e,g=n.getRequestUrl(t);return i({url:g,method:"POST",originMethod:o,path:p,body:r,contentType:f,acceptType:R,params:c,overrides:d},n,e.type)}async function y(e){let{aptosConfig:t}=e;return s({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function m(e){let{aptosConfig:t}=e;return s({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function a(e){let{aptosConfig:t}=e,o={...t,clientConfig:{...t.clientConfig}};return delete o?.clientConfig?.API_KEY,s({...e,type:"Faucet",overrides:{...o.clientConfig,...o.faucetConfig,...e.overrides,HEADERS:{...o.clientConfig?.HEADERS,...o.faucetConfig?.HEADERS}}})}export{s as a,y as b,m as c,a as d};
2
- //# sourceMappingURL=chunk-UDRSFVAK.mjs.map
1
+ import{b as i}from"./chunk-2XK53QFA.mjs";async function s(e){let{type:t,originMethod:o,path:p,body:r,acceptType:R,contentType:f,params:c,aptosConfig:n,overrides:d}=e,g=n.getRequestUrl(t);return i({url:g,method:"POST",originMethod:o,path:p,body:r,contentType:f,acceptType:R,params:c,overrides:d},n,e.type)}async function y(e){let{aptosConfig:t}=e;return s({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function m(e){let{aptosConfig:t}=e;return s({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function a(e){let{aptosConfig:t}=e,o={...t,clientConfig:{...t.clientConfig}};return delete o?.clientConfig?.API_KEY,s({...e,type:"Faucet",overrides:{...o.clientConfig,...o.faucetConfig,...e.overrides,HEADERS:{...o.clientConfig?.HEADERS,...o.faucetConfig?.HEADERS}}})}export{s as a,y as b,m as c,a as d};
2
+ //# sourceMappingURL=chunk-YMB2XW2O.mjs.map
@@ -0,0 +1,2 @@
1
+ import{g as e}from"./chunk-5VIESFOC.mjs";import{d as c}from"./chunk-YMB2XW2O.mjs";import{d as r}from"./chunk-CYNQRMO5.mjs";import{b as s}from"./chunk-QRS4DGP3.mjs";async function x(a){let{aptosConfig:t,accountAddress:i,amount:p,options:n}=a,u=n?.timeoutSecs||20,{data:d}=await c({aptosConfig:t,path:"fund",body:{address:s.from(i).toString(),amount:p},originMethod:"fundAccount"}),m=d.txn_hashes[0],o=await e({aptosConfig:t,transactionHash:m,options:{timeoutSecs:u,checkSuccess:n?.checkSuccess}});if(o.type==="user_transaction")return o;throw new Error(`Unexpected transaction received for fund account: ${o.type}`)}export{x as a};
2
+ //# sourceMappingURL=chunk-ZBXOX3S7.mjs.map
@@ -1,12 +1,12 @@
1
1
  export { LocalNode } from './localNode.mjs';
2
2
  export { Move } from './move.mjs';
3
3
  import 'child_process';
4
- import '../utils/apiEndpoints.mjs';
5
4
  import '../core/accountAddress.mjs';
6
5
  import '../bcs/serializer.mjs';
7
6
  import '../core/hex.mjs';
8
7
  import '../core/common.mjs';
9
8
  import '../types/index.mjs';
9
+ import '../utils/apiEndpoints.mjs';
10
10
  import '../types/indexer.mjs';
11
11
  import '../types/generated/operations.mjs';
12
12
  import '../types/generated/types.mjs';
@@ -1,2 +1,2 @@
1
- import{a as o}from"../chunk-L54P6EGN.mjs";import{a as r}from"../chunk-LDQ6JFEF.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-FVA2OPG4.mjs";export{o as LocalNode,r as Move};
1
+ import{a as o}from"../chunk-L54P6EGN.mjs";import{a as r}from"../chunk-QSHLNSUP.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-FVA2OPG4.mjs";export{o as LocalNode,r as Move};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,5 +1,5 @@
1
- import { Network } from '../utils/apiEndpoints.mjs';
2
1
  import { AccountAddress } from '../core/accountAddress.mjs';
2
+ import { Network } from '../utils/apiEndpoints.mjs';
3
3
  import '../bcs/serializer.mjs';
4
4
  import '../core/hex.mjs';
5
5
  import '../core/common.mjs';
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-LDQ6JFEF.mjs";import"../chunk-FVA2OPG4.mjs";export{a as Move};
1
+ import{a}from"../chunk-QSHLNSUP.mjs";import"../chunk-FVA2OPG4.mjs";export{a as Move};
2
2
  //# sourceMappingURL=move.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"../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{b as aptosRequest,a as request};
1
+ import{a,b}from"../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{b as aptosRequest,a as request};
2
2
  //# sourceMappingURL=core.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c}from"../chunk-APDALGDD.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 get,b as getAptosFullNode,c as paginateWithCursor};
1
+ import{a,b,c}from"../chunk-S2VSJJRJ.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 get,b as getAptosFullNode,c as paginateWithCursor};
2
2
  //# sourceMappingURL=get.mjs.map
@@ -1,2 +1,2 @@
1
- import"../chunk-N2FKVZ4D.mjs";import{a as d,b as e,c as f}from"../chunk-APDALGDD.mjs";import{a as g,b as h,c as i,d as j}from"../chunk-UDRSFVAK.mjs";import{a as b,b as c}from"../chunk-PXFIA4BL.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-ROXFCLDT.mjs";import{a}from"../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 AptosApiError,c as aptosRequest,d as get,e as getAptosFullNode,f as paginateWithCursor,g as post,j as postAptosFaucet,h as postAptosFullNode,i as postAptosIndexer,b as request};
1
+ import"../chunk-N2FKVZ4D.mjs";import{a as d,b as e,c as f}from"../chunk-S2VSJJRJ.mjs";import{a as g,b as h,c as i,d as j}from"../chunk-YMB2XW2O.mjs";import{a as b,b as c}from"../chunk-2XK53QFA.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-ROXFCLDT.mjs";import{a}from"../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 AptosApiError,c as aptosRequest,d as get,e as getAptosFullNode,f as paginateWithCursor,g as post,j as postAptosFaucet,h as postAptosFullNode,i as postAptosIndexer,b as request};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d}from"../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 post,d as postAptosFaucet,b as postAptosFullNode,c as postAptosIndexer};
1
+ import{a,b,c,d}from"../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 post,d as postAptosFaucet,b as postAptosFullNode,c as postAptosIndexer};
2
2
  //# sourceMappingURL=post.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-6FBKUTGF.mjs";import"../chunk-FVA2OPG4.mjs";export{a as AptosApiError};
1
+ import{a}from"../chunk-GHYE26Q5.mjs";import"../chunk-FVA2OPG4.mjs";export{a as AptosApiError};
2
2
  //# sourceMappingURL=types.mjs.map
@@ -1,21 +1,12 @@
1
- export { A as Account, e as CreateAccountFromPrivateKeyArgs, C as CreateEd25519AccountFromPrivateKeyArgs, c as CreateEd25519SingleKeyAccountFromPrivateKeyArgs, d as CreateSingleKeyAccountFromPrivateKeyArgs, b as Ed25519Account, E as Ed25519SignerConstructorArgs, a as Ed25519SignerFromDerivationPathArgs, h as GenerateAccountArgs, G as GenerateEd25519AccountArgs, f as GenerateEd25519SingleKeyAccountArgs, g as GenerateSingleKeyAccountArgs, P as PrivateKeyFromDerivationPathArgs, l as SingleKeyAccount, S as SingleKeySignerConstructorArgs, j as SingleKeySignerFromDerivationPathArgs, i as SingleKeySignerGenerateArgs, V as VerifyEd25519SignatureArgs, k as VerifySingleKeySignatureArgs } from '../../Ed25519Account--qjfup2u.mjs';
2
1
  export { createObjectAddress, createResourceAddress, createTokenAddress } from './utils/address.mjs';
3
- import '../../transactions/authenticator/account.mjs';
4
- import '../../bcs/deserializer.mjs';
2
+ import '../accountAddress.mjs';
3
+ import '../../bcs/serializer.mjs';
4
+ import '../hex.mjs';
5
+ import '../common.mjs';
5
6
  import '../../types/index.mjs';
6
7
  import '../../utils/apiEndpoints.mjs';
7
8
  import '../../types/indexer.mjs';
8
9
  import '../../types/generated/operations.mjs';
9
10
  import '../../types/generated/types.mjs';
10
- import '../../bcs/serializer.mjs';
11
- import '../hex.mjs';
12
- import '../common.mjs';
13
- import '../crypto/ed25519.mjs';
14
- import '../../publicKey-lq5djCIY.mjs';
15
- import '../accountAddress.mjs';
11
+ import '../../bcs/deserializer.mjs';
16
12
  import '../../transactions/instances/transactionArgument.mjs';
17
- import '../crypto/signature.mjs';
18
- import '../crypto/privateKey.mjs';
19
- import '../crypto/multiEd25519.mjs';
20
- import '../crypto/multiKey.mjs';
21
- import '../crypto/singleKey.mjs';
@@ -1,2 +1,2 @@
1
- import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import{a as d,b as e,c as f}from"../../chunk-UML2VQZT.mjs";import{a as c}from"../../chunk-CDB34C4N.mjs";import{a}from"../../chunk-PJPXC22D.mjs";import{a as b}from"../../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-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{c as Account,a as Ed25519Account,b as SingleKeyAccount,d as createObjectAddress,e as createResourceAddress,f as createTokenAddress};
1
+ import"../../chunk-4QMXOWHP.mjs";import{a as o,b as r,c as e}from"../../chunk-KAGLWBIJ.mjs";import"../../chunk-QRS4DGP3.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{o as createObjectAddress,r as createResourceAddress,e as createTokenAddress};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c}from"../../../chunk-UML2VQZT.mjs";import"../../../chunk-IOSQVDZI.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 createObjectAddress,b as createResourceAddress,c as createTokenAddress};
1
+ import{a,b,c}from"../../../chunk-KAGLWBIJ.mjs";import"../../../chunk-QRS4DGP3.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 createObjectAddress,b as createResourceAddress,c as createTokenAddress};
2
2
  //# sourceMappingURL=address.mjs.map
@@ -1,2 +1,2 @@
1
- import"../../../chunk-4QMXOWHP.mjs";import{a,b,c}from"../../../chunk-UML2VQZT.mjs";import"../../../chunk-IOSQVDZI.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 createObjectAddress,b as createResourceAddress,c as createTokenAddress};
1
+ import"../../../chunk-4QMXOWHP.mjs";import{a,b,c}from"../../../chunk-KAGLWBIJ.mjs";import"../../../chunk-QRS4DGP3.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 createObjectAddress,b as createResourceAddress,c as createTokenAddress};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"../chunk-IOSQVDZI.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{b as AccountAddress,a as AddressInvalidReason};
1
+ import{a,b}from"../chunk-QRS4DGP3.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{b as AccountAddress,a as AddressInvalidReason};
2
2
  //# sourceMappingURL=accountAddress.mjs.map
@@ -1,7 +1,7 @@
1
1
  import './accountAddress.mjs';
2
2
  import '../bcs/deserializer.mjs';
3
3
  import '../bcs/serializer.mjs';
4
- export { A as AuthenticationKey } from '../publicKey-lq5djCIY.mjs';
4
+ export { A as AuthenticationKey } from '../publicKey-B3XRNhHO.mjs';
5
5
  import '../types/index.mjs';
6
6
  import './hex.mjs';
7
7
  import './common.mjs';
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-NPFNYP75.mjs";import"../chunk-IOSQVDZI.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 AuthenticationKey};
1
+ import{a}from"../chunk-5EN52MUT.mjs";import"../chunk-QRS4DGP3.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 AuthenticationKey};
2
2
  //# sourceMappingURL=authenticationKey.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-FBPNHF54.mjs";import"../chunk-FVA2OPG4.mjs";export{a as ParsingError};
1
+ import{a}from"../chunk-LG7RJQ57.mjs";import"../chunk-FVA2OPG4.mjs";export{a as ParsingError};
2
2
  //# sourceMappingURL=common.mjs.map
@@ -1,6 +1,6 @@
1
1
  import { Deserializer } from '../../bcs/deserializer.mjs';
2
2
  import { Serializer, Serializable } from '../../bcs/serializer.mjs';
3
- import { a as AccountPublicKey, V as VerifySignatureArgs, A as AuthenticationKey } from '../../publicKey-lq5djCIY.mjs';
3
+ import { a as AccountPublicKey, V as VerifySignatureArgs, A as AuthenticationKey } from '../../publicKey-B3XRNhHO.mjs';
4
4
  import { HexInput } from '../../types/index.mjs';
5
5
  import { PrivateKey } from './privateKey.mjs';
6
6
  import { Signature } from './signature.mjs';
@@ -1,2 +1,2 @@
1
- import{a,b,c}from"../../chunk-CNMQNPNV.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.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{b as Ed25519PrivateKey,a as Ed25519PublicKey,c as Ed25519Signature};
1
+ import{a,b,c}from"../../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{b as Ed25519PrivateKey,a as Ed25519PublicKey,c as Ed25519Signature};
2
2
  //# sourceMappingURL=ed25519.mjs.map
@@ -3,10 +3,13 @@ export { APTOS_BIP44_REGEX, APTOS_HARDENED_REGEX, CKDPriv, DerivedKeys, HARDENED
3
3
  export { MultiEd25519PublicKey, MultiEd25519Signature } from './multiEd25519.mjs';
4
4
  export { MultiKey, MultiKeySignature } from './multiKey.mjs';
5
5
  export { PrivateKey } from './privateKey.mjs';
6
- export { a as AccountPublicKey, P as PublicKey, V as VerifySignatureArgs } from '../../publicKey-lq5djCIY.mjs';
6
+ export { a as AccountPublicKey, P as PublicKey, V as VerifySignatureArgs } from '../../publicKey-B3XRNhHO.mjs';
7
7
  export { Secp256k1PrivateKey, Secp256k1PublicKey, Secp256k1Signature } from './secp256k1.mjs';
8
8
  export { Signature } from './signature.mjs';
9
9
  export { AnyPublicKey, AnySignature } from './singleKey.mjs';
10
+ import '../accountAddress.mjs';
11
+ import '../common.mjs';
12
+ import '../hex.mjs';
10
13
  import '../../bcs/deserializer.mjs';
11
14
  import '../../types/index.mjs';
12
15
  import '../../utils/apiEndpoints.mjs';
@@ -14,7 +17,4 @@ import '../../types/indexer.mjs';
14
17
  import '../../types/generated/operations.mjs';
15
18
  import '../../types/generated/types.mjs';
16
19
  import '../../bcs/serializer.mjs';
17
- import '../hex.mjs';
18
- import '../common.mjs';
19
- import '../accountAddress.mjs';
20
20
  import '../../transactions/instances/transactionArgument.mjs';
@@ -1,2 +1,2 @@
1
- import"../../chunk-UVSRX4SV.mjs";import{a as q,b as r}from"../../chunk-XO3HHRJV.mjs";import{a as x,b as y}from"../../chunk-MFL3UCKA.mjs";import{a as v,b as w}from"../../chunk-AT2A6UGB.mjs";import{a as s,b as t,c as u}from"../../chunk-O4JRPZZM.mjs";import{a as n,b as o,c as p}from"../../chunk-CNMQNPNV.mjs";import{a as m}from"../../chunk-R5QUBEH6.mjs";import"../../chunk-TJDC5PWD.mjs";import{a,b,c,d,e,f,g,h,i,j}from"../../chunk-LR65XHSF.mjs";import"../../chunk-KUX6GQ2E.mjs";import{a as k,b as l}from"../../chunk-WFZDFFBM.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.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{b as APTOS_BIP44_REGEX,a as APTOS_HARDENED_REGEX,l as AccountPublicKey,v as AnyPublicKey,w as AnySignature,h as CKDPriv,o as Ed25519PrivateKey,n as Ed25519PublicKey,p as Ed25519Signature,d as HARDENED_OFFSET,c as KeyType,q as MultiEd25519PublicKey,r as MultiEd25519Signature,x as MultiKey,y as MultiKeySignature,k as PublicKey,t as Secp256k1PrivateKey,s as Secp256k1PublicKey,u as Secp256k1Signature,m as Signature,g as deriveKey,e as isValidBIP44Path,f as isValidHardenedPath,j as mnemonicToSeed,i as splitPath};
1
+ import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import{a as q,b as r}from"../../chunk-MCRRHBFQ.mjs";import{a as x,b as y}from"../../chunk-PIVZMT5D.mjs";import{a as v,b as w}from"../../chunk-IENCDVPF.mjs";import{a as s,b as t,c as u}from"../../chunk-2X7A4HUS.mjs";import{a as n,b as o,c as p}from"../../chunk-T2AGN5YT.mjs";import{a as k,b as l}from"../../chunk-4NHWV5AI.mjs";import{a as m}from"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import{a,b,c,d,e,f,g,h,i,j}from"../../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{b as APTOS_BIP44_REGEX,a as APTOS_HARDENED_REGEX,l as AccountPublicKey,v as AnyPublicKey,w as AnySignature,h as CKDPriv,o as Ed25519PrivateKey,n as Ed25519PublicKey,p as Ed25519Signature,d as HARDENED_OFFSET,c as KeyType,q as MultiEd25519PublicKey,r as MultiEd25519Signature,x as MultiKey,y as MultiKeySignature,k as PublicKey,t as Secp256k1PrivateKey,s as Secp256k1PublicKey,u as Secp256k1Signature,m as Signature,g as deriveKey,e as isValidBIP44Path,f as isValidHardenedPath,j as mnemonicToSeed,i as splitPath};
2
2
  //# sourceMappingURL=index.mjs.map