@aptos-labs/ts-sdk 1.23.0 → 1.25.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 (284) hide show
  1. package/dist/common/cli/index.d.ts +21 -1
  2. package/dist/common/cli/index.js +1 -1
  3. package/dist/common/cli/index.js.map +1 -1
  4. package/dist/common/index.d.ts +13 -8
  5. package/dist/common/index.js +7 -7
  6. package/dist/common/index.js.map +1 -1
  7. package/dist/esm/account/Account.mjs +1 -1
  8. package/dist/esm/account/Ed25519Account.mjs +1 -1
  9. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  10. package/dist/esm/account/KeylessAccount.mjs +1 -1
  11. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  12. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  13. package/dist/esm/account/index.mjs +1 -1
  14. package/dist/esm/api/account.mjs +1 -1
  15. package/dist/esm/api/ans.mjs +1 -1
  16. package/dist/esm/api/aptos.mjs +1 -1
  17. package/dist/esm/api/coin.mjs +1 -1
  18. package/dist/esm/api/digitalAsset.mjs +1 -1
  19. package/dist/esm/api/event.mjs +1 -1
  20. package/dist/esm/api/faucet.mjs +1 -1
  21. package/dist/esm/api/fungibleAsset.mjs +1 -1
  22. package/dist/esm/api/general.mjs +1 -1
  23. package/dist/esm/api/index.mjs +1 -1
  24. package/dist/esm/api/keyless.mjs +1 -1
  25. package/dist/esm/api/object.mjs +1 -1
  26. package/dist/esm/api/staking.mjs +1 -1
  27. package/dist/esm/api/table.mjs +1 -1
  28. package/dist/esm/api/transaction.mjs +1 -1
  29. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  30. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  31. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  32. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  33. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  34. package/dist/esm/api/utils.mjs +1 -1
  35. package/dist/esm/bcs/index.mjs +1 -1
  36. package/dist/esm/{chunk-MA7TL5VN.mjs → chunk-2CXQK6CH.mjs} +2 -2
  37. package/dist/esm/{chunk-FE6CYBDF.mjs → chunk-34PNYV2Q.mjs} +2 -2
  38. package/dist/esm/{chunk-PF54PEHF.mjs → chunk-35L6ZK2X.mjs} +2 -2
  39. package/dist/esm/{chunk-RBIJJSGB.mjs → chunk-3GGG4R4C.mjs} +2 -2
  40. package/dist/esm/{chunk-4R7FL2G2.mjs → chunk-5JTED2JJ.mjs} +2 -2
  41. package/dist/esm/{chunk-4ZDOOSRJ.mjs → chunk-5OODQH42.mjs} +2 -2
  42. package/dist/esm/{chunk-T7MGIHWV.mjs → chunk-6R3ZHOGL.mjs} +2 -2
  43. package/dist/esm/{chunk-7F7AIMGB.mjs → chunk-76IW7XM5.mjs} +2 -2
  44. package/dist/esm/{chunk-IZ7OGJBY.mjs → chunk-7JWCIWJ3.mjs} +2 -2
  45. package/dist/esm/chunk-7MYVC7NY.mjs +2 -0
  46. package/dist/esm/chunk-7MYVC7NY.mjs.map +1 -0
  47. package/dist/esm/{chunk-K7OBPPSF.mjs → chunk-7VIABVKU.mjs} +2 -2
  48. package/dist/esm/{chunk-VA4HKHNV.mjs → chunk-7WPECE2S.mjs} +2 -2
  49. package/dist/esm/chunk-AZRXSMC2.mjs +2 -0
  50. package/dist/esm/{chunk-2M45ESQN.mjs.map → chunk-AZRXSMC2.mjs.map} +1 -1
  51. package/dist/esm/{chunk-B4ROOQE3.mjs → chunk-BP7JPCSW.mjs} +2 -2
  52. package/dist/esm/chunk-C4RTKCIA.mjs +2 -0
  53. package/dist/esm/chunk-C4RTKCIA.mjs.map +1 -0
  54. package/dist/esm/{chunk-NJ2IXXY2.mjs → chunk-CZ6UX5WZ.mjs} +2 -2
  55. package/dist/esm/{chunk-BQ7OOQRE.mjs → chunk-DPZO54DD.mjs} +2 -2
  56. package/dist/esm/{chunk-IR6L77JS.mjs → chunk-E67RGLPK.mjs} +2 -2
  57. package/dist/esm/{chunk-QLKTSSVC.mjs → chunk-EAWQ4SD3.mjs} +2 -2
  58. package/dist/esm/{chunk-ZE2TCKUL.mjs → chunk-EFJCV23R.mjs} +2 -2
  59. package/dist/esm/{chunk-Y5AY3QBY.mjs → chunk-EMVWSYK5.mjs} +2 -2
  60. package/dist/esm/{chunk-BDD6OBUV.mjs → chunk-EV5QBTUM.mjs} +2 -2
  61. package/dist/esm/{chunk-QUMSKIYX.mjs → chunk-F3RBTS5V.mjs} +2 -2
  62. package/dist/esm/{chunk-NC3KKAAK.mjs → chunk-FDFE5GY2.mjs} +2 -2
  63. package/dist/esm/{chunk-WPYVWZQS.mjs → chunk-G5MGSV7Y.mjs} +2 -2
  64. package/dist/esm/{chunk-X2QSDREG.mjs → chunk-GFUP6W3X.mjs} +2 -2
  65. package/dist/esm/{chunk-V3NKDUY5.mjs → chunk-GY7ARJNT.mjs} +2 -2
  66. package/dist/esm/{chunk-ME2PENQD.mjs → chunk-HKLJ6JKE.mjs} +2 -2
  67. package/dist/esm/{chunk-PIUICROW.mjs → chunk-HKMG3LZX.mjs} +2 -2
  68. package/dist/esm/{chunk-L7FA4ISG.mjs → chunk-HWX6AJJ2.mjs} +2 -2
  69. package/dist/esm/{chunk-ODYVU346.mjs → chunk-HXYBTLQT.mjs} +2 -2
  70. package/dist/esm/{chunk-DAEUQBVZ.mjs → chunk-IDYCJIHI.mjs} +2 -2
  71. package/dist/esm/{chunk-GP3RTNYN.mjs → chunk-INZXND6M.mjs} +2 -2
  72. package/dist/esm/{chunk-UY4EIN3P.mjs → chunk-ISUHNAU4.mjs} +2 -2
  73. package/dist/esm/{chunk-D6DCZULX.mjs → chunk-JBCUGFGG.mjs} +2 -2
  74. package/dist/esm/{chunk-243IMA3Y.mjs → chunk-JCQYD2ZQ.mjs} +2 -2
  75. package/dist/esm/{chunk-RZKLIZ2D.mjs → chunk-KLD5S3J2.mjs} +2 -2
  76. package/dist/esm/{chunk-2SGICMXB.mjs → chunk-LKA54RAP.mjs} +2 -2
  77. package/dist/esm/{chunk-IUAAMX5V.mjs → chunk-M74WIV66.mjs} +2 -2
  78. package/dist/esm/{chunk-J26STL4T.mjs → chunk-METR6A53.mjs} +2 -2
  79. package/dist/esm/{chunk-PDOQLTXA.mjs → chunk-MULJ2GLJ.mjs} +2 -2
  80. package/dist/esm/{chunk-4FMAPHUM.mjs → chunk-NAHOALKG.mjs} +2 -2
  81. package/dist/esm/{chunk-D6QSRB4J.mjs → chunk-NLJ5MHA5.mjs} +2 -2
  82. package/dist/esm/{chunk-ES5Z33UX.mjs → chunk-NSEC2KVP.mjs} +2 -2
  83. package/dist/esm/chunk-NWLLWPBG.mjs +2 -0
  84. package/dist/esm/chunk-NWLLWPBG.mjs.map +1 -0
  85. package/dist/esm/{chunk-J4KAYDPB.mjs → chunk-NWOMSL6K.mjs} +2 -2
  86. package/dist/esm/chunk-O4BBULNE.mjs +2 -0
  87. package/dist/esm/chunk-O4BBULNE.mjs.map +1 -0
  88. package/dist/esm/{chunk-YEISKUKC.mjs → chunk-OGOWKEMD.mjs} +2 -2
  89. package/dist/esm/{chunk-WSE653RS.mjs → chunk-OHRL766V.mjs} +2 -2
  90. package/dist/esm/{chunk-WSE653RS.mjs.map → chunk-OHRL766V.mjs.map} +1 -1
  91. package/dist/esm/chunk-P2TDGITN.mjs +2 -0
  92. package/dist/esm/chunk-P2TDGITN.mjs.map +1 -0
  93. package/dist/esm/{chunk-FAFN34ZH.mjs → chunk-PYLB6CAF.mjs} +2 -2
  94. package/dist/esm/chunk-Q7MD4V7H.mjs +2 -0
  95. package/dist/esm/chunk-Q7MD4V7H.mjs.map +1 -0
  96. package/dist/esm/{chunk-J6NLU6QX.mjs → chunk-QRN6BG2N.mjs} +2 -2
  97. package/dist/esm/{chunk-GBZOWPC6.mjs → chunk-SUJLWCRN.mjs} +2 -2
  98. package/dist/esm/{chunk-5OR2POPO.mjs → chunk-TDCS6MMG.mjs} +2 -2
  99. package/dist/esm/{chunk-F435LQUS.mjs → chunk-UEP4UQS5.mjs} +2 -2
  100. package/dist/esm/{chunk-3JFX3XDA.mjs → chunk-UNMUX5HS.mjs} +2 -2
  101. package/dist/esm/{chunk-EMFVGL2Y.mjs → chunk-UWPO7WWS.mjs} +2 -2
  102. package/dist/esm/{chunk-FRUEQTCC.mjs → chunk-V3OYNKY5.mjs} +2 -2
  103. package/dist/esm/{chunk-T7WBGP37.mjs → chunk-V75UHXGZ.mjs} +2 -2
  104. package/dist/esm/{chunk-OUAQKVIC.mjs → chunk-VL6JZUYX.mjs} +2 -2
  105. package/dist/esm/chunk-W7MX6GBC.mjs +2 -0
  106. package/dist/esm/chunk-W7MX6GBC.mjs.map +1 -0
  107. package/dist/esm/chunk-WLLWOD5T.mjs +2 -0
  108. package/dist/esm/chunk-WLLWOD5T.mjs.map +1 -0
  109. package/dist/esm/{chunk-MG3T24A3.mjs → chunk-WMBECPK5.mjs} +2 -2
  110. package/dist/esm/{chunk-ZMFVKUFD.mjs → chunk-WMHYIP3S.mjs} +2 -2
  111. package/dist/esm/{chunk-FZ3HMVKE.mjs → chunk-WRRQ7L5K.mjs} +2 -2
  112. package/dist/esm/{chunk-BQIT7TKM.mjs → chunk-XJI57J4Q.mjs} +2 -2
  113. package/dist/esm/{chunk-OBKVMO7I.mjs → chunk-XNSOEUH7.mjs} +2 -2
  114. package/dist/esm/{chunk-3CB53WTP.mjs → chunk-XSNOPUMC.mjs} +2 -2
  115. package/dist/esm/{chunk-BEXHZ5XT.mjs → chunk-XUT73RUR.mjs} +2 -2
  116. package/dist/esm/{chunk-ZHNCJSXO.mjs → chunk-YB5DCDJY.mjs} +2 -2
  117. package/dist/esm/{chunk-BFRFAX5I.mjs → chunk-YDZBU2DJ.mjs} +2 -2
  118. package/dist/esm/{chunk-T52HPGL5.mjs → chunk-YZWR7OV5.mjs} +2 -2
  119. package/dist/esm/cli/index.mjs +1 -1
  120. package/dist/esm/cli/localNode.d.mts +1 -1
  121. package/dist/esm/cli/localNode.mjs +1 -1
  122. package/dist/esm/cli/move.d.mts +20 -0
  123. package/dist/esm/cli/move.mjs +1 -1
  124. package/dist/esm/client/core.mjs +1 -1
  125. package/dist/esm/client/get.mjs +1 -1
  126. package/dist/esm/client/index.mjs +1 -1
  127. package/dist/esm/client/post.mjs +1 -1
  128. package/dist/esm/core/account/index.mjs +1 -1
  129. package/dist/esm/core/account/utils/address.mjs +1 -1
  130. package/dist/esm/core/account/utils/index.mjs +1 -1
  131. package/dist/esm/core/accountAddress.mjs +1 -1
  132. package/dist/esm/core/authenticationKey.mjs +1 -1
  133. package/dist/esm/core/crypto/ed25519.d.mts +10 -9
  134. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  135. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  136. package/dist/esm/core/crypto/index.d.mts +1 -1
  137. package/dist/esm/core/crypto/index.mjs +1 -1
  138. package/dist/esm/core/crypto/keyless.d.mts +1 -0
  139. package/dist/esm/core/crypto/keyless.mjs +1 -1
  140. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  141. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  142. package/dist/esm/core/crypto/proof.mjs +1 -1
  143. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  144. package/dist/esm/core/crypto/secp256k1.d.mts +1 -0
  145. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  146. package/dist/esm/core/crypto/signature.mjs +1 -1
  147. package/dist/esm/core/crypto/singleKey.d.mts +2 -0
  148. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  149. package/dist/esm/core/index.d.mts +1 -1
  150. package/dist/esm/core/index.mjs +1 -1
  151. package/dist/esm/index.d.mts +1 -1
  152. package/dist/esm/index.mjs +1 -1
  153. package/dist/esm/internal/account.mjs +1 -1
  154. package/dist/esm/internal/ans.mjs +1 -1
  155. package/dist/esm/internal/coin.mjs +1 -1
  156. package/dist/esm/internal/digitalAsset.mjs +1 -1
  157. package/dist/esm/internal/event.mjs +1 -1
  158. package/dist/esm/internal/faucet.mjs +1 -1
  159. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  160. package/dist/esm/internal/general.mjs +1 -1
  161. package/dist/esm/internal/keyless.mjs +1 -1
  162. package/dist/esm/internal/object.mjs +1 -1
  163. package/dist/esm/internal/staking.mjs +1 -1
  164. package/dist/esm/internal/table.mjs +1 -1
  165. package/dist/esm/internal/transaction.mjs +1 -1
  166. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  167. package/dist/esm/internal/view.mjs +1 -1
  168. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  169. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  170. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  171. package/dist/esm/transactions/index.mjs +1 -1
  172. package/dist/esm/transactions/instances/index.mjs +1 -1
  173. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  174. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  175. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  176. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  177. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  178. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  179. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  180. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  181. package/dist/esm/transactions/management/index.mjs +1 -1
  182. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  183. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  184. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  185. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  186. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  187. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  188. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  189. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  190. package/dist/esm/utils/index.mjs +1 -1
  191. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  192. package/dist/esm/version.d.mts +1 -1
  193. package/dist/esm/version.mjs +1 -1
  194. package/package.json +1 -1
  195. package/src/api/faucet.ts +6 -1
  196. package/src/cli/localNode.ts +12 -4
  197. package/src/cli/move.ts +36 -0
  198. package/src/core/accountAddress.ts +6 -6
  199. package/src/core/crypto/ed25519.ts +28 -28
  200. package/src/core/crypto/keyless.ts +9 -0
  201. package/src/core/crypto/secp256k1.ts +4 -3
  202. package/src/core/crypto/singleKey.ts +20 -1
  203. package/src/transactions/transactionBuilder/transactionBuilder.ts +17 -27
  204. package/src/version.ts +1 -1
  205. package/dist/esm/chunk-2M45ESQN.mjs +0 -2
  206. package/dist/esm/chunk-6WAXFWLH.mjs +0 -2
  207. package/dist/esm/chunk-6WAXFWLH.mjs.map +0 -1
  208. package/dist/esm/chunk-72QKG5N2.mjs +0 -2
  209. package/dist/esm/chunk-72QKG5N2.mjs.map +0 -1
  210. package/dist/esm/chunk-FNFQA7NS.mjs +0 -2
  211. package/dist/esm/chunk-FNFQA7NS.mjs.map +0 -1
  212. package/dist/esm/chunk-FSTRZMCK.mjs +0 -2
  213. package/dist/esm/chunk-FSTRZMCK.mjs.map +0 -1
  214. package/dist/esm/chunk-OID45FCB.mjs +0 -2
  215. package/dist/esm/chunk-OID45FCB.mjs.map +0 -1
  216. package/dist/esm/chunk-XWVMFCW3.mjs +0 -2
  217. package/dist/esm/chunk-XWVMFCW3.mjs.map +0 -1
  218. package/dist/esm/chunk-Y5VJSCVY.mjs +0 -2
  219. package/dist/esm/chunk-Y5VJSCVY.mjs.map +0 -1
  220. package/dist/esm/chunk-ZKCSQAGW.mjs +0 -2
  221. package/dist/esm/chunk-ZKCSQAGW.mjs.map +0 -1
  222. /package/dist/esm/{chunk-MA7TL5VN.mjs.map → chunk-2CXQK6CH.mjs.map} +0 -0
  223. /package/dist/esm/{chunk-FE6CYBDF.mjs.map → chunk-34PNYV2Q.mjs.map} +0 -0
  224. /package/dist/esm/{chunk-PF54PEHF.mjs.map → chunk-35L6ZK2X.mjs.map} +0 -0
  225. /package/dist/esm/{chunk-RBIJJSGB.mjs.map → chunk-3GGG4R4C.mjs.map} +0 -0
  226. /package/dist/esm/{chunk-4R7FL2G2.mjs.map → chunk-5JTED2JJ.mjs.map} +0 -0
  227. /package/dist/esm/{chunk-4ZDOOSRJ.mjs.map → chunk-5OODQH42.mjs.map} +0 -0
  228. /package/dist/esm/{chunk-T7MGIHWV.mjs.map → chunk-6R3ZHOGL.mjs.map} +0 -0
  229. /package/dist/esm/{chunk-7F7AIMGB.mjs.map → chunk-76IW7XM5.mjs.map} +0 -0
  230. /package/dist/esm/{chunk-IZ7OGJBY.mjs.map → chunk-7JWCIWJ3.mjs.map} +0 -0
  231. /package/dist/esm/{chunk-K7OBPPSF.mjs.map → chunk-7VIABVKU.mjs.map} +0 -0
  232. /package/dist/esm/{chunk-VA4HKHNV.mjs.map → chunk-7WPECE2S.mjs.map} +0 -0
  233. /package/dist/esm/{chunk-B4ROOQE3.mjs.map → chunk-BP7JPCSW.mjs.map} +0 -0
  234. /package/dist/esm/{chunk-NJ2IXXY2.mjs.map → chunk-CZ6UX5WZ.mjs.map} +0 -0
  235. /package/dist/esm/{chunk-BQ7OOQRE.mjs.map → chunk-DPZO54DD.mjs.map} +0 -0
  236. /package/dist/esm/{chunk-IR6L77JS.mjs.map → chunk-E67RGLPK.mjs.map} +0 -0
  237. /package/dist/esm/{chunk-QLKTSSVC.mjs.map → chunk-EAWQ4SD3.mjs.map} +0 -0
  238. /package/dist/esm/{chunk-ZE2TCKUL.mjs.map → chunk-EFJCV23R.mjs.map} +0 -0
  239. /package/dist/esm/{chunk-Y5AY3QBY.mjs.map → chunk-EMVWSYK5.mjs.map} +0 -0
  240. /package/dist/esm/{chunk-BDD6OBUV.mjs.map → chunk-EV5QBTUM.mjs.map} +0 -0
  241. /package/dist/esm/{chunk-QUMSKIYX.mjs.map → chunk-F3RBTS5V.mjs.map} +0 -0
  242. /package/dist/esm/{chunk-NC3KKAAK.mjs.map → chunk-FDFE5GY2.mjs.map} +0 -0
  243. /package/dist/esm/{chunk-WPYVWZQS.mjs.map → chunk-G5MGSV7Y.mjs.map} +0 -0
  244. /package/dist/esm/{chunk-X2QSDREG.mjs.map → chunk-GFUP6W3X.mjs.map} +0 -0
  245. /package/dist/esm/{chunk-V3NKDUY5.mjs.map → chunk-GY7ARJNT.mjs.map} +0 -0
  246. /package/dist/esm/{chunk-ME2PENQD.mjs.map → chunk-HKLJ6JKE.mjs.map} +0 -0
  247. /package/dist/esm/{chunk-PIUICROW.mjs.map → chunk-HKMG3LZX.mjs.map} +0 -0
  248. /package/dist/esm/{chunk-L7FA4ISG.mjs.map → chunk-HWX6AJJ2.mjs.map} +0 -0
  249. /package/dist/esm/{chunk-ODYVU346.mjs.map → chunk-HXYBTLQT.mjs.map} +0 -0
  250. /package/dist/esm/{chunk-DAEUQBVZ.mjs.map → chunk-IDYCJIHI.mjs.map} +0 -0
  251. /package/dist/esm/{chunk-GP3RTNYN.mjs.map → chunk-INZXND6M.mjs.map} +0 -0
  252. /package/dist/esm/{chunk-UY4EIN3P.mjs.map → chunk-ISUHNAU4.mjs.map} +0 -0
  253. /package/dist/esm/{chunk-D6DCZULX.mjs.map → chunk-JBCUGFGG.mjs.map} +0 -0
  254. /package/dist/esm/{chunk-243IMA3Y.mjs.map → chunk-JCQYD2ZQ.mjs.map} +0 -0
  255. /package/dist/esm/{chunk-RZKLIZ2D.mjs.map → chunk-KLD5S3J2.mjs.map} +0 -0
  256. /package/dist/esm/{chunk-2SGICMXB.mjs.map → chunk-LKA54RAP.mjs.map} +0 -0
  257. /package/dist/esm/{chunk-IUAAMX5V.mjs.map → chunk-M74WIV66.mjs.map} +0 -0
  258. /package/dist/esm/{chunk-J26STL4T.mjs.map → chunk-METR6A53.mjs.map} +0 -0
  259. /package/dist/esm/{chunk-PDOQLTXA.mjs.map → chunk-MULJ2GLJ.mjs.map} +0 -0
  260. /package/dist/esm/{chunk-4FMAPHUM.mjs.map → chunk-NAHOALKG.mjs.map} +0 -0
  261. /package/dist/esm/{chunk-D6QSRB4J.mjs.map → chunk-NLJ5MHA5.mjs.map} +0 -0
  262. /package/dist/esm/{chunk-ES5Z33UX.mjs.map → chunk-NSEC2KVP.mjs.map} +0 -0
  263. /package/dist/esm/{chunk-J4KAYDPB.mjs.map → chunk-NWOMSL6K.mjs.map} +0 -0
  264. /package/dist/esm/{chunk-YEISKUKC.mjs.map → chunk-OGOWKEMD.mjs.map} +0 -0
  265. /package/dist/esm/{chunk-FAFN34ZH.mjs.map → chunk-PYLB6CAF.mjs.map} +0 -0
  266. /package/dist/esm/{chunk-J6NLU6QX.mjs.map → chunk-QRN6BG2N.mjs.map} +0 -0
  267. /package/dist/esm/{chunk-GBZOWPC6.mjs.map → chunk-SUJLWCRN.mjs.map} +0 -0
  268. /package/dist/esm/{chunk-5OR2POPO.mjs.map → chunk-TDCS6MMG.mjs.map} +0 -0
  269. /package/dist/esm/{chunk-F435LQUS.mjs.map → chunk-UEP4UQS5.mjs.map} +0 -0
  270. /package/dist/esm/{chunk-3JFX3XDA.mjs.map → chunk-UNMUX5HS.mjs.map} +0 -0
  271. /package/dist/esm/{chunk-EMFVGL2Y.mjs.map → chunk-UWPO7WWS.mjs.map} +0 -0
  272. /package/dist/esm/{chunk-FRUEQTCC.mjs.map → chunk-V3OYNKY5.mjs.map} +0 -0
  273. /package/dist/esm/{chunk-T7WBGP37.mjs.map → chunk-V75UHXGZ.mjs.map} +0 -0
  274. /package/dist/esm/{chunk-OUAQKVIC.mjs.map → chunk-VL6JZUYX.mjs.map} +0 -0
  275. /package/dist/esm/{chunk-MG3T24A3.mjs.map → chunk-WMBECPK5.mjs.map} +0 -0
  276. /package/dist/esm/{chunk-ZMFVKUFD.mjs.map → chunk-WMHYIP3S.mjs.map} +0 -0
  277. /package/dist/esm/{chunk-FZ3HMVKE.mjs.map → chunk-WRRQ7L5K.mjs.map} +0 -0
  278. /package/dist/esm/{chunk-BQIT7TKM.mjs.map → chunk-XJI57J4Q.mjs.map} +0 -0
  279. /package/dist/esm/{chunk-OBKVMO7I.mjs.map → chunk-XNSOEUH7.mjs.map} +0 -0
  280. /package/dist/esm/{chunk-3CB53WTP.mjs.map → chunk-XSNOPUMC.mjs.map} +0 -0
  281. /package/dist/esm/{chunk-BEXHZ5XT.mjs.map → chunk-XUT73RUR.mjs.map} +0 -0
  282. /package/dist/esm/{chunk-ZHNCJSXO.mjs.map → chunk-YB5DCDJY.mjs.map} +0 -0
  283. /package/dist/esm/{chunk-BFRFAX5I.mjs.map → chunk-YDZBU2DJ.mjs.map} +0 -0
  284. /package/dist/esm/{chunk-T52HPGL5.mjs.map → chunk-YZWR7OV5.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-OBKVMO7I.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-J26STL4T.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-72QKG5N2.mjs";import"../../chunk-MG3T24A3.mjs";import"../../chunk-FRUEQTCC.mjs";import"../../chunk-J4KAYDPB.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-IR6L77JS.mjs";import"../../chunk-IZ7OGJBY.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-ES5Z33UX.mjs";import"../../chunk-VA4HKHNV.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-RZKLIZ2D.mjs";import"../../chunk-2SGICMXB.mjs";import"../../chunk-Y5AY3QBY.mjs";import"../../chunk-B4ROOQE3.mjs";import"../../chunk-BEXHZ5XT.mjs";import"../../chunk-YTQVMLFD.mjs";import"../../chunk-YEISKUKC.mjs";import"../../chunk-4R7FL2G2.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-PIUICROW.mjs";import"../../chunk-NJ2IXXY2.mjs";import"../../chunk-PDOQLTXA.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-V3NKDUY5.mjs";import"../../chunk-UY4EIN3P.mjs";import"../../chunk-ZMFVKUFD.mjs";import"../../chunk-GP3RTNYN.mjs";import"../../chunk-GBZOWPC6.mjs";import"../../chunk-BOYYQAB4.mjs";import"../../chunk-BFRFAX5I.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-RBIJJSGB.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-FZ3HMVKE.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-EMFVGL2Y.mjs";import"../../chunk-BDD6OBUV.mjs";import"../../chunk-FSTRZMCK.mjs";import"../../chunk-OID45FCB.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-XWVMFCW3.mjs";import"../../chunk-T52HPGL5.mjs";import"../../chunk-6WAXFWLH.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-WPYVWZQS.mjs";import"../../chunk-WSE653RS.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-ZHNCJSXO.mjs";import"../../chunk-IUAAMX5V.mjs";import"../../chunk-D6QSRB4J.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-WV5AD4IE.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-KMJ6TF6Y.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-DZXM2MQY.mjs";import"../../chunk-TDGQGILY.mjs";import"../../chunk-2BJ23DXY.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-L36ZHC7J.mjs";import"../../chunk-2M45ESQN.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
1
+ import{a}from"../../chunk-XNSOEUH7.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-METR6A53.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-C4RTKCIA.mjs";import"../../chunk-WMBECPK5.mjs";import"../../chunk-V3OYNKY5.mjs";import"../../chunk-NWOMSL6K.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-E67RGLPK.mjs";import"../../chunk-7JWCIWJ3.mjs";import"../../chunk-NSEC2KVP.mjs";import"../../chunk-7WPECE2S.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-KLD5S3J2.mjs";import"../../chunk-LKA54RAP.mjs";import"../../chunk-EMVWSYK5.mjs";import"../../chunk-BP7JPCSW.mjs";import"../../chunk-XUT73RUR.mjs";import"../../chunk-YTQVMLFD.mjs";import"../../chunk-OGOWKEMD.mjs";import"../../chunk-5JTED2JJ.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-ISUHNAU4.mjs";import"../../chunk-HKMG3LZX.mjs";import"../../chunk-CZ6UX5WZ.mjs";import"../../chunk-MULJ2GLJ.mjs";import"../../chunk-WMHYIP3S.mjs";import"../../chunk-INZXND6M.mjs";import"../../chunk-SUJLWCRN.mjs";import"../../chunk-YDZBU2DJ.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-GY7ARJNT.mjs";import"../../chunk-BOYYQAB4.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-3GGG4R4C.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-WRRQ7L5K.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-UWPO7WWS.mjs";import"../../chunk-EV5QBTUM.mjs";import"../../chunk-P2TDGITN.mjs";import"../../chunk-O4BBULNE.mjs";import"../../chunk-W7MX6GBC.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-YZWR7OV5.mjs";import"../../chunk-Q7MD4V7H.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-G5MGSV7Y.mjs";import"../../chunk-OHRL766V.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-YB5DCDJY.mjs";import"../../chunk-M74WIV66.mjs";import"../../chunk-NLJ5MHA5.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-WV5AD4IE.mjs";import"../../chunk-TDGQGILY.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-L36ZHC7J.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-KMJ6TF6Y.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-2BJ23DXY.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-DZXM2MQY.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-AZRXSMC2.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
2
2
  //# sourceMappingURL=simulate.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-OUAQKVIC.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-J26STL4T.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-72QKG5N2.mjs";import"../../chunk-MG3T24A3.mjs";import"../../chunk-FRUEQTCC.mjs";import"../../chunk-J4KAYDPB.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-IR6L77JS.mjs";import"../../chunk-IZ7OGJBY.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-ES5Z33UX.mjs";import"../../chunk-VA4HKHNV.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-RZKLIZ2D.mjs";import"../../chunk-2SGICMXB.mjs";import"../../chunk-Y5AY3QBY.mjs";import"../../chunk-B4ROOQE3.mjs";import"../../chunk-BEXHZ5XT.mjs";import"../../chunk-YTQVMLFD.mjs";import"../../chunk-YEISKUKC.mjs";import"../../chunk-4R7FL2G2.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-PIUICROW.mjs";import"../../chunk-NJ2IXXY2.mjs";import"../../chunk-PDOQLTXA.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-V3NKDUY5.mjs";import"../../chunk-UY4EIN3P.mjs";import"../../chunk-ZMFVKUFD.mjs";import"../../chunk-GP3RTNYN.mjs";import"../../chunk-GBZOWPC6.mjs";import"../../chunk-BOYYQAB4.mjs";import"../../chunk-BFRFAX5I.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-RBIJJSGB.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-FZ3HMVKE.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-EMFVGL2Y.mjs";import"../../chunk-BDD6OBUV.mjs";import"../../chunk-FSTRZMCK.mjs";import"../../chunk-OID45FCB.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-XWVMFCW3.mjs";import"../../chunk-T52HPGL5.mjs";import"../../chunk-6WAXFWLH.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-WPYVWZQS.mjs";import"../../chunk-WSE653RS.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-ZHNCJSXO.mjs";import"../../chunk-IUAAMX5V.mjs";import"../../chunk-D6QSRB4J.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-WV5AD4IE.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-KMJ6TF6Y.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-DZXM2MQY.mjs";import"../../chunk-TDGQGILY.mjs";import"../../chunk-2BJ23DXY.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-L36ZHC7J.mjs";import"../../chunk-2M45ESQN.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
1
+ import{a}from"../../chunk-VL6JZUYX.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-METR6A53.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-JXCZTOYC.mjs";import"../../chunk-C4RTKCIA.mjs";import"../../chunk-WMBECPK5.mjs";import"../../chunk-V3OYNKY5.mjs";import"../../chunk-NWOMSL6K.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-E67RGLPK.mjs";import"../../chunk-7JWCIWJ3.mjs";import"../../chunk-NSEC2KVP.mjs";import"../../chunk-7WPECE2S.mjs";import"../../chunk-VHNX2NUR.mjs";import"../../chunk-7Z6DYLCA.mjs";import"../../chunk-KLD5S3J2.mjs";import"../../chunk-LKA54RAP.mjs";import"../../chunk-EMVWSYK5.mjs";import"../../chunk-BP7JPCSW.mjs";import"../../chunk-XUT73RUR.mjs";import"../../chunk-YTQVMLFD.mjs";import"../../chunk-OGOWKEMD.mjs";import"../../chunk-5JTED2JJ.mjs";import"../../chunk-4NMDYPUD.mjs";import"../../chunk-ISUHNAU4.mjs";import"../../chunk-HKMG3LZX.mjs";import"../../chunk-CZ6UX5WZ.mjs";import"../../chunk-MULJ2GLJ.mjs";import"../../chunk-WMHYIP3S.mjs";import"../../chunk-INZXND6M.mjs";import"../../chunk-SUJLWCRN.mjs";import"../../chunk-YDZBU2DJ.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-GY7ARJNT.mjs";import"../../chunk-BOYYQAB4.mjs";import"../../chunk-YUNDX5I7.mjs";import"../../chunk-3GGG4R4C.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-NECL5FCQ.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-WRRQ7L5K.mjs";import"../../chunk-AQ4I7VVB.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-UWPO7WWS.mjs";import"../../chunk-EV5QBTUM.mjs";import"../../chunk-P2TDGITN.mjs";import"../../chunk-O4BBULNE.mjs";import"../../chunk-W7MX6GBC.mjs";import"../../chunk-MQGW234H.mjs";import"../../chunk-YZWR7OV5.mjs";import"../../chunk-Q7MD4V7H.mjs";import"../../chunk-76OH2Z4Q.mjs";import"../../chunk-MLDQ2TY2.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-IVVWQKCF.mjs";import"../../chunk-G5MGSV7Y.mjs";import"../../chunk-OHRL766V.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-YB5DCDJY.mjs";import"../../chunk-M74WIV66.mjs";import"../../chunk-NLJ5MHA5.mjs";import"../../chunk-GED6IT3S.mjs";import"../../chunk-WV5AD4IE.mjs";import"../../chunk-TDGQGILY.mjs";import"../../chunk-SCHZ67F3.mjs";import"../../chunk-L36ZHC7J.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-KMJ6TF6Y.mjs";import"../../chunk-P5V7OZNN.mjs";import"../../chunk-H6YNXJNF.mjs";import"../../chunk-YPHH6CAO.mjs";import"../../chunk-2BJ23DXY.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-DZXM2MQY.mjs";import"../../chunk-A63SMUOU.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-AZRXSMC2.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
2
2
  //# sourceMappingURL=submit.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-ODYVU346.mjs";import"../chunk-ES5Z33UX.mjs";import"../chunk-VA4HKHNV.mjs";import"../chunk-VHNX2NUR.mjs";import"../chunk-YTQVMLFD.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-ZHNCJSXO.mjs";import"../chunk-IUAAMX5V.mjs";import"../chunk-D6QSRB4J.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-WV5AD4IE.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-P5V7OZNN.mjs";import"../chunk-H6YNXJNF.mjs";import"../chunk-KMJ6TF6Y.mjs";import"../chunk-YPHH6CAO.mjs";import"../chunk-DZXM2MQY.mjs";import"../chunk-TDGQGILY.mjs";import"../chunk-2BJ23DXY.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-A63SMUOU.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-SCHZ67F3.mjs";import"../chunk-L36ZHC7J.mjs";import"../chunk-2M45ESQN.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
1
+ import{a}from"../chunk-HXYBTLQT.mjs";import"../chunk-NSEC2KVP.mjs";import"../chunk-7WPECE2S.mjs";import"../chunk-VHNX2NUR.mjs";import"../chunk-YTQVMLFD.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-YB5DCDJY.mjs";import"../chunk-M74WIV66.mjs";import"../chunk-NLJ5MHA5.mjs";import"../chunk-GED6IT3S.mjs";import"../chunk-WV5AD4IE.mjs";import"../chunk-TDGQGILY.mjs";import"../chunk-SCHZ67F3.mjs";import"../chunk-L36ZHC7J.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-KMJ6TF6Y.mjs";import"../chunk-P5V7OZNN.mjs";import"../chunk-H6YNXJNF.mjs";import"../chunk-YPHH6CAO.mjs";import"../chunk-2BJ23DXY.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-DZXM2MQY.mjs";import"../chunk-A63SMUOU.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-AZRXSMC2.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
2
2
  //# sourceMappingURL=utils.mjs.map
@@ -1,2 +1,2 @@
1
- import"../chunk-FZY4PMEE.mjs";import{a as h}from"../chunk-P5V7OZNN.mjs";import{a as g}from"../chunk-H6YNXJNF.mjs";import{a as p,b as q,c as r}from"../chunk-KMJ6TF6Y.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-YPHH6CAO.mjs";import{a}from"../chunk-DZXM2MQY.mjs";import"../chunk-2BJ23DXY.mjs";import"../chunk-4WPQQPUF.mjs";import{a as b,b as c,c as d,d as e,e as f}from"../chunk-A63SMUOU.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{i as Bool,a as Deserializer,h as EntryFunctionBytes,g as FixedBytes,r as MoveOption,q as MoveString,p as MoveVector,b as Serializable,c as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,d as ensureBoolean,e as outOfRangeErrorMessage,f as validateNumberInRange};
1
+ import"../chunk-FZY4PMEE.mjs";import{a as p,b as q,c as r}from"../chunk-KMJ6TF6Y.mjs";import{a as h}from"../chunk-P5V7OZNN.mjs";import{a as g}from"../chunk-H6YNXJNF.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-YPHH6CAO.mjs";import"../chunk-2BJ23DXY.mjs";import"../chunk-4WPQQPUF.mjs";import{a}from"../chunk-DZXM2MQY.mjs";import{a as b,b as c,c as d,d as e,e as f}from"../chunk-A63SMUOU.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{i as Bool,a as Deserializer,h as EntryFunctionBytes,g as FixedBytes,r as MoveOption,q as MoveString,p as MoveVector,b as Serializable,c as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,d as ensureBoolean,e as outOfRangeErrorMessage,f as validateNumberInRange};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as n}from"./chunk-VA4HKHNV.mjs";import{o as g,t as d}from"./chunk-VHNX2NUR.mjs";import{b as s}from"./chunk-WSE653RS.mjs";async function m(e){let{aptosConfig:t,poolAddress:o}=e,r=s.from(o).toStringLong(),i=await n({aptosConfig:t,query:{query:d,variables:{where_condition:{pool_address:{_eq:r}}}}});return i.num_active_delegator_per_pool[0]?i.num_active_delegator_per_pool[0].num_active_delegator:0}async function f(e){let{aptosConfig:t,options:o}=e,r={query:d,variables:{order_by:o?.orderBy}};return(await n({aptosConfig:t,query:r})).num_active_delegator_per_pool}async function A(e){let{aptosConfig:t,delegatorAddress:o,poolAddress:r}=e,a={query:g,variables:{delegatorAddress:s.from(o).toStringLong(),poolAddress:s.from(r).toStringLong()}};return(await n({aptosConfig:t,query:a})).delegated_staking_activities}export{m as a,f as b,A as c};
2
- //# sourceMappingURL=chunk-MA7TL5VN.mjs.map
1
+ import{c as n}from"./chunk-7WPECE2S.mjs";import{o as g,t as d}from"./chunk-VHNX2NUR.mjs";import{b as s}from"./chunk-OHRL766V.mjs";async function m(e){let{aptosConfig:t,poolAddress:o}=e,r=s.from(o).toStringLong(),i=await n({aptosConfig:t,query:{query:d,variables:{where_condition:{pool_address:{_eq:r}}}}});return i.num_active_delegator_per_pool[0]?i.num_active_delegator_per_pool[0].num_active_delegator:0}async function f(e){let{aptosConfig:t,options:o}=e,r={query:d,variables:{order_by:o?.orderBy}};return(await n({aptosConfig:t,query:r})).num_active_delegator_per_pool}async function A(e){let{aptosConfig:t,delegatorAddress:o,poolAddress:r}=e,a={query:g,variables:{delegatorAddress:s.from(o).toStringLong(),poolAddress:s.from(r).toStringLong()}};return(await n({aptosConfig:t,query:a})).delegated_staking_activities}export{m as a,f as b,A as c};
2
+ //# sourceMappingURL=chunk-2CXQK6CH.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o,b as r,c as t,d as s}from"./chunk-PF54PEHF.mjs";import{a as n}from"./chunk-ODYVU346.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-FE6CYBDF.mjs.map
1
+ import{a as o,b as r,c as t,d as s}from"./chunk-35L6ZK2X.mjs";import{a as n}from"./chunk-HXYBTLQT.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-34PNYV2Q.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as d}from"./chunk-VA4HKHNV.mjs";import{p as c}from"./chunk-VHNX2NUR.mjs";import{b as i}from"./chunk-WSE653RS.mjs";var a=300,u=t=>{if(t&&t.length>a)throw new Error(`Event type length exceeds the maximum length of ${a}`)};async function m(t){let{aptosConfig:o,eventType:e,options:n}=t;return p({aptosConfig:o,options:{...n,where:{account_address:{_eq:"0x0000000000000000000000000000000000000000000000000000000000000000"},creation_number:{_eq:"0"},sequence_number:{_eq:"0"},indexed_type:{_eq:e}}}})}async function f(t){let{accountAddress:o,aptosConfig:e,creationNumber:n,options:s}=t,r={account_address:{_eq:i.from(o).toStringLong()},creation_number:{_eq:n}};return p({aptosConfig:e,options:{...s,where:r}})}async function _(t){let{accountAddress:o,aptosConfig:e,eventType:n,options:s}=t,r={account_address:{_eq:i.from(o).toStringLong()},indexed_type:{_eq:n}};return p({aptosConfig:e,options:{...s,where:r}})}async function p(t){let{aptosConfig:o,options:e}=t;u(e?.where?.indexed_type?._eq);let n={query:c,variables:{where_condition:e?.where,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await d({aptosConfig:o,query:n,originMethod:"getEvents"})).events}export{m as a,f as b,_ as c,p as d};
2
- //# sourceMappingURL=chunk-PF54PEHF.mjs.map
1
+ import{c as d}from"./chunk-7WPECE2S.mjs";import{p as c}from"./chunk-VHNX2NUR.mjs";import{b as i}from"./chunk-OHRL766V.mjs";var a=300,u=t=>{if(t&&t.length>a)throw new Error(`Event type length exceeds the maximum length of ${a}`)};async function m(t){let{aptosConfig:o,eventType:e,options:n}=t;return p({aptosConfig:o,options:{...n,where:{account_address:{_eq:"0x0000000000000000000000000000000000000000000000000000000000000000"},creation_number:{_eq:"0"},sequence_number:{_eq:"0"},indexed_type:{_eq:e}}}})}async function f(t){let{accountAddress:o,aptosConfig:e,creationNumber:n,options:s}=t,r={account_address:{_eq:i.from(o).toStringLong()},creation_number:{_eq:n}};return p({aptosConfig:e,options:{...s,where:r}})}async function _(t){let{accountAddress:o,aptosConfig:e,eventType:n,options:s}=t,r={account_address:{_eq:i.from(o).toStringLong()},indexed_type:{_eq:n}};return p({aptosConfig:e,options:{...s,where:r}})}async function p(t){let{aptosConfig:o,options:e}=t;u(e?.where?.indexed_type?._eq);let n={query:c,variables:{where_condition:e?.where,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await d({aptosConfig:o,query:n,originMethod:"getEvents"})).events}export{m as a,f as b,_ as c,p as d};
2
+ //# sourceMappingURL=chunk-35L6ZK2X.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d,b}from"./chunk-EMFVGL2Y.mjs";import{a as h,b as z}from"./chunk-BDD6OBUV.mjs";import{a as p,b as g}from"./chunk-FSTRZMCK.mjs";import{a as o,c as y}from"./chunk-6WAXFWLH.mjs";import{a as c}from"./chunk-A63SMUOU.mjs";var r=class extends c{static deserialize(i){let e=i.deserializeUleb128AsU32();switch(e){case 0:return u.load(i);case 1:return l.load(i);case 2:return n.load(i);case 3:return a.load(i);default:throw new Error(`Unknown variant index for AccountAuthenticator: ${e}`)}}isEd25519(){return this instanceof u}isMultiEd25519(){return this instanceof l}isSingleKey(){return this instanceof n}isMultiKey(){return this instanceof a}},u=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(0),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=o.deserialize(i),s=y.deserialize(i);return new t(e,s)}},l=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(1),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=d.deserialize(i),s=b.deserialize(i);return new t(e,s)}},n=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(2),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=p.deserialize(i),s=g.deserialize(i);return new t(e,s)}},a=class t extends r{constructor(i,e){super(),this.public_keys=i,this.signatures=e}serialize(i){i.serializeU32AsUleb128(3),this.public_keys.serialize(i),this.signatures.serialize(i)}static load(i){let e=h.deserialize(i),s=z.deserialize(i);return new t(e,s)}};export{r as a,u as b,l as c,n as d,a as e};
2
- //# sourceMappingURL=chunk-RBIJJSGB.mjs.map
1
+ import{a as d,b}from"./chunk-UWPO7WWS.mjs";import{a as h,b as z}from"./chunk-EV5QBTUM.mjs";import{a as p,b as g}from"./chunk-P2TDGITN.mjs";import{b as o,d as y}from"./chunk-Q7MD4V7H.mjs";import{a as c}from"./chunk-A63SMUOU.mjs";var r=class extends c{static deserialize(i){let e=i.deserializeUleb128AsU32();switch(e){case 0:return u.load(i);case 1:return l.load(i);case 2:return n.load(i);case 3:return a.load(i);default:throw new Error(`Unknown variant index for AccountAuthenticator: ${e}`)}}isEd25519(){return this instanceof u}isMultiEd25519(){return this instanceof l}isSingleKey(){return this instanceof n}isMultiKey(){return this instanceof a}},u=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(0),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=o.deserialize(i),s=y.deserialize(i);return new t(e,s)}},l=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(1),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=d.deserialize(i),s=b.deserialize(i);return new t(e,s)}},n=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(2),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=p.deserialize(i),s=g.deserialize(i);return new t(e,s)}},a=class t extends r{constructor(i,e){super(),this.public_keys=i,this.signatures=e}serialize(i){i.serializeU32AsUleb128(3),this.public_keys.serialize(i),this.signatures.serialize(i)}static load(i){let e=h.deserialize(i),s=z.deserialize(i);return new t(e,s)}};export{r as a,u as b,l as c,n as d,a as e};
2
+ //# sourceMappingURL=chunk-3GGG4R4C.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as T,d as c}from"./chunk-ZMFVKUFD.mjs";import{f as A,g as a}from"./chunk-L36ZHC7J.mjs";import{sha3_256 as y}from"@noble/hashes/sha3";function d(e){return e.feePayerAddress?new c(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress):e.secondarySignerAddresses?new T(e.rawTransaction,e.secondarySignerAddresses):e.rawTransaction}function n(e,r){let i=y.create();if(!r.startsWith("APTOS::"))throw new Error(`Domain separator needs to start with 'APTOS::'. Provided - ${r}`);i.update(r);let s=i.digest(),o=e,t=new Uint8Array(s.length+o.length);return t.set(s),t.set(o,s.length),t}function u(e){return n(e.bcsToBytes(),`APTOS::${e.constructor.name}`)}function S(e){let r=d(e);return e.feePayerAddress?n(r.bcsToBytes(),a):e.secondarySignerAddresses?n(r.bcsToBytes(),a):n(r.bcsToBytes(),A)}export{d as a,n as b,u as c,S as d};
2
- //# sourceMappingURL=chunk-4R7FL2G2.mjs.map
1
+ import{c as T,d as c}from"./chunk-WMHYIP3S.mjs";import{f as A,g as a}from"./chunk-L36ZHC7J.mjs";import{sha3_256 as y}from"@noble/hashes/sha3";function d(e){return e.feePayerAddress?new c(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress):e.secondarySignerAddresses?new T(e.rawTransaction,e.secondarySignerAddresses):e.rawTransaction}function n(e,r){let i=y.create();if(!r.startsWith("APTOS::"))throw new Error(`Domain separator needs to start with 'APTOS::'. Provided - ${r}`);i.update(r);let s=i.digest(),o=e,t=new Uint8Array(s.length+o.length);return t.set(s),t.set(o,s.length),t}function u(e){return n(e.bcsToBytes(),`APTOS::${e.constructor.name}`)}function S(e){let r=d(e);return e.feePayerAddress?n(r.bcsToBytes(),a):e.secondarySignerAddresses?n(r.bcsToBytes(),a):n(r.bcsToBytes(),A)}export{d as a,n as b,u as c,S as d};
2
+ //# sourceMappingURL=chunk-5JTED2JJ.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as a}from"./chunk-VA4HKHNV.mjs";import{u as n}from"./chunk-VHNX2NUR.mjs";import{b as s}from"./chunk-WSE653RS.mjs";async function d(e){let{aptosConfig:o,options:t}=e,r={query:n,variables:{where_condition:t?.where,offset:t?.offset,limit:t?.limit,order_by:t?.orderBy}};return(await a({aptosConfig:o,query:r,originMethod:"getObjectData"})).current_objects}async function f(e){let{aptosConfig:o,objectAddress:t,options:r}=e,c={object_address:{_eq:s.from(t).toStringLong()}};return(await d({aptosConfig:o,options:{...r,where:c}}))[0]}export{d as a,f as b};
2
- //# sourceMappingURL=chunk-4ZDOOSRJ.mjs.map
1
+ import{c as a}from"./chunk-7WPECE2S.mjs";import{u as n}from"./chunk-VHNX2NUR.mjs";import{b as s}from"./chunk-OHRL766V.mjs";async function d(e){let{aptosConfig:o,options:t}=e,r={query:n,variables:{where_condition:t?.where,offset:t?.offset,limit:t?.limit,order_by:t?.orderBy}};return(await a({aptosConfig:o,query:r,originMethod:"getObjectData"})).current_objects}async function f(e){let{aptosConfig:o,objectAddress:t,options:r}=e,c={object_address:{_eq:s.from(t).toStringLong()}};return(await d({aptosConfig:o,options:{...r,where:c}}))[0]}export{d as a,f as b};
2
+ //# sourceMappingURL=chunk-5OODQH42.mjs.map
@@ -1,2 +1,2 @@
1
- import{g as e}from"./chunk-ES5Z33UX.mjs";import{b as s}from"./chunk-WSE653RS.mjs";import{d as c}from"./chunk-IUAAMX5V.mjs";import{d as r}from"./chunk-L36ZHC7J.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-T7MGIHWV.mjs.map
1
+ import{g as e}from"./chunk-NSEC2KVP.mjs";import{b as s}from"./chunk-OHRL766V.mjs";import{d as c}from"./chunk-M74WIV66.mjs";import{d as r}from"./chunk-L36ZHC7J.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-6R3ZHOGL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o,b as r,c as s}from"./chunk-IZ7OGJBY.mjs";import{a as t}from"./chunk-ODYVU346.mjs";var a=class{constructor(e){this.config=e}async getTableItem(e){return o({aptosConfig:this.config,...e})}async getTableItemsData(e){return await t({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),r({aptosConfig:this.config,...e})}async getTableItemsMetadata(e){return await t({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),s({aptosConfig:this.config,...e})}};export{a};
2
- //# sourceMappingURL=chunk-7F7AIMGB.mjs.map
1
+ import{a as o,b as r,c as s}from"./chunk-7JWCIWJ3.mjs";import{a as t}from"./chunk-HXYBTLQT.mjs";var a=class{constructor(e){this.config=e}async getTableItem(e){return o({aptosConfig:this.config,...e})}async getTableItemsData(e){return await t({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),r({aptosConfig:this.config,...e})}async getTableItemsMetadata(e){return await t({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),s({aptosConfig:this.config,...e})}};export{a};
2
+ //# sourceMappingURL=chunk-76IW7XM5.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as s}from"./chunk-VA4HKHNV.mjs";import{w as i,x as m}from"./chunk-VHNX2NUR.mjs";import{b as n}from"./chunk-IUAAMX5V.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-IZ7OGJBY.mjs.map
1
+ import{c as s}from"./chunk-7WPECE2S.mjs";import{w as i,x as m}from"./chunk-VHNX2NUR.mjs";import{b as n}from"./chunk-M74WIV66.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-7JWCIWJ3.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as i}from"./chunk-YTQVMLFD.mjs";import{spawn as n}from"child_process";import l from"tree-kill";import{platform as p}from"os";var c=class{constructor(){this.MAXIMUM_WAIT_TIME_SEC=75;this.READINESS_ENDPOINT="http://127.0.0.1:8070/";this.process=null}async stop(){await new Promise((t,s)=>{this.process?.pid&&l(this.process.pid,r=>{r?s(r):t(!0)})})}async run(){await this.checkIfProcessIsUp()||(this.start(),await this.waitUntilProcessIsUp())}start(){let t="npx",s=["aptos","node","run-localnet","--force-restart","--assume-yes","--with-indexer-api"],r=p(),e;r==="win32"?e=n(t,s,{shell:!0}):e=n(t,s),this.process=e,e.stderr?.on("data",o=>{let a=o.toString();console.log(a)}),e.stdout?.on("data",o=>{let a=o.toString();console.log(a)})}async waitUntilProcessIsUp(){let t=await this.checkIfProcessIsUp(),s=Date.now()/1e3,r=s;for(;!t&&s+this.MAXIMUM_WAIT_TIME_SEC>r;)await i(1e3),t=await this.checkIfProcessIsUp(),r=Date.now()/1e3;if(!t)throw new Error("Process failed to start");return!0}async checkIfProcessIsUp(){try{return(await fetch(this.READINESS_ENDPOINT)).status===200}catch{return!1}}};export{c as a};
2
+ //# sourceMappingURL=chunk-7MYVC7NY.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/cli/localNode.ts"],"sourcesContent":["import { ChildProcessWithoutNullStreams, spawn } from \"child_process\";\nimport kill from \"tree-kill\";\nimport { platform } from \"os\";\n\nimport { sleep } from \"../utils/helpers\";\n\nexport class LocalNode {\n readonly MAXIMUM_WAIT_TIME_SEC = 75;\n\n readonly READINESS_ENDPOINT = \"http://127.0.0.1:8070/\";\n\n process: ChildProcessWithoutNullStreams | null = null;\n\n /**\n * kills all the descendent processes\n * of the node process, including the node process itself\n */\n async stop() {\n await new Promise((resolve, reject) => {\n if (!this.process?.pid) return;\n kill(this.process.pid, (err) => {\n if (err) {\n reject(err);\n } else {\n resolve(true);\n }\n });\n });\n }\n\n /**\n * Runs a local testnet and waits for process to be up.\n *\n * If local node process is already up it returns and does\n * not start the process\n */\n async run() {\n const nodeIsUp = await this.checkIfProcessIsUp();\n if (nodeIsUp) {\n return;\n }\n this.start();\n await this.waitUntilProcessIsUp();\n }\n\n /**\n * Starts the local testnet by running the aptos node run-local-testnet command\n */\n start() {\n const cliCommand = \"npx\";\n const cliArgs = [\"aptos\", \"node\", \"run-localnet\", \"--force-restart\", \"--assume-yes\", \"--with-indexer-api\"];\n\n const currentPlatform = platform();\n let childProcess;\n // Check if current OS is windows\n if (currentPlatform === \"win32\") {\n childProcess = spawn(cliCommand, cliArgs, { shell: true });\n } else {\n childProcess = spawn(cliCommand, cliArgs);\n }\n\n this.process = childProcess;\n\n childProcess.stderr?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n // eslint-disable-next-line no-console\n console.log(str);\n });\n\n childProcess.stdout?.on(\"data\", (data: any) => {\n const str = data.toString();\n // Print local node output log\n // eslint-disable-next-line no-console\n console.log(str);\n });\n }\n\n /**\n * Waits for the local testnet process to be up\n *\n * @returns Promise<boolean>\n */\n async waitUntilProcessIsUp(): Promise<boolean> {\n let operational = await this.checkIfProcessIsUp();\n const start = Date.now() / 1000;\n let last = start;\n\n while (!operational && start + this.MAXIMUM_WAIT_TIME_SEC > last) {\n // eslint-disable-next-line no-await-in-loop\n await sleep(1000);\n // eslint-disable-next-line no-await-in-loop\n operational = await this.checkIfProcessIsUp();\n last = Date.now() / 1000;\n }\n\n // If we are here it means something blocks the process to start.\n // Might worth checking if another process is running on port 8080\n if (!operational) {\n throw new Error(\"Process failed to start\");\n }\n\n return true;\n }\n\n /**\n * Checks if the local testnet is up\n *\n * @returns Promise<boolean>\n */\n async checkIfProcessIsUp(): Promise<boolean> {\n try {\n // Query readiness endpoint\n const data = await fetch(this.READINESS_ENDPOINT);\n if (data.status === 200) {\n return true;\n }\n return false;\n } catch (err: any) {\n return false;\n }\n }\n}\n"],"mappings":"yCAAA,OAAyC,SAAAA,MAAa,gBACtD,OAAOC,MAAU,YACjB,OAAS,YAAAC,MAAgB,KAIlB,IAAMC,EAAN,KAAgB,CAAhB,cACL,KAAS,sBAAwB,GAEjC,KAAS,mBAAqB,yBAE9B,aAAiD,KAMjD,MAAM,MAAO,CACX,MAAM,IAAI,QAAQ,CAACC,EAASC,IAAW,CAChC,KAAK,SAAS,KACnBC,EAAK,KAAK,QAAQ,IAAMC,GAAQ,CAC1BA,EACFF,EAAOE,CAAG,EAEVH,EAAQ,EAAI,CAEhB,CAAC,CACH,CAAC,CACH,CAQA,MAAM,KAAM,CACO,MAAM,KAAK,mBAAmB,IAI/C,KAAK,MAAM,EACX,MAAM,KAAK,qBAAqB,EAClC,CAKA,OAAQ,CACN,IAAMI,EAAa,MACbC,EAAU,CAAC,QAAS,OAAQ,eAAgB,kBAAmB,eAAgB,oBAAoB,EAEnGC,EAAkBC,EAAS,EAC7BC,EAEAF,IAAoB,QACtBE,EAAeC,EAAML,EAAYC,EAAS,CAAE,MAAO,EAAK,CAAC,EAEzDG,EAAeC,EAAML,EAAYC,CAAO,EAG1C,KAAK,QAAUG,EAEfA,EAAa,QAAQ,GAAG,OAASE,GAAc,CAC7C,IAAMC,EAAMD,EAAK,SAAS,EAG1B,QAAQ,IAAIC,CAAG,CACjB,CAAC,EAEDH,EAAa,QAAQ,GAAG,OAASE,GAAc,CAC7C,IAAMC,EAAMD,EAAK,SAAS,EAG1B,QAAQ,IAAIC,CAAG,CACjB,CAAC,CACH,CAOA,MAAM,sBAAyC,CAC7C,IAAIC,EAAc,MAAM,KAAK,mBAAmB,EAC1CC,EAAQ,KAAK,IAAI,EAAI,IACvBC,EAAOD,EAEX,KAAO,CAACD,GAAeC,EAAQ,KAAK,sBAAwBC,GAE1D,MAAMC,EAAM,GAAI,EAEhBH,EAAc,MAAM,KAAK,mBAAmB,EAC5CE,EAAO,KAAK,IAAI,EAAI,IAKtB,GAAI,CAACF,EACH,MAAM,IAAI,MAAM,yBAAyB,EAG3C,MAAO,EACT,CAOA,MAAM,oBAAuC,CAC3C,GAAI,CAGF,OADa,MAAM,MAAM,KAAK,kBAAkB,GACvC,SAAW,GAItB,MAAmB,CACjB,MAAO,EACT,CACF,CACF","names":["spawn","kill","platform","LocalNode","resolve","reject","kill","err","cliCommand","cliArgs","currentPlatform","platform","childProcess","spawn","data","str","operational","start","last","sleep"]}
@@ -1,2 +1,2 @@
1
- import{a as t,b as n,c as o,d as r}from"./chunk-ME2PENQD.mjs";import{a as s}from"./chunk-ODYVU346.mjs";import{b as i}from"./chunk-WSE653RS.mjs";var a=class{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),t({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),(await t({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetMetadataByCreatorAddress(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),await t({aptosConfig:this.config,options:{where:{creator_address:{_eq:i.from(e.creatorAddress).toStringLong()}}}})}async getFungibleAssetActivities(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),n({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),o({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return r({aptosConfig:this.config,...e})}};export{a};
2
- //# sourceMappingURL=chunk-K7OBPPSF.mjs.map
1
+ import{a as t,b as n,c as o,d as r}from"./chunk-HKLJ6JKE.mjs";import{a as s}from"./chunk-HXYBTLQT.mjs";import{b as i}from"./chunk-OHRL766V.mjs";var a=class{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),t({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),(await t({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetMetadataByCreatorAddress(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),await t({aptosConfig:this.config,options:{where:{creator_address:{_eq:i.from(e.creatorAddress).toStringLong()}}}})}async getFungibleAssetActivities(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),n({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),o({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return r({aptosConfig:this.config,...e})}};export{a};
2
+ //# sourceMappingURL=chunk-7VIABVKU.mjs.map
@@ -1,2 +1,2 @@
1
- import{l as c,v as n}from"./chunk-VHNX2NUR.mjs";import{b as i}from"./chunk-ZHNCJSXO.mjs";import{c as p}from"./chunk-IUAAMX5V.mjs";async function d(o){let{aptosConfig:s}=o,{data:e}=await i({aptosConfig:s,originMethod:"getLedgerInfo",path:""});return e}async function C(o){let{aptosConfig:s,limit:e}=o;return(await a({aptosConfig:s,query:{query:c,variables:{limit:e}},originMethod:"getChainTopUserTransactions"})).user_transactions}async function a(o){let{aptosConfig:s,query:e,originMethod:t}=o,{data:r}=await p({aptosConfig:s,originMethod:t??"queryIndexer",path:"",body:e,overrides:{WITH_CREDENTIALS:!1}});return r}async function u(o){let{aptosConfig:s}=o;return(await a({aptosConfig:s,query:{query:n},originMethod:"getProcessorStatuses"})).processor_status}async function h(o){let s=await u({aptosConfig:o.aptosConfig});return BigInt(s[0].last_success_version)}async function T(o){let{aptosConfig:s,processorType:e}=o;return(await a({aptosConfig:s,query:{query:n,variables:{where_condition:{processor:{_eq:e}}}},originMethod:"getProcessorStatus"})).processor_status[0]}export{d as a,C as b,a as c,u as d,h as e,T as f};
2
- //# sourceMappingURL=chunk-VA4HKHNV.mjs.map
1
+ import{l as c,v as n}from"./chunk-VHNX2NUR.mjs";import{b as i}from"./chunk-YB5DCDJY.mjs";import{c as p}from"./chunk-M74WIV66.mjs";async function d(o){let{aptosConfig:s}=o,{data:e}=await i({aptosConfig:s,originMethod:"getLedgerInfo",path:""});return e}async function C(o){let{aptosConfig:s,limit:e}=o;return(await a({aptosConfig:s,query:{query:c,variables:{limit:e}},originMethod:"getChainTopUserTransactions"})).user_transactions}async function a(o){let{aptosConfig:s,query:e,originMethod:t}=o,{data:r}=await p({aptosConfig:s,originMethod:t??"queryIndexer",path:"",body:e,overrides:{WITH_CREDENTIALS:!1}});return r}async function u(o){let{aptosConfig:s}=o;return(await a({aptosConfig:s,query:{query:n},originMethod:"getProcessorStatuses"})).processor_status}async function h(o){let s=await u({aptosConfig:o.aptosConfig});return BigInt(s[0].last_success_version)}async function T(o){let{aptosConfig:s,processorType:e}=o;return(await a({aptosConfig:s,query:{query:n,variables:{where_condition:{processor:{_eq:e}}}},originMethod:"getProcessorStatus"})).processor_status[0]}export{d as a,C as b,a as c,u as d,h as e,T as f};
2
+ //# sourceMappingURL=chunk-7WPECE2S.mjs.map
@@ -0,0 +1,2 @@
1
+ var o="1.25.0";export{o as a};
2
+ //# sourceMappingURL=chunk-AZRXSMC2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.23.0\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
1
+ {"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.25.0\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
@@ -1,2 +1,2 @@
1
- import{a as T}from"./chunk-BEXHZ5XT.mjs";import{d as v}from"./chunk-YTQVMLFD.mjs";import{a as b,b as x}from"./chunk-4R7FL2G2.mjs";import{d as g}from"./chunk-RBIJJSGB.mjs";import{a as y,b as m}from"./chunk-FSTRZMCK.mjs";import{i as A,j as F,k as E,n as f}from"./chunk-OID45FCB.mjs";import{b as S}from"./chunk-WSE653RS.mjs";import{a as w}from"./chunk-DZXM2MQY.mjs";import{a as d}from"./chunk-A63SMUOU.mjs";import{b as K}from"./chunk-BCUSI3N6.mjs";import{jwtDecode as z}from"jwt-decode";import Z from"eventemitter3";var o=class o extends d{constructor(e){super();let{address:r,ephemeralKeyPair:t,uidKey:i,uidVal:a,aud:c,pepper:p,proof:n,proofFetchCallback:s,jwt:l}=e;if(this.ephemeralKeyPair=t,this.publicKey=A.create(e),this.accountAddress=r?S.from(r):this.publicKey.authKey().derivedAddress(),this.uidKey=i,this.uidVal=a,this.aud=c,this.jwt=l,this.emitter=new Z,this.proofOrPromise=n,n instanceof f)this.proof=n;else{if(s===void 0)throw new Error("Must provide callback for async proof fetch");this.emitter.on("proofFetchFinish",async u=>{await s(u),this.emitter.removeAllListeners()}),this.init(n)}this.signingScheme=2;let h=K.fromHexInput(p).toUint8Array();if(h.length!==o.PEPPER_LENGTH)throw new Error(`Pepper length in bytes should be ${o.PEPPER_LENGTH}`);this.pepper=h}async init(e){try{this.proof=await e,this.emitter.emit("proofFetchFinish",{status:"Success"})}catch(r){r instanceof Error?this.emitter.emit("proofFetchFinish",{status:"Failed",error:r.toString()}):this.emitter.emit("proofFetchFinish",{status:"Failed",error:"Unknown"})}}serialize(e){if(e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),this.proof===void 0)throw new Error("Connot serialize - proof undefined");this.proof.serialize(e)}static deserialize(e){let r=e.deserializeStr(),t=e.deserializeStr(),i=e.deserializeFixedBytes(31),a=T.deserialize(e),c=f.deserialize(e);return o.create({proof:c,pepper:i,uidKey:t,jwt:r,ephemeralKeyPair:a})}isExpired(){return this.ephemeralKeyPair.isExpired()}signWithAuthenticator(e){let r=new m(this.sign(e)),t=new y(this.publicKey);return new g(t,r)}signTransactionWithAuthenticator(e){let r=new m(this.signTransaction(e)),t=new y(this.publicKey);return new g(t,r)}async waitForProofFetch(){this.proofOrPromise instanceof Promise&&await this.proofOrPromise}sign(e){let{expiryDateSecs:r}=this.ephemeralKeyPair;if(this.isExpired())throw new Error("EphemeralKeyPair is expired");if(this.proof===void 0)throw new Error("Proof not defined");let t=this.ephemeralKeyPair.getPublicKey(),i=this.ephemeralKeyPair.sign(e);return new F({jwtHeader:v(this.jwt.split(".")[0]),ephemeralCertificate:new E(this.proof,0),expiryDateSecs:r,ephemeralPublicKey:t,ephemeralSignature:i})}signTransaction(e){if(this.proof===void 0)throw new Error("Proof not found");let r=b(e),i=new P(r,this.proof.proof).hash();return this.sign(i)}verifySignature(e){let{message:r,signature:t}=e;return!(this.isExpired()||!this.ephemeralKeyPair.getPublicKey().verifySignature({message:r,signature:t.ephemeralSignature}))}static fromBytes(e){return o.deserialize(new w(e))}static create(e){let{address:r,proof:t,jwt:i,ephemeralKeyPair:a,pepper:c,uidKey:p="sub",proofFetchCallback:n}=e,s=z(i),l=s.iss;if(typeof s.aud!="string")throw new Error("aud was not found or an array of values");let h=s.aud,u=s[p];return new o({address:r,proof:t,ephemeralKeyPair:a,iss:l,uidKey:p,uidVal:u,aud:h,pepper:c,jwt:i,proofFetchCallback:n})}};o.PEPPER_LENGTH=31;var k=o,P=class extends d{constructor(r,t){super();this.domainSeparator="APTOS::TransactionAndProof";this.transaction=r,this.proof=t}serialize(r){r.serializeFixedBytes(this.transaction.bcsToBytes()),r.serializeOption(this.proof)}hash(){return x(this.bcsToBytes(),this.domainSeparator)}};export{k as a};
2
- //# sourceMappingURL=chunk-B4ROOQE3.mjs.map
1
+ import{a as T}from"./chunk-XUT73RUR.mjs";import{d as v}from"./chunk-YTQVMLFD.mjs";import{a as b,b as x}from"./chunk-5JTED2JJ.mjs";import{d as g}from"./chunk-3GGG4R4C.mjs";import{a as y,b as m}from"./chunk-P2TDGITN.mjs";import{i as A,j as F,k as E,n as f}from"./chunk-W7MX6GBC.mjs";import{b as S}from"./chunk-OHRL766V.mjs";import{a as w}from"./chunk-DZXM2MQY.mjs";import{a as d}from"./chunk-A63SMUOU.mjs";import{b as K}from"./chunk-BCUSI3N6.mjs";import{jwtDecode as z}from"jwt-decode";import Z from"eventemitter3";var o=class o extends d{constructor(e){super();let{address:r,ephemeralKeyPair:t,uidKey:i,uidVal:a,aud:c,pepper:p,proof:n,proofFetchCallback:s,jwt:l}=e;if(this.ephemeralKeyPair=t,this.publicKey=A.create(e),this.accountAddress=r?S.from(r):this.publicKey.authKey().derivedAddress(),this.uidKey=i,this.uidVal=a,this.aud=c,this.jwt=l,this.emitter=new Z,this.proofOrPromise=n,n instanceof f)this.proof=n;else{if(s===void 0)throw new Error("Must provide callback for async proof fetch");this.emitter.on("proofFetchFinish",async u=>{await s(u),this.emitter.removeAllListeners()}),this.init(n)}this.signingScheme=2;let h=K.fromHexInput(p).toUint8Array();if(h.length!==o.PEPPER_LENGTH)throw new Error(`Pepper length in bytes should be ${o.PEPPER_LENGTH}`);this.pepper=h}async init(e){try{this.proof=await e,this.emitter.emit("proofFetchFinish",{status:"Success"})}catch(r){r instanceof Error?this.emitter.emit("proofFetchFinish",{status:"Failed",error:r.toString()}):this.emitter.emit("proofFetchFinish",{status:"Failed",error:"Unknown"})}}serialize(e){if(e.serializeStr(this.jwt),e.serializeStr(this.uidKey),e.serializeFixedBytes(this.pepper),this.ephemeralKeyPair.serialize(e),this.proof===void 0)throw new Error("Connot serialize - proof undefined");this.proof.serialize(e)}static deserialize(e){let r=e.deserializeStr(),t=e.deserializeStr(),i=e.deserializeFixedBytes(31),a=T.deserialize(e),c=f.deserialize(e);return o.create({proof:c,pepper:i,uidKey:t,jwt:r,ephemeralKeyPair:a})}isExpired(){return this.ephemeralKeyPair.isExpired()}signWithAuthenticator(e){let r=new m(this.sign(e)),t=new y(this.publicKey);return new g(t,r)}signTransactionWithAuthenticator(e){let r=new m(this.signTransaction(e)),t=new y(this.publicKey);return new g(t,r)}async waitForProofFetch(){this.proofOrPromise instanceof Promise&&await this.proofOrPromise}sign(e){let{expiryDateSecs:r}=this.ephemeralKeyPair;if(this.isExpired())throw new Error("EphemeralKeyPair is expired");if(this.proof===void 0)throw new Error("Proof not defined");let t=this.ephemeralKeyPair.getPublicKey(),i=this.ephemeralKeyPair.sign(e);return new F({jwtHeader:v(this.jwt.split(".")[0]),ephemeralCertificate:new E(this.proof,0),expiryDateSecs:r,ephemeralPublicKey:t,ephemeralSignature:i})}signTransaction(e){if(this.proof===void 0)throw new Error("Proof not found");let r=b(e),i=new P(r,this.proof.proof).hash();return this.sign(i)}verifySignature(e){let{message:r,signature:t}=e;return!(this.isExpired()||!this.ephemeralKeyPair.getPublicKey().verifySignature({message:r,signature:t.ephemeralSignature}))}static fromBytes(e){return o.deserialize(new w(e))}static create(e){let{address:r,proof:t,jwt:i,ephemeralKeyPair:a,pepper:c,uidKey:p="sub",proofFetchCallback:n}=e,s=z(i),l=s.iss;if(typeof s.aud!="string")throw new Error("aud was not found or an array of values");let h=s.aud,u=s[p];return new o({address:r,proof:t,ephemeralKeyPair:a,iss:l,uidKey:p,uidVal:u,aud:h,pepper:c,jwt:i,proofFetchCallback:n})}};o.PEPPER_LENGTH=31;var k=o,P=class extends d{constructor(r,t){super();this.domainSeparator="APTOS::TransactionAndProof";this.transaction=r,this.proof=t}serialize(r){r.serializeFixedBytes(this.transaction.bcsToBytes()),r.serializeOption(this.proof)}hash(){return x(this.bcsToBytes(),this.domainSeparator)}};export{k as a};
2
+ //# sourceMappingURL=chunk-BP7JPCSW.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as l,c as tn,d as en,e as D}from"./chunk-WMBECPK5.mjs";import{r as nn,u as y}from"./chunk-V3OYNKY5.mjs";import{a as Q}from"./chunk-E67RGLPK.mjs";import{b as Y}from"./chunk-NSEC2KVP.mjs";import{a as J}from"./chunk-7WPECE2S.mjs";import{a as j}from"./chunk-ISUHNAU4.mjs";import{a as A}from"./chunk-CZ6UX5WZ.mjs";import{a as Z}from"./chunk-MULJ2GLJ.mjs";import{a as X,c as z,d as L}from"./chunk-WMHYIP3S.mjs";import{c as v,d as K,e as O,f as b,g as V,h as q,i as H}from"./chunk-INZXND6M.mjs";import{b as x,d as E,e as B,f as F}from"./chunk-GY7ARJNT.mjs";import{a as k}from"./chunk-BOYYQAB4.mjs";import{a as _,b as p,d as g}from"./chunk-3GGG4R4C.mjs";import{a as P,b as S}from"./chunk-P2TDGITN.mjs";import{a as M}from"./chunk-O4BBULNE.mjs";import{i as C}from"./chunk-W7MX6GBC.mjs";import{b as R,d as $}from"./chunk-Q7MD4V7H.mjs";import{b as u}from"./chunk-OHRL766V.mjs";import{a as U}from"./chunk-AH44UPM4.mjs";import{a as G}from"./chunk-WV5AD4IE.mjs";import{g as I}from"./chunk-SCHZ67F3.mjs";import{b as N,c as W}from"./chunk-L36ZHC7J.mjs";import{b as w}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=l(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)=>D(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=b.build(`${e}::${i}`,a,r,o);if("multisigAddress"in n){let s=u.from(n.multisigAddress);return new O(new q(s,new H(c)))}return new K(c)}async function vn(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=l(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)=>D(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 b.build(`${e}::${i}`,a,r,o)}function An(n){return new v(new V(w.fromHexInput(n.bytecode).toUint8Array(),l(n.typeArguments),n.functionArguments))}async function yn(n){let{aptosConfig:t,sender:e,payload:i,options:a,feePayerAddress:r}=n,o=async()=>I[t.network]?{chainId:I[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},h]=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 X(u.from(e),BigInt(h),i,BigInt(on),BigInt(sn),BigInt(cn),new k(d))}async function Kn(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 j(o,c,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}return new Z(o,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}function On(n){let{signerPublicKey:t,transaction:e,secondarySignersPublicKeys:i,feePayerPublicKey:a}=n,r=T(t);if(e.feePayerAddress){let c=new L(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress),s=[];i&&(s=i.map(h=>T(h)));let d=T(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 z(e.rawTransaction,e.secondarySignerAddresses),s=[];s=i.map(m=>T(m));let d=new E(r,e.secondarySignerAddresses,s);return new A(c.raw_txn,d).bcsToBytes()}let o;if(r instanceof p)o=new x(r.public_key,r.signature);else if(r instanceof g)o=new F(r);else throw new Error("Invalid public key");return new A(e.rawTransaction,o).bcsToBytes()}function T(n){let t=new $(new Uint8Array(64));if(R.isInstance(n))return new p(n,t);if(P.isInstance(n))return new g(n,new S(t));if(C.isInstance(n)||M.isInstance(n))return console.warn("Expected AccountPublicKey, but got PublicKey. Please wrap your public key with AnyPublicKey."),new g(new P(n),new S(t));throw new Error("Unsupported public key")}function fn(n){let{transaction:t,feePayerAuthenticator:e,additionalSignersAuthenticators:i}=n,a=G(_,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 E(a,t.secondarySignerAddresses,i)}else a instanceof p?r=new x(a.public_key,a.signature):r=new F(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 w(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:U(async()=>o(t,e,i,a),`${n}-${a.network}-${t}-${e}-${i}`,1e3*60*5)()}export{kn as a,dn as b,vn as c,mn as d,yn as e,Kn as f,On as g,T as h,fn as i,an as j,Vn as k};
2
+ //# sourceMappingURL=chunk-C4RTKCIA.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, KeylessPublicKey, Secp256k1PublicKey } 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(\n Hex.fromHexInput(args.bytecode).toUint8Array(),\n standardizeTypeTags(args.typeArguments),\n args.functionArguments,\n ),\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 // No need to for the signature to be matching in scheme. All that matters for simulations is that it's not valid\n const invalidSignature = new Ed25519Signature(new Uint8Array(64));\n\n if (Ed25519PublicKey.isInstance(publicKey)) {\n return new AccountAuthenticatorEd25519(publicKey, invalidSignature);\n }\n\n if (AnyPublicKey.isInstance(publicKey)) {\n return new AccountAuthenticatorSingleKey(publicKey, new AnySignature(invalidSignature));\n }\n\n // TODO: remove this, non-account public keys should never make it here\n if (KeylessPublicKey.isInstance(publicKey) || Secp256k1PublicKey.isInstance(publicKey)) {\n // eslint-disable-next-line no-console\n console.warn(\"Expected AccountPublicKey, but got PublicKey. Please wrap your public key with AnyPublicKey.\");\n return new AccountAuthenticatorSingleKey(new AnyPublicKey(publicKey), new AnySignature(invalidSignature));\n }\n\n // TODO add support for AnyMultiKey\n throw new Error(\"Unsupported public key\");\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":"8jCAQA,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,cAAcI,EAAc,MAAM,EAC/G,EAIF,IAAME,EAAuDb,EAAK,kBAAkB,IAAI,CAACc,EAAKC,IAC5FC,EAAgBhB,EAAK,SAAUO,EAAaO,EAAKC,EAAGJ,CAAa,CACnE,EAGA,GAAIE,EAAkB,SAAWN,EAAY,WAAW,OACtD,MAAM,IAAI,MAER,0BAA0BJ,CAAa,KAAKC,CAAU,KAAKC,CAAY,eAAeE,EAAY,WAAW,MAAM,YAAYM,EAAkB,MAAM,EACzJ,EAIF,IAAMI,EAAuBC,EAAc,MACzC,GAAGf,CAAa,KAAKC,CAAU,GAC/BC,EACAM,EACAE,CACF,EAGA,GAAI,oBAAqBb,EAAM,CAC7B,IAAMmB,EAAkBC,EAAe,KAAKpB,EAAK,eAAe,EAChE,OAAO,IAAIqB,EACT,IAAIC,EAASH,EAAiB,IAAII,EAA2BN,CAAoB,CAAC,CACpF,CACF,CAGA,OAAO,IAAIO,EAAgCP,CAAoB,CACjE,CAEA,eAAsBQ,GAA4BzB,EAAkE,CAClH,GAAM,CAAE,cAAAG,EAAe,WAAAC,EAAY,aAAAC,CAAa,EAAIC,EAAiBN,EAAK,QAAQ,EAE5EO,EAAc,MAAMC,GAAS,CACjC,IAAK,gBACL,cAAAL,EACA,WAAAC,EACA,aAAAC,EACA,YAAaL,EAAK,YAClB,IAAKA,EAAK,IACV,MAAO0B,EACT,CAAC,EAGD,OAAOC,GAAmC,CAAE,IAAKpB,EAAa,GAAGP,CAAK,CAAC,CACzE,CAEO,SAAS2B,GAAmC3B,EAAmD,CACpG,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,cAAcI,EAAc,MAAM,EAC/G,EAIF,IAAME,EACJb,GAAM,mBAAmB,IAAI,CAACc,EAAKC,IAAMC,EAAgBhB,EAAK,SAAUO,EAAaO,EAAKC,EAAGJ,CAAa,CAAC,GAAK,CAAC,EAGnH,GAAIE,EAAkB,SAAWN,EAAY,WAAW,OACtD,MAAM,IAAI,MAER,0BAA0BJ,CAAa,KAAKC,CAAU,KAAKC,CAAY,eAAeE,EAAY,WAAW,MAAM,YAAYM,EAAkB,MAAM,EACzJ,EAIF,OAAOK,EAAc,MAAM,GAAGf,CAAa,KAAKC,CAAU,GAAIC,EAAcM,EAAeE,CAAiB,CAC9G,CAEA,SAASX,GAAiCF,EAAuB,CAC/D,OAAO,IAAI4B,EACT,IAAIC,EACFC,EAAI,aAAa9B,EAAK,QAAQ,EAAE,aAAa,EAC7CY,EAAoBZ,EAAK,aAAa,EACtCA,EAAK,iBACP,CACF,CACF,CAWA,eAAsB+B,GAAuB/B,EAMjB,CAC1B,GAAM,CAAE,YAAAgC,EAAa,OAAAC,EAAQ,QAAAC,EAAS,QAAAC,EAAS,gBAAAC,CAAgB,EAAIpC,EAE7DqC,EAAa,SACbC,EAAiBN,EAAY,OAAO,EAC/B,CAAE,QAASM,EAAiBN,EAAY,OAAO,CAAE,EAGnD,CAAE,SADI,MAAMO,EAAc,CAAE,YAAAP,CAAY,CAAC,GACzB,QAAS,EAG5BQ,EAAkB,SAClBL,GAAS,aACJ,CAAE,YAAaA,EAAQ,YAAa,EAGtC,CAAE,aADU,MAAMM,EAAsB,CAAE,YAAAT,CAAY,CAAC,GAC7B,YAAa,EAG1CU,EAA0B,SAAY,CAC1C,IAAMC,EAAoB,SACpBR,GAAS,wBAA0B,OAC9BA,EAAQ,uBAGT,MAAMS,EAAQ,CAAE,YAAAZ,EAAa,eAAgBC,CAAO,CAAC,GAAG,gBAOlE,GAAIG,GAAmBhB,EAAe,KAAKgB,CAAe,EAAE,OAAOhB,EAAe,IAAI,EAGpF,GAAI,CAEF,OAAO,MAAMuB,EAAkB,CACjC,MAAiB,CACf,MAAO,EACT,KAEA,QAAOA,EAAkB,CAE7B,EACM,CAAC,CAAE,QAAAE,CAAQ,EAAG,CAAE,YAAAC,CAAY,EAAGC,CAAc,EAAI,MAAM,QAAQ,IAAI,CACvEV,EAAW,EACXG,EAAgB,EAChBE,EAAwB,CAC1B,CAAC,EAEK,CAAE,aAAAM,GAAc,aAAAC,GAAc,gBAAAC,EAAgB,EAAI,CACtD,aAAcf,GAAS,aAAe,OAAOA,EAAQ,YAAY,EAAI,OAAO,GAAsB,EAClG,aAAcA,GAAS,cAAgB,OAAOW,CAAW,EACzD,gBAAiBX,GAAS,iBAAmB,OAAO,KAAK,MAAM,KAAK,IAAI,EAAI,GAAI,EAAI,EAA4B,CAClH,EAEA,OAAO,IAAIgB,EACT/B,EAAe,KAAKa,CAAM,EAC1B,OAAOc,CAAc,EACrBb,EACA,OAAOc,EAAY,EACnB,OAAOC,EAAY,EACnB,OAAOC,EAAe,EACtB,IAAIE,EAAQP,CAAO,CACrB,CACF,CAiCA,eAAsBQ,GAAiBrD,EAAmE,CACxG,GAAM,CAAE,YAAAgC,EAAa,OAAAC,EAAQ,QAAAC,EAAS,QAAAC,EAAS,gBAAAC,CAAgB,EAAIpC,EAE7DsD,EAAS,MAAMvB,GAAuB,CAC1C,YAAAC,EACA,OAAAC,EACA,QAAAC,EACA,QAAAC,EACA,gBAAAC,CACF,CAAC,EAGD,GAAI,6BAA8BpC,EAAM,CACtC,IAAMuD,EACJvD,EAAK,0BAA0B,IAAKwD,GAAWpC,EAAe,KAAKoC,CAAM,CAAC,GAAK,CAAC,EAElF,OAAO,IAAIC,EACTH,EACAC,EACAvD,EAAK,gBAAkBoB,EAAe,KAAKpB,EAAK,eAAe,EAAI,MACrE,CACF,CAEA,OAAO,IAAI0D,EAAkBJ,EAAQtD,EAAK,gBAAkBoB,EAAe,KAAKpB,EAAK,eAAe,EAAI,MAAS,CACnH,CAaO,SAAS2D,GAAuC3D,EAAgD,CACrG,GAAM,CAAE,gBAAA4D,EAAiB,YAAAC,EAAa,2BAAAC,EAA4B,kBAAAC,CAAkB,EAAI/D,EAElFgE,EAAuBC,EAA8BL,CAAe,EAG1E,GAAIC,EAAY,gBAAiB,CAC/B,IAAMK,EAAoB,IAAIC,EAC5BN,EAAY,eACZA,EAAY,0BAA4B,CAAC,EACzCA,EAAY,eACd,EACIO,EAA8D,CAAC,EAC/DN,IACFM,EAAiCN,EAA2B,IAAKO,GAC/DJ,EAA8BI,CAAS,CACzC,GAEF,IAAMC,EAAwBL,EAA8BF,CAAkB,EAExEQ,EAA2B,IAAIC,EACnCR,EACAH,EAAY,0BAA4B,CAAC,EACzCO,EACA,CACE,QAASP,EAAY,gBACrB,cAAeS,CACjB,CACF,EACA,OAAO,IAAIG,EAAkBP,EAAkB,QAASK,CAAwB,EAAE,WAAW,CAC/F,CAGA,GAAIV,EAAY,yBAA0B,CACxC,IAAMK,EAAoB,IAAIQ,EAC5Bb,EAAY,eACZA,EAAY,wBACd,EAEIO,EAA8D,CAAC,EAEnEA,EAAiCN,EAA4B,IAAKO,GAChEJ,EAA8BI,CAAS,CACzC,EAEA,IAAME,EAA2B,IAAII,EACnCX,EACAH,EAAY,yBACZO,CACF,EAEA,OAAO,IAAIK,EAAkBP,EAAkB,QAASK,CAAwB,EAAE,WAAW,CAC/F,CAGA,IAAIA,EACJ,GAAIP,aAAgCY,EAClCL,EAA2B,IAAIM,EAC7Bb,EAAqB,WACrBA,EAAqB,SACvB,UACSA,aAAgCc,EACzCP,EAA2B,IAAIQ,EAAqCf,CAAoB,MAExF,OAAM,IAAI,MAAM,oBAAoB,EAEtC,OAAO,IAAIS,EAAkBZ,EAAY,eAAgBU,CAAwB,EAAE,WAAW,CAChG,CAEO,SAASN,EAA8BI,EAAsB,CAElE,IAAMW,EAAmB,IAAIC,EAAiB,IAAI,WAAW,EAAE,CAAC,EAEhE,GAAIC,EAAiB,WAAWb,CAAS,EACvC,OAAO,IAAIO,EAA4BP,EAAWW,CAAgB,EAGpE,GAAIG,EAAa,WAAWd,CAAS,EACnC,OAAO,IAAIS,EAA8BT,EAAW,IAAIe,EAAaJ,CAAgB,CAAC,EAIxF,GAAIK,EAAiB,WAAWhB,CAAS,GAAKiB,EAAmB,WAAWjB,CAAS,EAEnF,eAAQ,KAAK,8FAA8F,EACpG,IAAIS,EAA8B,IAAIK,EAAad,CAAS,EAAG,IAAIe,EAAaJ,CAAgB,CAAC,EAI1G,MAAM,IAAI,MAAM,wBAAwB,CAC1C,CAWO,SAASO,GAA0BvF,EAA8C,CACtF,GAAM,CAAE,YAAA6D,EAAa,sBAAAS,EAAuB,gCAAAkB,CAAgC,EAAIxF,EAC1EyF,EAAsBC,EAAgBC,EAAsB3F,EAAK,mBAAmB,EAEtF4F,EACJ,GAAI/B,EAAY,gBAAiB,CAC/B,GAAI,CAACS,EACH,MAAM,IAAI,MAAM,0FAA0F,EAE5GsB,EAAmB,IAAIpB,EACrBiB,EACA5B,EAAY,0BAA4B,CAAC,EACzC2B,GAAmC,CAAC,EACpC,CACE,QAAS3B,EAAY,gBACrB,cAAeS,CACjB,CACF,CACF,SAAWT,EAAY,yBAA0B,CAC/C,GAAI,CAAC2B,EACH,MAAM,IAAI,MACR,sGACF,EAEFI,EAAmB,IAAIjB,EACrBc,EACA5B,EAAY,yBACZ2B,CACF,CACF,MAAWC,aAA+Bb,EACxCgB,EAAmB,IAAIf,EACrBY,EAAoB,WACpBA,EAAoB,SACtB,EAEAG,EAAmB,IAAIb,EAAqCU,CAAmB,EAGjF,OAAO,IAAIhB,EAAkBZ,EAAY,eAAgB+B,CAAgB,EAAE,WAAW,CACxF,CAMO,SAASC,GAAWC,EAA4C,CACrE,IAAMC,EAAOC,GAAS,OAAO,EAC7B,QAAWC,KAAQH,EACjBC,EAAK,OAAOE,CAAI,EAElB,OAAOF,EAAK,OAAO,CACrB,CAKA,IAAMG,GAAqBL,GAAW,CAAC,oBAAoB,CAAC,EAMrD,SAASM,GAA4BnG,EAA0C,CACpF,IAAMoG,EAAoBb,GAA0BvF,CAAI,EAKxD,OAAO,IAAI8B,EAAI+D,GAAW,CAACK,GAAoB,IAAI,WAAW,CAAC,CAAC,CAAC,EAAGE,CAAiB,CAAC,CAAC,EAAE,SAAS,CACpG,CAYA,eAAe5F,GAAgC,CAC7C,IAAA6F,EACA,cAAAlG,EACA,WAAAC,EACA,aAAAC,EACA,YAAA2B,EACA,IAAAsE,EACA,MAAAC,CACF,EAQe,CACb,OAAID,IAAQ,OACHA,EAIFE,EACL,SAAYD,EAAMpG,EAAeC,EAAYC,EAAc2B,CAAW,EACtE,GAAGqE,CAAG,IAAIrE,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","invalidSignature","Ed25519Signature","Ed25519PublicKey","AnyPublicKey","AnySignature","KeylessPublicKey","Secp256k1PublicKey","generateSignedTransaction","additionalSignersAuthenticators","senderAuthenticator","normalizeBundle","AccountAuthenticator","txnAuthenticator","hashValues","input","hash","sha3Hash","item","TRANSACTION_PREFIX","generateUserTransactionHash","signedTransaction","key","abi","fetch","memoizeAsync"]}
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-V3NKDUY5.mjs";import{a as i}from"./chunk-ZMFVKUFD.mjs";import{a as r}from"./chunk-A63SMUOU.mjs";var n=class o extends r{constructor(t,a){super(),this.raw_txn=t,this.authenticator=a}serialize(t){this.raw_txn.serialize(t),this.authenticator.serialize(t)}static deserialize(t){let a=i.deserialize(t),s=e.deserialize(t);return new o(a,s)}};export{n as a};
2
- //# sourceMappingURL=chunk-NJ2IXXY2.mjs.map
1
+ import{a as i}from"./chunk-WMHYIP3S.mjs";import{a as e}from"./chunk-GY7ARJNT.mjs";import{a as r}from"./chunk-A63SMUOU.mjs";var n=class o extends r{constructor(t,a){super(),this.raw_txn=t,this.authenticator=a}serialize(t){this.raw_txn.serialize(t),this.authenticator.serialize(t)}static deserialize(t){let a=i.deserialize(t),s=e.deserialize(t);return new o(a,s)}};export{n as a};
2
+ //# sourceMappingURL=chunk-CZ6UX5WZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r,b as i,c as s}from"./chunk-MA7TL5VN.mjs";import{a as o}from"./chunk-ODYVU346.mjs";var t=class{constructor(e){this.config=e}async getNumberOfDelegators(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),r({aptosConfig:this.config,...e})}async getNumberOfDelegatorsForAllPools(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),i({aptosConfig:this.config,...e})}async getDelegatedStakingActivities(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),s({aptosConfig:this.config,...e})}};export{t as a};
2
- //# sourceMappingURL=chunk-BQ7OOQRE.mjs.map
1
+ import{a as r,b as i,c as s}from"./chunk-2CXQK6CH.mjs";import{a as o}from"./chunk-HXYBTLQT.mjs";var t=class{constructor(e){this.config=e}async getNumberOfDelegators(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),r({aptosConfig:this.config,...e})}async getNumberOfDelegatorsForAllPools(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),i({aptosConfig:this.config,...e})}async getDelegatedStakingActivities(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),s({aptosConfig:this.config,...e})}};export{t as a};
2
+ //# sourceMappingURL=chunk-DPZO54DD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as K}from"./chunk-IZ7OGJBY.mjs";import{c as d}from"./chunk-VA4HKHNV.mjs";import{d as b,e as v,f as q,g as O,i as P,j as S,k as M,u as G}from"./chunk-VHNX2NUR.mjs";import{a as f}from"./chunk-RZKLIZ2D.mjs";import{a as k}from"./chunk-FZ3HMVKE.mjs";import{a as T}from"./chunk-FSTRZMCK.mjs";import{b as C}from"./chunk-XWVMFCW3.mjs";import{b as _}from"./chunk-6WAXFWLH.mjs";import{a as g}from"./chunk-WPYVWZQS.mjs";import{b as i}from"./chunk-WSE653RS.mjs";import{a as w}from"./chunk-AH44UPM4.mjs";import{b as A,d as p}from"./chunk-ZHNCJSXO.mjs";import{a as h}from"./chunk-TDGQGILY.mjs";import{e as y}from"./chunk-L36ZHC7J.mjs";async function R(o){let{aptosConfig:n,accountAddress:t}=o,{data:e}=await A({aptosConfig:n,originMethod:"getInfo",path:`accounts/${i.from(t).toString()}`});return e}async function Y(o){let{aptosConfig:n,accountAddress:t,options:e}=o;return p({aptosConfig:n,originMethod:"getModules",path:`accounts/${i.from(t).toString()}/modules`,params:{ledger_version:e?.ledgerVersion,start:e?.offset,limit:e?.limit??1e3}})}async function Z(o){return o.options?.ledgerVersion!==void 0?Q(o):w(async()=>Q(o),`module-${o.accountAddress}-${o.moduleName}`,1e3*60*5)()}async function Q(o){let{aptosConfig:n,accountAddress:t,moduleName:e,options:r}=o,{data:s}=await A({aptosConfig:n,originMethod:"getModule",path:`accounts/${i.from(t).toString()}/module/${e}`,params:{ledger_version:r?.ledgerVersion}});return s}async function ee(o){let{aptosConfig:n,accountAddress:t,options:e}=o;return p({aptosConfig:n,originMethod:"getTransactions",path:`accounts/${i.from(t).toString()}/transactions`,params:{start:e?.offset,limit:e?.limit}})}async function oe(o){let{aptosConfig:n,accountAddress:t,options:e}=o;return p({aptosConfig:n,originMethod:"getResources",path:`accounts/${i.from(t).toString()}/resources`,params:{ledger_version:e?.ledgerVersion,start:e?.offset,limit:e?.limit??999}})}async function x(o){let{aptosConfig:n,accountAddress:t,resourceType:e,options:r}=o,{data:s}=await A({aptosConfig:n,originMethod:"getResource",path:`accounts/${i.from(t).toString()}/resource/${e}`,params:{ledger_version:r?.ledgerVersion}});return s.data}async function L(o){let{aptosConfig:n,authenticationKey:t,options:e}=o,r=await x({aptosConfig:n,accountAddress:"0x1",resourceType:"0x1::account::OriginatingAddress",options:e}),{address_map:{handle:s}}=r,c=i.from(t);try{let a=await K({aptosConfig:n,handle:s,data:{key:c.toString(),key_type:"address",value_type:"address"},options:e});return i.from(a)}catch(a){if(a instanceof h&&a.data.error_code==="table_item_not_found")return c;throw a}}async function te(o){let{aptosConfig:n,accountAddress:t}=o,r={owner_address:{_eq:i.from(t).toStringLong()},amount:{_gt:0}},c=await d({aptosConfig:n,query:{query:S,variables:{where_condition:r}},originMethod:"getAccountTokensCount"});return c.current_token_ownerships_v2_aggregate.aggregate?c.current_token_ownerships_v2_aggregate.aggregate.count:0}async function ne(o){let{aptosConfig:n,accountAddress:t,options:e}=o,s={owner_address:{_eq:i.from(t).toStringLong()},amount:{_gt:0}};e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard});let c={query:O,variables:{where_condition:s,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountOwnedTokens"})).current_token_ownerships_v2}async function re(o){let{aptosConfig:n,accountAddress:t,collectionAddress:e,options:r}=o,s=i.from(t).toStringLong(),c=i.from(e).toStringLong(),a={owner_address:{_eq:s},current_token_data:{collection_id:{_eq:c}},amount:{_gt:0}};r?.tokenStandard&&(a.token_standard={_eq:r?.tokenStandard});let u={query:P,variables:{where_condition:a,offset:r?.offset,limit:r?.limit,order_by:r?.orderBy}};return(await d({aptosConfig:n,query:u,originMethod:"getAccountOwnedTokensFromCollectionAddress"})).current_token_ownerships_v2}async function se(o){let{aptosConfig:n,accountAddress:t,options:e}=o,s={owner_address:{_eq:i.from(t).toStringLong()}};e?.tokenStandard&&(s.current_collection={token_standard:{_eq:e?.tokenStandard}});let c={query:q,variables:{where_condition:s,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountCollectionsWithOwnedTokens"})).current_collection_ownership_v2_view}async function ce(o){let{aptosConfig:n,accountAddress:t}=o,e=i.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:M,variables:{address:e}},originMethod:"getAccountTransactionsCount"});return s.account_transactions_aggregate.aggregate?s.account_transactions_aggregate.aggregate.count:0}async function ie(o){let{aptosConfig:n,accountAddress:t,coinType:e,faMetadataAddress:r}=o,s,c;if(e!==void 0&&r!==void 0)c=i.from(r).toStringLong();else if(e!==void 0&&r===void 0)s=e,o.coinType===y?c=i.A.toStringLong():c=k(i.A,e).toStringLong();else if(e===void 0&&r!==void 0){let m=i.from(r);c=m.toStringLong(),m===i.A&&(s=y)}else throw new Error("Either coinType, fungibleAssetAddress, or both must be provided");let a=i.from(t).toStringLong(),u={asset_type:{_eq:c}};e!==void 0&&(u={asset_type:{_in:[s,c]}});let l=await B({aptosConfig:n,accountAddress:a,options:{where:u}});return l[0]?l[0].amount:0}async function B(o){let{aptosConfig:n,accountAddress:t,options:e}=o,r=i.from(t).toStringLong(),s={...e?.where,owner_address:{_eq:r}},c={query:v,variables:{where_condition:s,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountCoinsData"})).current_fungible_asset_balances}async function ae(o){let{aptosConfig:n,accountAddress:t}=o,e=i.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:b,variables:{address:e}},originMethod:"getAccountCoinsCount"});if(!s.current_fungible_asset_balances_aggregate.aggregate)throw Error("Failed to get the count of account coins");return s.current_fungible_asset_balances_aggregate.aggregate.count}async function de(o){let{aptosConfig:n,accountAddress:t,options:e}=o,s={owner_address:{_eq:i.from(t).toStringLong()}},c={query:G,variables:{where_condition:s,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountOwnedObjects"})).current_objects}async function ue(o){let{aptosConfig:n,privateKey:t}=o,e=new T(t.publicKey());if(t instanceof C){let s=g.fromPublicKey({publicKey:e}).derivedAddress();return f.fromPrivateKey({privateKey:t,address:s})}if(t instanceof _){let r=g.fromPublicKey({publicKey:e});if(await I({authKey:r,aptosConfig:n})){let u=r.derivedAddress();return f.fromPrivateKey({privateKey:t,address:u,legacy:!1})}let c=g.fromPublicKey({publicKey:e.publicKey});if(await I({authKey:c,aptosConfig:n})){let u=c.derivedAddress();return f.fromPrivateKey({privateKey:t,address:u,legacy:!0})}}throw new Error(`Can't derive account from private key ${t}`)}async function I(o){let{aptosConfig:n,authKey:t}=o,e=await L({aptosConfig:n,authenticationKey:t.derivedAddress()});try{return await R({aptosConfig:n,accountAddress:e}),!0}catch(r){if(r.status===404)return!1;throw new Error(`Error while looking for an account info ${e.toString()}`)}}export{R as a,Y as b,Z as c,ee as d,oe as e,x as f,L as g,te as h,ne as i,re as j,se as k,ce as l,ie as m,B as n,ae as o,de as p,ue as q,I as r};
2
- //# sourceMappingURL=chunk-IR6L77JS.mjs.map
1
+ import{a as K}from"./chunk-7JWCIWJ3.mjs";import{c as d}from"./chunk-7WPECE2S.mjs";import{d as b,e as v,f as q,g as O,i as P,j as S,k as M,u as G}from"./chunk-VHNX2NUR.mjs";import{a as f}from"./chunk-KLD5S3J2.mjs";import{a as k}from"./chunk-WRRQ7L5K.mjs";import{a as T}from"./chunk-P2TDGITN.mjs";import{b as C}from"./chunk-O4BBULNE.mjs";import{c as _}from"./chunk-Q7MD4V7H.mjs";import{a as g}from"./chunk-G5MGSV7Y.mjs";import{b as i}from"./chunk-OHRL766V.mjs";import{a as w}from"./chunk-AH44UPM4.mjs";import{b as A,d as p}from"./chunk-YB5DCDJY.mjs";import{a as h}from"./chunk-TDGQGILY.mjs";import{e as y}from"./chunk-L36ZHC7J.mjs";async function R(o){let{aptosConfig:n,accountAddress:t}=o,{data:e}=await A({aptosConfig:n,originMethod:"getInfo",path:`accounts/${i.from(t).toString()}`});return e}async function Y(o){let{aptosConfig:n,accountAddress:t,options:e}=o;return p({aptosConfig:n,originMethod:"getModules",path:`accounts/${i.from(t).toString()}/modules`,params:{ledger_version:e?.ledgerVersion,start:e?.offset,limit:e?.limit??1e3}})}async function Z(o){return o.options?.ledgerVersion!==void 0?Q(o):w(async()=>Q(o),`module-${o.accountAddress}-${o.moduleName}`,1e3*60*5)()}async function Q(o){let{aptosConfig:n,accountAddress:t,moduleName:e,options:r}=o,{data:s}=await A({aptosConfig:n,originMethod:"getModule",path:`accounts/${i.from(t).toString()}/module/${e}`,params:{ledger_version:r?.ledgerVersion}});return s}async function ee(o){let{aptosConfig:n,accountAddress:t,options:e}=o;return p({aptosConfig:n,originMethod:"getTransactions",path:`accounts/${i.from(t).toString()}/transactions`,params:{start:e?.offset,limit:e?.limit}})}async function oe(o){let{aptosConfig:n,accountAddress:t,options:e}=o;return p({aptosConfig:n,originMethod:"getResources",path:`accounts/${i.from(t).toString()}/resources`,params:{ledger_version:e?.ledgerVersion,start:e?.offset,limit:e?.limit??999}})}async function x(o){let{aptosConfig:n,accountAddress:t,resourceType:e,options:r}=o,{data:s}=await A({aptosConfig:n,originMethod:"getResource",path:`accounts/${i.from(t).toString()}/resource/${e}`,params:{ledger_version:r?.ledgerVersion}});return s.data}async function L(o){let{aptosConfig:n,authenticationKey:t,options:e}=o,r=await x({aptosConfig:n,accountAddress:"0x1",resourceType:"0x1::account::OriginatingAddress",options:e}),{address_map:{handle:s}}=r,c=i.from(t);try{let a=await K({aptosConfig:n,handle:s,data:{key:c.toString(),key_type:"address",value_type:"address"},options:e});return i.from(a)}catch(a){if(a instanceof h&&a.data.error_code==="table_item_not_found")return c;throw a}}async function te(o){let{aptosConfig:n,accountAddress:t}=o,r={owner_address:{_eq:i.from(t).toStringLong()},amount:{_gt:0}},c=await d({aptosConfig:n,query:{query:S,variables:{where_condition:r}},originMethod:"getAccountTokensCount"});return c.current_token_ownerships_v2_aggregate.aggregate?c.current_token_ownerships_v2_aggregate.aggregate.count:0}async function ne(o){let{aptosConfig:n,accountAddress:t,options:e}=o,s={owner_address:{_eq:i.from(t).toStringLong()},amount:{_gt:0}};e?.tokenStandard&&(s.token_standard={_eq:e?.tokenStandard});let c={query:O,variables:{where_condition:s,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountOwnedTokens"})).current_token_ownerships_v2}async function re(o){let{aptosConfig:n,accountAddress:t,collectionAddress:e,options:r}=o,s=i.from(t).toStringLong(),c=i.from(e).toStringLong(),a={owner_address:{_eq:s},current_token_data:{collection_id:{_eq:c}},amount:{_gt:0}};r?.tokenStandard&&(a.token_standard={_eq:r?.tokenStandard});let u={query:P,variables:{where_condition:a,offset:r?.offset,limit:r?.limit,order_by:r?.orderBy}};return(await d({aptosConfig:n,query:u,originMethod:"getAccountOwnedTokensFromCollectionAddress"})).current_token_ownerships_v2}async function se(o){let{aptosConfig:n,accountAddress:t,options:e}=o,s={owner_address:{_eq:i.from(t).toStringLong()}};e?.tokenStandard&&(s.current_collection={token_standard:{_eq:e?.tokenStandard}});let c={query:q,variables:{where_condition:s,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountCollectionsWithOwnedTokens"})).current_collection_ownership_v2_view}async function ce(o){let{aptosConfig:n,accountAddress:t}=o,e=i.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:M,variables:{address:e}},originMethod:"getAccountTransactionsCount"});return s.account_transactions_aggregate.aggregate?s.account_transactions_aggregate.aggregate.count:0}async function ie(o){let{aptosConfig:n,accountAddress:t,coinType:e,faMetadataAddress:r}=o,s,c;if(e!==void 0&&r!==void 0)c=i.from(r).toStringLong();else if(e!==void 0&&r===void 0)s=e,o.coinType===y?c=i.A.toStringLong():c=k(i.A,e).toStringLong();else if(e===void 0&&r!==void 0){let m=i.from(r);c=m.toStringLong(),m===i.A&&(s=y)}else throw new Error("Either coinType, fungibleAssetAddress, or both must be provided");let a=i.from(t).toStringLong(),u={asset_type:{_eq:c}};e!==void 0&&(u={asset_type:{_in:[s,c]}});let l=await B({aptosConfig:n,accountAddress:a,options:{where:u}});return l[0]?l[0].amount:0}async function B(o){let{aptosConfig:n,accountAddress:t,options:e}=o,r=i.from(t).toStringLong(),s={...e?.where,owner_address:{_eq:r}},c={query:v,variables:{where_condition:s,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountCoinsData"})).current_fungible_asset_balances}async function ae(o){let{aptosConfig:n,accountAddress:t}=o,e=i.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:b,variables:{address:e}},originMethod:"getAccountCoinsCount"});if(!s.current_fungible_asset_balances_aggregate.aggregate)throw Error("Failed to get the count of account coins");return s.current_fungible_asset_balances_aggregate.aggregate.count}async function de(o){let{aptosConfig:n,accountAddress:t,options:e}=o,s={owner_address:{_eq:i.from(t).toStringLong()}},c={query:G,variables:{where_condition:s,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await d({aptosConfig:n,query:c,originMethod:"getAccountOwnedObjects"})).current_objects}async function ue(o){let{aptosConfig:n,privateKey:t}=o,e=new T(t.publicKey());if(t instanceof C){let s=g.fromPublicKey({publicKey:e}).derivedAddress();return f.fromPrivateKey({privateKey:t,address:s})}if(t instanceof _){let r=g.fromPublicKey({publicKey:e});if(await I({authKey:r,aptosConfig:n})){let u=r.derivedAddress();return f.fromPrivateKey({privateKey:t,address:u,legacy:!1})}let c=g.fromPublicKey({publicKey:e.publicKey});if(await I({authKey:c,aptosConfig:n})){let u=c.derivedAddress();return f.fromPrivateKey({privateKey:t,address:u,legacy:!0})}}throw new Error(`Can't derive account from private key ${t}`)}async function I(o){let{aptosConfig:n,authKey:t}=o,e=await L({aptosConfig:n,authenticationKey:t.derivedAddress()});try{return await R({aptosConfig:n,accountAddress:e}),!0}catch(r){if(r.status===404)return!1;throw new Error(`Error while looking for an account info ${e.toString()}`)}}export{R as a,Y as b,Z as c,ee as d,oe as e,x as f,L as g,te as h,ne as i,re as j,se as k,ce as l,ie as m,B as n,ae as o,de as p,ue as q,I as r};
2
+ //# sourceMappingURL=chunk-E67RGLPK.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as a}from"./chunk-L7FA4ISG.mjs";import e from"eventemitter3";var i=class extends e{constructor(t){super(),this.config=t}start(t){let{sender:n}=t;this.account=n,this.transactionWorker=new a(this.config,n),this.transactionWorker.start(),this.registerToEvents()}push(t){let{data:n,options:o}=t;for(let r of n)this.transactionWorker.push(r,o)}registerToEvents(){this.transactionWorker.on("transactionSent",async t=>{this.emit("transactionSent",t)}),this.transactionWorker.on("transactionSendFailed",async t=>{this.emit("transactionSendFailed",t)}),this.transactionWorker.on("transactionExecuted",async t=>{this.emit("transactionExecuted",t)}),this.transactionWorker.on("transactionExecutionFailed",async t=>{this.emit("transactionExecutionFailed",t)}),this.transactionWorker.on("executionFinish",async t=>{this.emit("executionFinish",t)})}forSingleAccount(t){try{let{sender:n,data:o,options:r}=t;this.start({sender:n}),this.push({data:o,options:r})}catch(n){throw new Error(`failed to submit transactions with error: ${n}`)}}};export{i as a};
2
- //# sourceMappingURL=chunk-QLKTSSVC.mjs.map
1
+ import{c as a}from"./chunk-HWX6AJJ2.mjs";import e from"eventemitter3";var i=class extends e{constructor(t){super(),this.config=t}start(t){let{sender:n}=t;this.account=n,this.transactionWorker=new a(this.config,n),this.transactionWorker.start(),this.registerToEvents()}push(t){let{data:n,options:o}=t;for(let r of n)this.transactionWorker.push(r,o)}registerToEvents(){this.transactionWorker.on("transactionSent",async t=>{this.emit("transactionSent",t)}),this.transactionWorker.on("transactionSendFailed",async t=>{this.emit("transactionSendFailed",t)}),this.transactionWorker.on("transactionExecuted",async t=>{this.emit("transactionExecuted",t)}),this.transactionWorker.on("transactionExecutionFailed",async t=>{this.emit("transactionExecutionFailed",t)}),this.transactionWorker.on("executionFinish",async t=>{this.emit("executionFinish",t)})}forSingleAccount(t){try{let{sender:n,data:o,options:r}=t;this.start({sender:n}),this.push({data:o,options:r})}catch(n){throw new Error(`failed to submit transactions with error: ${n}`)}}};export{i as a};
2
+ //# sourceMappingURL=chunk-EAWQ4SD3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-4FMAPHUM.mjs";import{a as l}from"./chunk-ZKCSQAGW.mjs";import{a as f}from"./chunk-K7OBPPSF.mjs";import{a as g}from"./chunk-F435LQUS.mjs";import{a as u}from"./chunk-NC3KKAAK.mjs";import{a as A}from"./chunk-243IMA3Y.mjs";import{a as h}from"./chunk-BQ7OOQRE.mjs";import{a as y}from"./chunk-7F7AIMGB.mjs";import{a as s}from"./chunk-T7WBGP37.mjs";import{a as p}from"./chunk-QUMSKIYX.mjs";import{a as d}from"./chunk-NMD45OTM.mjs";import{a as r}from"./chunk-3JFX3XDA.mjs";import{a}from"./chunk-BQIT7TKM.mjs";import{a as c}from"./chunk-FE6CYBDF.mjs";var t=class{constructor(n){this.config=new d(n),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 l(this.config),this.fungibleAsset=new f(this.config),this.general=new g(this.config),this.staking=new h(this.config),this.transaction=new m(this.config),this.table=new y(this.config),this.keyless=new u(this.config),this.object=new A(this.config)}};function e(b,n,w){Object.getOwnPropertyNames(n.prototype).forEach(i=>{let o=Object.getOwnPropertyDescriptor(n.prototype,i);o&&(o.value=function(...j){return this[w][i](...j)},Object.defineProperty(b.prototype,i,o))})}e(t,s,"account");e(t,p,"ans");e(t,r,"coin");e(t,a,"digitalAsset");e(t,c,"event");e(t,l,"faucet");e(t,f,"fungibleAsset");e(t,g,"general");e(t,h,"staking");e(t,m,"transaction");e(t,y,"table");e(t,u,"keyless");e(t,A,"object");export{t as a};
2
- //# sourceMappingURL=chunk-ZE2TCKUL.mjs.map
1
+ import{a as f}from"./chunk-7VIABVKU.mjs";import{a as g}from"./chunk-UEP4UQS5.mjs";import{a as u}from"./chunk-FDFE5GY2.mjs";import{a as A}from"./chunk-JCQYD2ZQ.mjs";import{a as h}from"./chunk-DPZO54DD.mjs";import{a as y}from"./chunk-76IW7XM5.mjs";import{a as m}from"./chunk-NAHOALKG.mjs";import{a as s}from"./chunk-V75UHXGZ.mjs";import{a as p}from"./chunk-F3RBTS5V.mjs";import{a as d}from"./chunk-NMD45OTM.mjs";import{a as r}from"./chunk-UNMUX5HS.mjs";import{a}from"./chunk-XJI57J4Q.mjs";import{a as c}from"./chunk-34PNYV2Q.mjs";import{a as l}from"./chunk-WLLWOD5T.mjs";var t=class{constructor(n){this.config=new d(n),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 l(this.config),this.fungibleAsset=new f(this.config),this.general=new g(this.config),this.staking=new h(this.config),this.transaction=new m(this.config),this.table=new y(this.config),this.keyless=new u(this.config),this.object=new A(this.config)}};function e(b,n,w){Object.getOwnPropertyNames(n.prototype).forEach(i=>{let o=Object.getOwnPropertyDescriptor(n.prototype,i);o&&(o.value=function(...j){return this[w][i](...j)},Object.defineProperty(b.prototype,i,o))})}e(t,s,"account");e(t,p,"ans");e(t,r,"coin");e(t,a,"digitalAsset");e(t,c,"event");e(t,l,"faucet");e(t,f,"fungibleAsset");e(t,g,"general");e(t,h,"staking");e(t,m,"transaction");e(t,y,"table");e(t,u,"keyless");e(t,A,"object");export{t as a};
2
+ //# sourceMappingURL=chunk-EFJCV23R.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as y}from"./chunk-B4ROOQE3.mjs";import{e as o}from"./chunk-RBIJJSGB.mjs";import{a as g,b as u}from"./chunk-BDD6OBUV.mjs";var l=class a{constructor(i){let{multiKey:s,signers:e}=i;this.publicKey=s,this.signingScheme=3,this.accountAddress=this.publicKey.authKey().derivedAddress();let r=[];for(let t of e)r.push(this.publicKey.getIndex(t.publicKey));let n=e.map((t,c)=>[t,r[c]]);n.sort((t,c)=>t[1]-c[1]),this.signers=n.map(t=>t[0]),this.signerIndicies=n.map(t=>t[1]),this.signaturesBitmap=this.publicKey.createBitmap({bits:r})}static fromPublicKeysAndSigners(i){let{publicKeys:s,signaturesRequired:e,signers:r}=i,n=new g({publicKeys:s,signaturesRequired:e});return new a({multiKey:n,signers:r})}static isMultiKeySigner(i){return i instanceof a}signWithAuthenticator(i){return new o(this.publicKey,this.sign(i))}signTransactionWithAuthenticator(i){return new o(this.publicKey,this.signTransaction(i))}async waitForProofFetch(){let s=this.signers.filter(e=>e instanceof y).map(async e=>e.waitForProofFetch());await Promise.all(s)}sign(i){let s=[];for(let e of this.signers)s.push(e.sign(i));return new u({signatures:s,bitmap:this.signaturesBitmap})}signTransaction(i){let s=[];for(let e of this.signers)s.push(e.signTransaction(i));return new u({signatures:s,bitmap:this.signaturesBitmap})}verifySignature(i){let{message:s,signature:e}=i;if(!this.signerIndicies.every((n,t)=>t===0||n>=this.signerIndicies[t-1]))return!1;for(let n=0;n<e.signatures.length;n+=1){let t=e.signatures[n];if(!this.publicKey.publicKeys[this.signerIndicies[n]].verifySignature({message:s,signature:t}))return!1}return!0}};export{l as a};
2
- //# sourceMappingURL=chunk-Y5AY3QBY.mjs.map
1
+ import{a as y}from"./chunk-BP7JPCSW.mjs";import{e as o}from"./chunk-3GGG4R4C.mjs";import{a as g,b as u}from"./chunk-EV5QBTUM.mjs";var l=class a{constructor(i){let{multiKey:s,signers:e}=i;this.publicKey=s,this.signingScheme=3,this.accountAddress=this.publicKey.authKey().derivedAddress();let r=[];for(let t of e)r.push(this.publicKey.getIndex(t.publicKey));let n=e.map((t,c)=>[t,r[c]]);n.sort((t,c)=>t[1]-c[1]),this.signers=n.map(t=>t[0]),this.signerIndicies=n.map(t=>t[1]),this.signaturesBitmap=this.publicKey.createBitmap({bits:r})}static fromPublicKeysAndSigners(i){let{publicKeys:s,signaturesRequired:e,signers:r}=i,n=new g({publicKeys:s,signaturesRequired:e});return new a({multiKey:n,signers:r})}static isMultiKeySigner(i){return i instanceof a}signWithAuthenticator(i){return new o(this.publicKey,this.sign(i))}signTransactionWithAuthenticator(i){return new o(this.publicKey,this.signTransaction(i))}async waitForProofFetch(){let s=this.signers.filter(e=>e instanceof y).map(async e=>e.waitForProofFetch());await Promise.all(s)}sign(i){let s=[];for(let e of this.signers)s.push(e.sign(i));return new u({signatures:s,bitmap:this.signaturesBitmap})}signTransaction(i){let s=[];for(let e of this.signers)s.push(e.signTransaction(i));return new u({signatures:s,bitmap:this.signaturesBitmap})}verifySignature(i){let{message:s,signature:e}=i;if(!this.signerIndicies.every((n,t)=>t===0||n>=this.signerIndicies[t-1]))return!1;for(let n=0;n<e.signatures.length;n+=1){let t=e.signatures[n];if(!this.publicKey.publicKeys[this.signerIndicies[n]].verifySignature({message:s,signature:t}))return!1}return!0}};export{l as a};
2
+ //# sourceMappingURL=chunk-EMVWSYK5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o,b as h}from"./chunk-FSTRZMCK.mjs";import{a as g}from"./chunk-MLDQ2TY2.mjs";import{b as m}from"./chunk-76OH2Z4Q.mjs";import{a as b}from"./chunk-WPYVWZQS.mjs";function d(l){let e=l;return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}var f=class l extends m{constructor(e){super();let{publicKeys:r,signaturesRequired:t}=e;if(t<1)throw new Error("The number of required signatures needs to be greater than 0");if(r.length<t)throw new Error(`Provided ${r.length} public keys is smaller than the ${t} required signatures`);this.publicKeys=r.map(i=>i instanceof o?i:new o(i)),this.signaturesRequired=t}verifySignature(e){throw new Error("not implemented")}authKey(){return b.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let r=e.deserializeVector(o),t=e.deserializeU8();return new l({publicKeys:r,signaturesRequired:t})}createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach((n,u)=>{if(u+1>this.publicKeys.length)throw new Error(`Signature index ${u+1} is out of public keys range, ${this.publicKeys.length}.`);if(a.has(n))throw new Error(`Duplicate bit ${n} detected.`);a.add(n);let c=Math.floor(n/8),y=i[c];y|=t>>n%8,i[c]=y}),i}getIndex(e){let r=e instanceof o?e:new o(e),t=this.publicKeys.findIndex(i=>i.toString()===r.toString());if(t!==-1)return t;throw new Error("Public key not found in MultiKey")}},s=class s extends g{constructor(e){super();let{signatures:r,bitmap:t}=e;if(r.length>s.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${s.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=r.map(a=>a instanceof h?a:new h(a)),!(t instanceof Uint8Array))this.bitmap=s.createBitmap({bits:t});else{if(t.length!==s.BITMAP_LEN)throw new Error(`"bitmap" length should be ${s.BITMAP_LEN}`);this.bitmap=t}let i=this.bitmap.reduce((a,n)=>a+d(n),0);if(i!==this.signatures.length)throw new Error(`Expecting ${i} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach(n=>{if(n>=s.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${s.MAX_SIGNATURES_SUPPORTED-1}.`);if(a.has(n))throw new Error("Duplicate bits detected.");a.add(n);let u=Math.floor(n/8),c=i[u];c|=t>>n%8,i[u]=c}),i}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let r=e.deserializeVector(h),t=e.deserializeBytes();return new s({signatures:r,bitmap:t})}};s.BITMAP_LEN=4,s.MAX_SIGNATURES_SUPPORTED=s.BITMAP_LEN*8;var p=s;export{f as a,p as b};
2
- //# sourceMappingURL=chunk-BDD6OBUV.mjs.map
1
+ import{a as o,b as h}from"./chunk-P2TDGITN.mjs";import{b as m}from"./chunk-76OH2Z4Q.mjs";import{a as g}from"./chunk-MLDQ2TY2.mjs";import{a as b}from"./chunk-G5MGSV7Y.mjs";function d(l){let e=l;return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}var f=class l extends m{constructor(e){super();let{publicKeys:r,signaturesRequired:t}=e;if(t<1)throw new Error("The number of required signatures needs to be greater than 0");if(r.length<t)throw new Error(`Provided ${r.length} public keys is smaller than the ${t} required signatures`);this.publicKeys=r.map(i=>i instanceof o?i:new o(i)),this.signaturesRequired=t}verifySignature(e){throw new Error("not implemented")}authKey(){return b.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let r=e.deserializeVector(o),t=e.deserializeU8();return new l({publicKeys:r,signaturesRequired:t})}createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach((n,u)=>{if(u+1>this.publicKeys.length)throw new Error(`Signature index ${u+1} is out of public keys range, ${this.publicKeys.length}.`);if(a.has(n))throw new Error(`Duplicate bit ${n} detected.`);a.add(n);let c=Math.floor(n/8),y=i[c];y|=t>>n%8,i[c]=y}),i}getIndex(e){let r=e instanceof o?e:new o(e),t=this.publicKeys.findIndex(i=>i.toString()===r.toString());if(t!==-1)return t;throw new Error("Public key not found in MultiKey")}},s=class s extends g{constructor(e){super();let{signatures:r,bitmap:t}=e;if(r.length>s.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${s.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=r.map(a=>a instanceof h?a:new h(a)),!(t instanceof Uint8Array))this.bitmap=s.createBitmap({bits:t});else{if(t.length!==s.BITMAP_LEN)throw new Error(`"bitmap" length should be ${s.BITMAP_LEN}`);this.bitmap=t}let i=this.bitmap.reduce((a,n)=>a+d(n),0);if(i!==this.signatures.length)throw new Error(`Expecting ${i} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach(n=>{if(n>=s.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${s.MAX_SIGNATURES_SUPPORTED-1}.`);if(a.has(n))throw new Error("Duplicate bits detected.");a.add(n);let u=Math.floor(n/8),c=i[u];c|=t>>n%8,i[u]=c}),i}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let r=e.deserializeVector(h),t=e.deserializeBytes();return new s({signatures:r,bitmap:t})}};s.BITMAP_LEN=4,s.MAX_SIGNATURES_SUPPORTED=s.BITMAP_LEN*8;var p=s;export{f as a,p as b};
2
+ //# sourceMappingURL=chunk-EV5QBTUM.mjs.map
@@ -1,2 +1,2 @@
1
- import{h as e,i as s,j as t,k as o,l as r,m as i,n as a,o as m,p as c,q as g,r as u,s as p,t as d}from"./chunk-J6NLU6QX.mjs";var A=class{constructor(n){this.config=n}async getOwnerAddress(n){return e({aptosConfig:this.config,...n})}async getExpiration(n){return t({aptosConfig:this.config,...n})}async getTargetAddress(n){return i({aptosConfig:this.config,...n})}async setTargetAddress(n){return a({aptosConfig:this.config,...n})}async getPrimaryName(n){return o({aptosConfig:this.config,...n})}async setPrimaryName(n){return r({aptosConfig:this.config,...n})}async registerName(n){return s({aptosConfig:this.config,...n})}async renewDomain(n){return d({aptosConfig:this.config,...n})}async getName(n){return m({aptosConfig:this.config,...n})}async getAccountNames(n){return c({aptosConfig:this.config,...n})}async getAccountDomains(n){return g({aptosConfig:this.config,...n})}async getAccountSubdomains(n){return u({aptosConfig:this.config,...n})}async getDomainSubdomains(n){return p({aptosConfig:this.config,...n})}};export{A as a};
2
- //# sourceMappingURL=chunk-QUMSKIYX.mjs.map
1
+ import{h as e,i as s,j as t,k as o,l as r,m as i,n as a,o as m,p as c,q as g,r as u,s as p,t as d}from"./chunk-QRN6BG2N.mjs";var A=class{constructor(n){this.config=n}async getOwnerAddress(n){return e({aptosConfig:this.config,...n})}async getExpiration(n){return t({aptosConfig:this.config,...n})}async getTargetAddress(n){return i({aptosConfig:this.config,...n})}async setTargetAddress(n){return a({aptosConfig:this.config,...n})}async getPrimaryName(n){return o({aptosConfig:this.config,...n})}async setPrimaryName(n){return r({aptosConfig:this.config,...n})}async registerName(n){return s({aptosConfig:this.config,...n})}async renewDomain(n){return d({aptosConfig:this.config,...n})}async getName(n){return m({aptosConfig:this.config,...n})}async getAccountNames(n){return c({aptosConfig:this.config,...n})}async getAccountDomains(n){return g({aptosConfig:this.config,...n})}async getAccountSubdomains(n){return u({aptosConfig:this.config,...n})}async getDomainSubdomains(n){return p({aptosConfig:this.config,...n})}};export{A as a};
2
+ //# sourceMappingURL=chunk-F3RBTS5V.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r,b as o,c as t}from"./chunk-DAEUQBVZ.mjs";var i=class{constructor(e){this.config=e}async getPepper(e){return r({aptosConfig:this.config,...e})}async getProof(e){return o({aptosConfig:this.config,...e})}async deriveKeylessAccount(e){return t({aptosConfig:this.config,...e})}};export{i as a};
2
- //# sourceMappingURL=chunk-NC3KKAAK.mjs.map
1
+ import{a as r,b as o,c as t}from"./chunk-IDYCJIHI.mjs";var i=class{constructor(e){this.config=e}async getPepper(e){return r({aptosConfig:this.config,...e})}async getProof(e){return o({aptosConfig:this.config,...e})}async deriveKeylessAccount(e){return t({aptosConfig:this.config,...e})}};export{i as a};
2
+ //# sourceMappingURL=chunk-FDFE5GY2.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as s}from"./chunk-WSE653RS.mjs";import{a as o}from"./chunk-A63SMUOU.mjs";import{b as n}from"./chunk-BCUSI3N6.mjs";import{sha3_256 as d}from"@noble/hashes/sha3";var r=class r extends o{constructor(t){super();let{data:e}=t,i=n.fromHexInput(e);if(i.toUint8Array().length!==r.LENGTH)throw new Error(`Authentication Key length should be ${r.LENGTH}`);this.data=i}serialize(t){t.serializeFixedBytes(this.data.toUint8Array())}static deserialize(t){let e=t.deserializeFixedBytes(r.LENGTH);return new r({data:e})}toString(){return this.data.toString()}toUint8Array(){return this.data.toUint8Array()}static fromSchemeAndBytes(t){let{scheme:e,input:i}=t,u=n.fromHexInput(i).toUint8Array(),h=new Uint8Array([...u,e]),a=d.create();a.update(h);let y=a.digest();return new r({data:y})}static fromPublicKeyAndScheme(t){let{publicKey:e}=t;return e.authKey()}static fromPublicKey(t){let{publicKey:e}=t;return e.authKey()}derivedAddress(){return new s(this.data.toUint8Array())}};r.LENGTH=32;var c=r;export{c as a};
2
- //# sourceMappingURL=chunk-WPYVWZQS.mjs.map
1
+ import{b as s}from"./chunk-OHRL766V.mjs";import{a as o}from"./chunk-A63SMUOU.mjs";import{b as n}from"./chunk-BCUSI3N6.mjs";import{sha3_256 as d}from"@noble/hashes/sha3";var r=class r extends o{constructor(t){super();let{data:e}=t,i=n.fromHexInput(e);if(i.toUint8Array().length!==r.LENGTH)throw new Error(`Authentication Key length should be ${r.LENGTH}`);this.data=i}serialize(t){t.serializeFixedBytes(this.data.toUint8Array())}static deserialize(t){let e=t.deserializeFixedBytes(r.LENGTH);return new r({data:e})}toString(){return this.data.toString()}toUint8Array(){return this.data.toUint8Array()}static fromSchemeAndBytes(t){let{scheme:e,input:i}=t,u=n.fromHexInput(i).toUint8Array(),h=new Uint8Array([...u,e]),a=d.create();a.update(h);let y=a.digest();return new r({data:y})}static fromPublicKeyAndScheme(t){let{publicKey:e}=t;return e.authKey()}static fromPublicKey(t){let{publicKey:e}=t;return e.authKey()}derivedAddress(){return new s(this.data.toUint8Array())}};r.LENGTH=32;var c=r;export{c as a};
2
+ //# sourceMappingURL=chunk-G5MGSV7Y.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-J26STL4T.mjs";import{f as t,i as o}from"./chunk-GBZOWPC6.mjs";import{e as n}from"./chunk-L36ZHC7J.mjs";var u={typeParameters:[{constraints:[]}],parameters:[new o,new t]};async function y(e){let{aptosConfig:i,sender:s,recipient:c,amount:p,coinType:a,options:m}=e;return r({aptosConfig:i,sender:s,data:{function:"0x1::aptos_account::transfer_coins",typeArguments:[a??n],functionArguments:[c,p],abi:u},options:m})}export{y as a};
2
- //# sourceMappingURL=chunk-X2QSDREG.mjs.map
1
+ import{a as r}from"./chunk-METR6A53.mjs";import{f as t,i as o}from"./chunk-SUJLWCRN.mjs";import{e as n}from"./chunk-L36ZHC7J.mjs";var u={typeParameters:[{constraints:[]}],parameters:[new o,new t]};async function y(e){let{aptosConfig:i,sender:s,recipient:c,amount:p,coinType:a,options:m}=e;return r({aptosConfig:i,sender:s,data:{function:"0x1::aptos_account::transfer_coins",typeArguments:[a??n],functionArguments:[c,p],abi:u},options:m})}export{y as a};
2
+ //# sourceMappingURL=chunk-GFUP6W3X.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-RBIJJSGB.mjs";import{a as b,b as g}from"./chunk-EMFVGL2Y.mjs";import{a as h,c as p}from"./chunk-6WAXFWLH.mjs";import{b as a}from"./chunk-WSE653RS.mjs";import{a as y}from"./chunk-A63SMUOU.mjs";var n=class extends y{static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return o.load(e);case 1:return d.load(e);case 2:return u.load(e);case 3:return l.load(e);case 4:return A.load(e);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${r}`)}}},o=class s extends n{constructor(e,r){super(),this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=h.deserialize(e),t=p.deserialize(e);return new s(r,t)}},d=class s extends n{constructor(e,r){super(),this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=b.deserialize(e),t=g.deserialize(e);return new s(r,t)}},u=class s extends n{constructor(e,r,t){super(),this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=t}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let r=i.deserialize(e),t=e.deserializeVector(a),c=e.deserializeVector(i);return new s(r,t,c)}},l=class s extends n{constructor(e,r,t,c){super(),this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=t,this.fee_payer=c}serialize(e){e.serializeU32AsUleb128(3),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){let r=i.deserialize(e),t=e.deserializeVector(a),c=e.deserializeVector(i),_=a.deserialize(e),z=i.deserialize(e),S={address:_,authenticator:z};return new s(r,t,c,S)}},A=class s extends n{constructor(e){super(),this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let r=i.deserialize(e);return new s(r)}};export{n as a,o as b,d as c,u as d,l as e,A as f};
2
- //# sourceMappingURL=chunk-V3NKDUY5.mjs.map
1
+ import{a as i}from"./chunk-3GGG4R4C.mjs";import{a as b,b as g}from"./chunk-UWPO7WWS.mjs";import{b as h,d as p}from"./chunk-Q7MD4V7H.mjs";import{b as a}from"./chunk-OHRL766V.mjs";import{a as y}from"./chunk-A63SMUOU.mjs";var n=class extends y{static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return o.load(e);case 1:return d.load(e);case 2:return u.load(e);case 3:return l.load(e);case 4:return A.load(e);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${r}`)}}},o=class s extends n{constructor(e,r){super(),this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=h.deserialize(e),t=p.deserialize(e);return new s(r,t)}},d=class s extends n{constructor(e,r){super(),this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=b.deserialize(e),t=g.deserialize(e);return new s(r,t)}},u=class s extends n{constructor(e,r,t){super(),this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=t}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let r=i.deserialize(e),t=e.deserializeVector(a),c=e.deserializeVector(i);return new s(r,t,c)}},l=class s extends n{constructor(e,r,t,c){super(),this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=t,this.fee_payer=c}serialize(e){e.serializeU32AsUleb128(3),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){let r=i.deserialize(e),t=e.deserializeVector(a),c=e.deserializeVector(i),_=a.deserialize(e),z=i.deserialize(e),S={address:_,authenticator:z};return new s(r,t,c,S)}},A=class s extends n{constructor(e){super(),this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let r=i.deserialize(e);return new s(r)}};export{n as a,o as b,d as c,u as d,l as e,A as f};
2
+ //# sourceMappingURL=chunk-GY7ARJNT.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-J26STL4T.mjs";import{c as p}from"./chunk-J4KAYDPB.mjs";import{c as o}from"./chunk-VA4HKHNV.mjs";import{n as u,q as g,r as A}from"./chunk-VHNX2NUR.mjs";import{f as a,i as r}from"./chunk-GBZOWPC6.mjs";async function G(t){let{aptosConfig:s,options:e}=t,n={query:A,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetMetadata"})).fungible_asset_metadata}async function h(t){let{aptosConfig:s,options:e}=t,n={query:g,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetActivities"})).fungible_asset_activities}async function M(t){let{aptosConfig:s,options:e}=t,n={query:u,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getCurrentFungibleAssetBalances"})).current_fungible_asset_balances}var b={typeParameters:[{constraints:[]}],parameters:[p("0x1::object::Object"),new r,new a]};async function x(t){let{aptosConfig:s,sender:e,fungibleAssetMetadataAddress:n,recipient:i,amount:l,options:f}=t;return c({aptosConfig:s,sender:e.accountAddress,data:{function:"0x1::primary_fungible_store::transfer",typeArguments:["0x1::fungible_asset::Metadata"],functionArguments:[n,i,l],abi:b},options:f})}export{G as a,h as b,M as c,x as d};
2
- //# sourceMappingURL=chunk-ME2PENQD.mjs.map
1
+ import{a as c}from"./chunk-METR6A53.mjs";import{c as p}from"./chunk-NWOMSL6K.mjs";import{c as o}from"./chunk-7WPECE2S.mjs";import{n as u,q as g,r as A}from"./chunk-VHNX2NUR.mjs";import{f as a,i as r}from"./chunk-SUJLWCRN.mjs";async function G(t){let{aptosConfig:s,options:e}=t,n={query:A,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetMetadata"})).fungible_asset_metadata}async function h(t){let{aptosConfig:s,options:e}=t,n={query:g,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetActivities"})).fungible_asset_activities}async function M(t){let{aptosConfig:s,options:e}=t,n={query:u,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getCurrentFungibleAssetBalances"})).current_fungible_asset_balances}var b={typeParameters:[{constraints:[]}],parameters:[p("0x1::object::Object"),new r,new a]};async function x(t){let{aptosConfig:s,sender:e,fungibleAssetMetadataAddress:n,recipient:i,amount:l,options:f}=t;return c({aptosConfig:s,sender:e.accountAddress,data:{function:"0x1::primary_fungible_store::transfer",typeArguments:["0x1::fungible_asset::Metadata"],functionArguments:[n,i,l],abi:b},options:f})}export{G as a,h as b,M as c,x as d};
2
+ //# sourceMappingURL=chunk-HKLJ6JKE.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as o}from"./chunk-WSE653RS.mjs";import{a as u,b as r}from"./chunk-KMJ6TF6Y.mjs";import{e as t}from"./chunk-YPHH6CAO.mjs";import{a as i}from"./chunk-A63SMUOU.mjs";var c=class extends i{constructor(e){super();this.accountAddress=o.ONE;this.moduleName=new r("account");this.structName=new r("RotationProofChallenge");this.sequenceNumber=new t(e.sequenceNumber),this.originator=e.originator,this.currentAuthKey=e.currentAuthKey,this.newPublicKey=u.U8(e.newPublicKey.toUint8Array())}serialize(e){e.serialize(this.accountAddress),e.serialize(this.moduleName),e.serialize(this.structName),e.serialize(this.sequenceNumber),e.serialize(this.originator),e.serialize(this.currentAuthKey),e.serialize(this.newPublicKey)}};export{c as a};
2
- //# sourceMappingURL=chunk-PIUICROW.mjs.map
1
+ import{b as o}from"./chunk-OHRL766V.mjs";import{a as u,b as r}from"./chunk-KMJ6TF6Y.mjs";import{e as t}from"./chunk-YPHH6CAO.mjs";import{a as i}from"./chunk-A63SMUOU.mjs";var c=class extends i{constructor(e){super();this.accountAddress=o.ONE;this.moduleName=new r("account");this.structName=new r("RotationProofChallenge");this.sequenceNumber=new t(e.sequenceNumber),this.originator=e.originator,this.currentAuthKey=e.currentAuthKey,this.newPublicKey=u.U8(e.newPublicKey.toUint8Array())}serialize(e){e.serialize(this.accountAddress),e.serialize(this.moduleName),e.serialize(this.structName),e.serialize(this.sequenceNumber),e.serialize(this.originator),e.serialize(this.currentAuthKey),e.serialize(this.newPublicKey)}};export{c as a};
2
+ //# sourceMappingURL=chunk-HKMG3LZX.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-3CB53WTP.mjs";import{a as o,b as c}from"./chunk-U6Z4FNB7.mjs";import{a as h,h as d}from"./chunk-J26STL4T.mjs";import{g as u}from"./chunk-ES5Z33UX.mjs";import g from"eventemitter3";var m="fulfilled",f=(n=>(n.TransactionSent="transactionSent",n.TransactionSendFailed="transactionSendFailed",n.TransactionExecuted="transactionExecuted",n.TransactionExecutionFailed="transactionExecutionFailed",n.ExecutionFinish="executionFinish",n))(f||{}),p=class extends g{constructor(t,e,a=30,n=100,i=10){super();this.taskQueue=new o;this.transactionsQueue=new o;this.outstandingTransactions=new o;this.sentTransactions=[];this.executedTransactions=[];this.aptosConfig=t,this.account=e,this.started=!1,this.accountSequnceNumber=new l(t,e,a,n,i)}async submitNextTransaction(){try{for(;;){let t=await this.accountSequnceNumber.nextSequenceNumber();if(t===null)return;let e=await this.generateNextTransaction(this.account,t);if(!e)return;let a=d({aptosConfig:this.aptosConfig,transaction:e,signer:this.account});await this.outstandingTransactions.enqueue([a,t])}}catch(t){if(t instanceof c)return;throw new Error(`Submit transaction failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async processTransactions(){try{for(;;){let t=[],e=[],[a,n]=await this.outstandingTransactions.dequeue();for(t.push(a),e.push(n);!this.outstandingTransactions.isEmpty();)[a,n]=await this.outstandingTransactions.dequeue(),t.push(a),e.push(n);let i=await Promise.allSettled(t);for(let s=0;s<i.length&&s<e.length;s+=1){let r=i[s];n=e[s],r.status===m?(this.sentTransactions.push([r.value.hash,n,null]),this.emit("transactionSent",{message:`transaction hash ${r.value.hash} has been committed to chain`,transactionHash:r.value.hash}),await this.checkTransaction(r,n)):(this.sentTransactions.push([r.status,n,r.reason]),this.emit("transactionSendFailed",{message:`failed to commit transaction ${this.sentTransactions.length} with error ${r.reason}`,error:r.reason}))}this.emit("executionFinish",{message:`execute ${i.length} transactions finished`})}}catch(t){if(t instanceof c)return;throw new Error(`Process execution failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async checkTransaction(t,e){try{let a=[];a.push(u({aptosConfig:this.aptosConfig,transactionHash:t.value.hash}));let n=await Promise.allSettled(a);for(let i=0;i<n.length;i+=1){let s=n[i];s.status===m?(this.executedTransactions.push([s.value.hash,e,null]),this.emit("transactionExecuted",{message:`transaction hash ${s.value.hash} has been executed on chain`,transactionHash:t.value.hash})):(this.executedTransactions.push([s.status,e,s.reason]),this.emit("transactionExecutionFailed",{message:`failed to execute transaction ${this.executedTransactions.length} with error ${s.reason}`,error:s.reason}))}}catch(a){throw new Error(`Check transaction failed for ${this.account.accountAddress.toString()} with error ${a}`)}}async push(t,e){this.transactionsQueue.enqueue([t,e])}async generateNextTransaction(t,e){if(this.transactionsQueue.isEmpty())return;let[a,n]=await this.transactionsQueue.dequeue();return h({aptosConfig:this.aptosConfig,sender:t.accountAddress,data:a,options:{...n,accountSequenceNumber:e}})}async run(){try{for(;!this.taskQueue.isCancelled();)await(await this.taskQueue.dequeue())()}catch(t){throw new Error(`Unable to start transaction batching: ${t}`)}}start(){if(this.started)throw new Error("worker has already started");this.started=!0,this.taskQueue.enqueue(()=>this.submitNextTransaction()),this.taskQueue.enqueue(()=>this.processTransactions()),this.run()}stop(){if(this.taskQueue.isCancelled())throw new Error("worker has already stopped");this.started=!1,this.taskQueue.cancel()}};export{m as a,f as b,p as c};
2
- //# sourceMappingURL=chunk-L7FA4ISG.mjs.map
1
+ import{a as l}from"./chunk-XSNOPUMC.mjs";import{a as o,b as c}from"./chunk-U6Z4FNB7.mjs";import{a as h,h as d}from"./chunk-METR6A53.mjs";import{g as u}from"./chunk-NSEC2KVP.mjs";import g from"eventemitter3";var m="fulfilled",f=(n=>(n.TransactionSent="transactionSent",n.TransactionSendFailed="transactionSendFailed",n.TransactionExecuted="transactionExecuted",n.TransactionExecutionFailed="transactionExecutionFailed",n.ExecutionFinish="executionFinish",n))(f||{}),p=class extends g{constructor(t,e,a=30,n=100,i=10){super();this.taskQueue=new o;this.transactionsQueue=new o;this.outstandingTransactions=new o;this.sentTransactions=[];this.executedTransactions=[];this.aptosConfig=t,this.account=e,this.started=!1,this.accountSequnceNumber=new l(t,e,a,n,i)}async submitNextTransaction(){try{for(;;){let t=await this.accountSequnceNumber.nextSequenceNumber();if(t===null)return;let e=await this.generateNextTransaction(this.account,t);if(!e)return;let a=d({aptosConfig:this.aptosConfig,transaction:e,signer:this.account});await this.outstandingTransactions.enqueue([a,t])}}catch(t){if(t instanceof c)return;throw new Error(`Submit transaction failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async processTransactions(){try{for(;;){let t=[],e=[],[a,n]=await this.outstandingTransactions.dequeue();for(t.push(a),e.push(n);!this.outstandingTransactions.isEmpty();)[a,n]=await this.outstandingTransactions.dequeue(),t.push(a),e.push(n);let i=await Promise.allSettled(t);for(let s=0;s<i.length&&s<e.length;s+=1){let r=i[s];n=e[s],r.status===m?(this.sentTransactions.push([r.value.hash,n,null]),this.emit("transactionSent",{message:`transaction hash ${r.value.hash} has been committed to chain`,transactionHash:r.value.hash}),await this.checkTransaction(r,n)):(this.sentTransactions.push([r.status,n,r.reason]),this.emit("transactionSendFailed",{message:`failed to commit transaction ${this.sentTransactions.length} with error ${r.reason}`,error:r.reason}))}this.emit("executionFinish",{message:`execute ${i.length} transactions finished`})}}catch(t){if(t instanceof c)return;throw new Error(`Process execution failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async checkTransaction(t,e){try{let a=[];a.push(u({aptosConfig:this.aptosConfig,transactionHash:t.value.hash}));let n=await Promise.allSettled(a);for(let i=0;i<n.length;i+=1){let s=n[i];s.status===m?(this.executedTransactions.push([s.value.hash,e,null]),this.emit("transactionExecuted",{message:`transaction hash ${s.value.hash} has been executed on chain`,transactionHash:t.value.hash})):(this.executedTransactions.push([s.status,e,s.reason]),this.emit("transactionExecutionFailed",{message:`failed to execute transaction ${this.executedTransactions.length} with error ${s.reason}`,error:s.reason}))}}catch(a){throw new Error(`Check transaction failed for ${this.account.accountAddress.toString()} with error ${a}`)}}async push(t,e){this.transactionsQueue.enqueue([t,e])}async generateNextTransaction(t,e){if(this.transactionsQueue.isEmpty())return;let[a,n]=await this.transactionsQueue.dequeue();return h({aptosConfig:this.aptosConfig,sender:t.accountAddress,data:a,options:{...n,accountSequenceNumber:e}})}async run(){try{for(;!this.taskQueue.isCancelled();)await(await this.taskQueue.dequeue())()}catch(t){throw new Error(`Unable to start transaction batching: ${t}`)}}start(){if(this.started)throw new Error("worker has already started");this.started=!0,this.taskQueue.enqueue(()=>this.submitNextTransaction()),this.taskQueue.enqueue(()=>this.processTransactions()),this.run()}stop(){if(this.taskQueue.isCancelled())throw new Error("worker has already stopped");this.started=!1,this.taskQueue.cancel()}};export{m as a,f as b,p as c};
2
+ //# sourceMappingURL=chunk-HWX6AJJ2.mjs.map
@@ -1,2 +1,2 @@
1
- import{h as e}from"./chunk-ES5Z33UX.mjs";async function i(o){o.minimumLedgerVersion!==void 0&&await e({aptosConfig:o.config,minimumLedgerVersion:o.minimumLedgerVersion,processorType:o.processorType})}export{i as a};
2
- //# sourceMappingURL=chunk-ODYVU346.mjs.map
1
+ import{h as e}from"./chunk-NSEC2KVP.mjs";async function i(o){o.minimumLedgerVersion!==void 0&&await e({aptosConfig:o.config,minimumLedgerVersion:o.minimumLedgerVersion,processorType:o.processorType})}export{i as a};
2
+ //# sourceMappingURL=chunk-HXYBTLQT.mjs.map