@aptos-labs/ts-sdk 1.32.0 → 1.32.1

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 (391) hide show
  1. package/dist/common/chunk-F43XVDYJ.js.map +1 -1
  2. package/dist/common/cli/index.js.map +1 -1
  3. package/dist/common/index.d.ts +7 -103
  4. package/dist/common/index.js +31 -31
  5. package/dist/common/index.js.map +1 -1
  6. package/dist/esm/account/AbstractKeylessAccount.d.mts +0 -1
  7. package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
  8. package/dist/esm/account/Account.d.mts +0 -1
  9. package/dist/esm/account/Account.mjs +1 -1
  10. package/dist/esm/account/Ed25519Account.d.mts +0 -1
  11. package/dist/esm/account/Ed25519Account.mjs +1 -1
  12. package/dist/esm/account/EphemeralKeyPair.d.mts +0 -1
  13. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  14. package/dist/esm/account/FederatedKeylessAccount.d.mts +0 -1
  15. package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
  16. package/dist/esm/account/KeylessAccount.d.mts +0 -1
  17. package/dist/esm/account/KeylessAccount.mjs +1 -1
  18. package/dist/esm/account/MultiKeyAccount.d.mts +0 -1
  19. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  20. package/dist/esm/account/SingleKeyAccount.d.mts +0 -1
  21. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  22. package/dist/esm/account/index.d.mts +0 -1
  23. package/dist/esm/account/index.mjs +1 -1
  24. package/dist/esm/api/account.d.mts +0 -1
  25. package/dist/esm/api/account.mjs +1 -1
  26. package/dist/esm/api/ans.d.mts +0 -1
  27. package/dist/esm/api/ans.mjs +1 -1
  28. package/dist/esm/api/aptos.d.mts +0 -2
  29. package/dist/esm/api/aptos.mjs +1 -1
  30. package/dist/esm/api/aptosConfig.d.mts +0 -1
  31. package/dist/esm/api/aptosConfig.mjs +1 -1
  32. package/dist/esm/api/coin.d.mts +2 -3
  33. package/dist/esm/api/coin.mjs +1 -1
  34. package/dist/esm/api/digitalAsset.d.mts +0 -1
  35. package/dist/esm/api/digitalAsset.mjs +1 -1
  36. package/dist/esm/api/event.d.mts +0 -1
  37. package/dist/esm/api/event.mjs +1 -1
  38. package/dist/esm/api/faucet.d.mts +0 -1
  39. package/dist/esm/api/faucet.mjs +1 -1
  40. package/dist/esm/api/fungibleAsset.d.mts +0 -1
  41. package/dist/esm/api/fungibleAsset.mjs +1 -1
  42. package/dist/esm/api/general.d.mts +0 -1
  43. package/dist/esm/api/general.mjs +1 -1
  44. package/dist/esm/api/index.d.mts +0 -2
  45. package/dist/esm/api/index.mjs +1 -1
  46. package/dist/esm/api/keyless.d.mts +1 -2
  47. package/dist/esm/api/keyless.mjs +1 -1
  48. package/dist/esm/api/object.d.mts +0 -1
  49. package/dist/esm/api/object.mjs +1 -1
  50. package/dist/esm/api/staking.d.mts +0 -1
  51. package/dist/esm/api/staking.mjs +1 -1
  52. package/dist/esm/api/table.d.mts +0 -1
  53. package/dist/esm/api/table.mjs +1 -1
  54. package/dist/esm/api/transaction.d.mts +0 -2
  55. package/dist/esm/api/transaction.mjs +1 -1
  56. package/dist/esm/api/transactionSubmission/build.d.mts +0 -66
  57. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  58. package/dist/esm/api/transactionSubmission/management.d.mts +0 -1
  59. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  60. package/dist/esm/api/transactionSubmission/sign.d.mts +0 -1
  61. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  62. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  63. package/dist/esm/api/transactionSubmission/simulate.d.mts +0 -1
  64. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  65. package/dist/esm/api/transactionSubmission/submit.d.mts +0 -1
  66. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  67. package/dist/esm/api/utils.d.mts +0 -1
  68. package/dist/esm/api/utils.mjs +1 -1
  69. package/dist/esm/bcs/consts.d.mts +0 -1
  70. package/dist/esm/bcs/deserializer.d.mts +0 -1
  71. package/dist/esm/bcs/index.d.mts +0 -1
  72. package/dist/esm/bcs/index.mjs +1 -1
  73. package/dist/esm/bcs/serializable/entryFunctionBytes.d.mts +0 -1
  74. package/dist/esm/bcs/serializable/fixedBytes.d.mts +0 -1
  75. package/dist/esm/bcs/serializable/movePrimitives.d.mts +0 -1
  76. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  77. package/dist/esm/bcs/serializable/moveStructs.d.mts +0 -1
  78. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  79. package/dist/esm/bcs/serializer.d.mts +0 -1
  80. package/dist/esm/{chunk-XKOSS5KC.mjs → chunk-26WX3UFP.mjs} +2 -2
  81. package/dist/esm/{chunk-HEHVWRMO.mjs → chunk-2E3BT4YW.mjs} +2 -2
  82. package/dist/esm/{chunk-JLD7DLKM.mjs → chunk-2LQ4FTSR.mjs} +2 -2
  83. package/dist/esm/{chunk-E2NYQVP3.mjs → chunk-2REHS35S.mjs} +2 -2
  84. package/dist/esm/{chunk-QQM47PHZ.mjs → chunk-2YTHKFJZ.mjs} +2 -2
  85. package/dist/esm/{chunk-IBMZYDAR.mjs → chunk-4IQZOAN7.mjs} +2 -2
  86. package/dist/esm/{chunk-VCY3JGZM.mjs → chunk-4J2JYRV3.mjs} +2 -2
  87. package/dist/esm/{chunk-5AKSORBJ.mjs → chunk-5KCKWL2C.mjs} +2 -2
  88. package/dist/esm/{chunk-WSFHH3BK.mjs → chunk-5O3RHPER.mjs} +2 -2
  89. package/dist/esm/{chunk-AAATWCJT.mjs → chunk-7OHMMGS6.mjs} +2 -2
  90. package/dist/esm/{chunk-L2QVUMBV.mjs → chunk-A3USS2NC.mjs} +2 -2
  91. package/dist/esm/{chunk-DP3YPGIK.mjs → chunk-AGEJNSEX.mjs} +2 -2
  92. package/dist/esm/{chunk-XT5T5LAP.mjs → chunk-BP45UJII.mjs} +2 -2
  93. package/dist/esm/{chunk-SU2WB34N.mjs → chunk-CEW2NI3K.mjs} +2 -2
  94. package/dist/esm/{chunk-6LLGRGCN.mjs → chunk-CPKG25HX.mjs} +2 -2
  95. package/dist/esm/{chunk-X3JPX7T6.mjs → chunk-D54FD6XE.mjs} +2 -2
  96. package/dist/esm/{chunk-YZ3YPLEU.mjs → chunk-DYELAVMR.mjs} +2 -2
  97. package/dist/esm/{chunk-2QBCTW67.mjs → chunk-E2GPZCQI.mjs} +2 -2
  98. package/dist/esm/{chunk-7WXDXBXK.mjs → chunk-EJKX6MGV.mjs} +2 -2
  99. package/dist/esm/{chunk-HXXELLHN.mjs → chunk-ERDYU5YQ.mjs} +2 -2
  100. package/dist/esm/{chunk-CA3Q2X6B.mjs → chunk-ETF76XA3.mjs} +2 -2
  101. package/dist/esm/chunk-FD6FGKYY.mjs +1 -0
  102. package/dist/esm/{chunk-OKE3FXIP.mjs → chunk-FFCCBAEZ.mjs} +2 -2
  103. package/dist/esm/{chunk-K4TJRYGQ.mjs → chunk-FYYTCJS4.mjs} +2 -2
  104. package/dist/esm/{chunk-3XCYCFYI.mjs → chunk-GX4CYRK4.mjs} +2 -2
  105. package/dist/esm/{chunk-5NJWJXSS.mjs → chunk-GZBVXXUL.mjs} +2 -2
  106. package/dist/esm/{chunk-IDNDUJOK.mjs → chunk-H7AALSJ7.mjs} +2 -2
  107. package/dist/esm/{chunk-SBCLBDCP.mjs → chunk-HBWIDPNN.mjs} +2 -2
  108. package/dist/esm/{chunk-PW3ISXPN.mjs → chunk-HPZQGMSH.mjs} +2 -2
  109. package/dist/esm/{chunk-OJBMR5CT.mjs → chunk-I5GENJBA.mjs} +2 -2
  110. package/dist/esm/chunk-I5OYNCZS.mjs +1 -0
  111. package/dist/esm/{chunk-JJUINAQE.mjs → chunk-II26BNYA.mjs} +2 -2
  112. package/dist/esm/{chunk-YPBNYKOD.mjs → chunk-IQ4SCMB6.mjs} +2 -2
  113. package/dist/esm/{chunk-4YEOOZ2N.mjs → chunk-IUSAYAEI.mjs} +2 -2
  114. package/dist/esm/{chunk-J245N3XF.mjs → chunk-J7PJSK3J.mjs} +2 -2
  115. package/dist/esm/{chunk-J245N3XF.mjs.map → chunk-J7PJSK3J.mjs.map} +1 -1
  116. package/dist/esm/{chunk-6K4TOFCO.mjs → chunk-JGLEKXFP.mjs} +2 -2
  117. package/dist/esm/{chunk-DDVOBEJA.mjs → chunk-JIT2FYGE.mjs} +2 -2
  118. package/dist/esm/{chunk-46L6BAJG.mjs → chunk-JONEH52T.mjs} +2 -2
  119. package/dist/esm/{chunk-XUP6VABV.mjs → chunk-K62JTXWQ.mjs} +2 -2
  120. package/dist/esm/{chunk-6PJH53CK.mjs → chunk-KCEI5JYS.mjs} +2 -2
  121. package/dist/esm/{chunk-ZRWZIAF5.mjs → chunk-KM6IOJ6Y.mjs} +2 -2
  122. package/dist/esm/chunk-KTM6KVUJ.mjs +2 -0
  123. package/dist/esm/chunk-KTM6KVUJ.mjs.map +1 -0
  124. package/dist/esm/{chunk-AVPQOD67.mjs → chunk-KX43GEAB.mjs} +2 -2
  125. package/dist/esm/{chunk-DSKAMBBL.mjs → chunk-L25CRR2W.mjs} +2 -2
  126. package/dist/esm/{chunk-WKNX43KN.mjs → chunk-LGHPJTF3.mjs} +2 -2
  127. package/dist/esm/{chunk-ONFKJ57C.mjs → chunk-LHBMBCFC.mjs} +2 -2
  128. package/dist/esm/{chunk-37Y54PJ5.mjs → chunk-LYO22HMF.mjs} +2 -2
  129. package/dist/esm/{chunk-4DNCQM3S.mjs → chunk-MBEWPBGN.mjs} +2 -2
  130. package/dist/esm/{chunk-MOGPSSTD.mjs → chunk-ML7D2CVG.mjs} +2 -2
  131. package/dist/esm/{chunk-GBVRCWCD.mjs → chunk-NF7ZQQE3.mjs} +2 -2
  132. package/dist/esm/{chunk-YNT7JHMS.mjs → chunk-O4MRRWRI.mjs} +2 -2
  133. package/dist/esm/{chunk-BLLHTGAP.mjs → chunk-OVI7L7OG.mjs} +2 -2
  134. package/dist/esm/{chunk-LAAFLCDM.mjs → chunk-P2FTRAK3.mjs} +2 -2
  135. package/dist/esm/{chunk-TM7OZT3W.mjs → chunk-Q3CWUEXI.mjs} +2 -2
  136. package/dist/esm/{chunk-F2AIWA7L.mjs → chunk-RC43EXC4.mjs} +2 -2
  137. package/dist/esm/{chunk-NARS3JDH.mjs → chunk-RLH25IDA.mjs} +2 -2
  138. package/dist/esm/{chunk-HFWFDS6Y.mjs → chunk-RSO5YIDW.mjs} +2 -2
  139. package/dist/esm/chunk-RZGTHCJY.mjs +2 -0
  140. package/dist/esm/{chunk-AMCJQIOT.mjs.map → chunk-RZGTHCJY.mjs.map} +1 -1
  141. package/dist/esm/{chunk-KT3DT5GV.mjs → chunk-SPX2YFZN.mjs} +2 -2
  142. package/dist/esm/{chunk-AHWZA3GD.mjs → chunk-SY4HK6CC.mjs} +2 -2
  143. package/dist/esm/{chunk-II654QZU.mjs → chunk-TGW36YOD.mjs} +2 -2
  144. package/dist/esm/{chunk-FXUI3SSD.mjs → chunk-TQA6HY6A.mjs} +2 -2
  145. package/dist/esm/{chunk-KA5FX53Q.mjs → chunk-U3GE6IPF.mjs} +2 -2
  146. package/dist/esm/{chunk-JDNI5VIJ.mjs → chunk-UKVH4UGL.mjs} +2 -2
  147. package/dist/esm/{chunk-H457BI3I.mjs → chunk-UWLW2VLZ.mjs} +2 -2
  148. package/dist/esm/{chunk-2NHQQQZK.mjs → chunk-VGITSRT6.mjs} +2 -2
  149. package/dist/esm/{chunk-L2SDI7PI.mjs → chunk-VGJIATTB.mjs} +2 -2
  150. package/dist/esm/chunk-WYOFF5DJ.mjs +2 -0
  151. package/dist/esm/chunk-WYOFF5DJ.mjs.map +1 -0
  152. package/dist/esm/{chunk-NHKAQRJB.mjs → chunk-X7JNNNMC.mjs} +2 -2
  153. package/dist/esm/chunk-XIB6LX22.mjs +2 -0
  154. package/dist/esm/chunk-XIB6LX22.mjs.map +1 -0
  155. package/dist/esm/{chunk-KUL55M2H.mjs → chunk-YIQ3JFHW.mjs} +2 -2
  156. package/dist/esm/{chunk-WGIYSLH6.mjs → chunk-YP3VO6GM.mjs} +2 -2
  157. package/dist/esm/cli/index.d.mts +0 -1
  158. package/dist/esm/cli/move.d.mts +0 -1
  159. package/dist/esm/client/core.d.mts +0 -1
  160. package/dist/esm/client/core.mjs +1 -1
  161. package/dist/esm/client/get.d.mts +0 -1
  162. package/dist/esm/client/get.mjs +1 -1
  163. package/dist/esm/client/index.d.mts +0 -1
  164. package/dist/esm/client/index.mjs +1 -1
  165. package/dist/esm/client/post.d.mts +0 -1
  166. package/dist/esm/client/post.mjs +1 -1
  167. package/dist/esm/core/account/index.d.mts +0 -1
  168. package/dist/esm/core/account/index.mjs +1 -1
  169. package/dist/esm/core/account/utils/address.d.mts +0 -1
  170. package/dist/esm/core/account/utils/address.mjs +1 -1
  171. package/dist/esm/core/account/utils/index.d.mts +0 -1
  172. package/dist/esm/core/account/utils/index.mjs +1 -1
  173. package/dist/esm/core/accountAddress.d.mts +0 -1
  174. package/dist/esm/core/accountAddress.mjs +1 -1
  175. package/dist/esm/core/authenticationKey.d.mts +0 -1
  176. package/dist/esm/core/authenticationKey.mjs +1 -1
  177. package/dist/esm/core/crypto/ed25519.d.mts +0 -1
  178. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  179. package/dist/esm/core/crypto/ephemeral.d.mts +0 -1
  180. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  181. package/dist/esm/core/crypto/federatedKeyless.d.mts +0 -1
  182. package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
  183. package/dist/esm/core/crypto/index.d.mts +0 -1
  184. package/dist/esm/core/crypto/index.mjs +1 -1
  185. package/dist/esm/core/crypto/keyless.d.mts +0 -1
  186. package/dist/esm/core/crypto/keyless.mjs +1 -1
  187. package/dist/esm/core/crypto/multiEd25519.d.mts +0 -1
  188. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  189. package/dist/esm/core/crypto/multiKey.d.mts +0 -1
  190. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  191. package/dist/esm/core/crypto/privateKey.d.mts +0 -1
  192. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  193. package/dist/esm/core/crypto/proof.d.mts +0 -1
  194. package/dist/esm/core/crypto/proof.mjs +1 -1
  195. package/dist/esm/core/crypto/publicKey.d.mts +0 -1
  196. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  197. package/dist/esm/core/crypto/secp256k1.d.mts +0 -1
  198. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  199. package/dist/esm/core/crypto/signature.d.mts +0 -1
  200. package/dist/esm/core/crypto/signature.mjs +1 -1
  201. package/dist/esm/core/crypto/singleKey.d.mts +0 -1
  202. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  203. package/dist/esm/core/crypto/utils.d.mts +0 -1
  204. package/dist/esm/core/hex.d.mts +0 -1
  205. package/dist/esm/core/index.d.mts +0 -1
  206. package/dist/esm/core/index.mjs +1 -1
  207. package/dist/esm/errors/index.d.mts +0 -1
  208. package/dist/esm/errors/index.mjs +1 -1
  209. package/dist/esm/index.d.mts +3 -5
  210. package/dist/esm/index.mjs +1 -1
  211. package/dist/esm/internal/account.d.mts +0 -1
  212. package/dist/esm/internal/account.mjs +1 -1
  213. package/dist/esm/internal/ans.d.mts +0 -1
  214. package/dist/esm/internal/ans.mjs +1 -1
  215. package/dist/esm/internal/coin.d.mts +0 -1
  216. package/dist/esm/internal/coin.mjs +1 -1
  217. package/dist/esm/internal/digitalAsset.d.mts +0 -1
  218. package/dist/esm/internal/digitalAsset.mjs +1 -1
  219. package/dist/esm/internal/event.d.mts +0 -1
  220. package/dist/esm/internal/event.mjs +1 -1
  221. package/dist/esm/internal/faucet.d.mts +0 -1
  222. package/dist/esm/internal/faucet.mjs +1 -1
  223. package/dist/esm/internal/fungibleAsset.d.mts +0 -1
  224. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  225. package/dist/esm/internal/general.d.mts +0 -1
  226. package/dist/esm/internal/general.mjs +1 -1
  227. package/dist/esm/internal/keyless.d.mts +0 -1
  228. package/dist/esm/internal/keyless.mjs +1 -1
  229. package/dist/esm/internal/object.d.mts +0 -1
  230. package/dist/esm/internal/object.mjs +1 -1
  231. package/dist/esm/internal/staking.d.mts +0 -1
  232. package/dist/esm/internal/staking.mjs +1 -1
  233. package/dist/esm/internal/table.d.mts +0 -1
  234. package/dist/esm/internal/table.mjs +1 -1
  235. package/dist/esm/internal/transaction.d.mts +0 -1
  236. package/dist/esm/internal/transaction.mjs +1 -1
  237. package/dist/esm/internal/transactionSubmission.d.mts +0 -1
  238. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  239. package/dist/esm/internal/view.d.mts +0 -1
  240. package/dist/esm/internal/view.mjs +1 -1
  241. package/dist/esm/transactions/authenticator/account.d.mts +0 -1
  242. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  243. package/dist/esm/transactions/authenticator/index.d.mts +0 -1
  244. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  245. package/dist/esm/transactions/authenticator/transaction.d.mts +0 -1
  246. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  247. package/dist/esm/transactions/index.d.mts +2 -4
  248. package/dist/esm/transactions/index.mjs +1 -1
  249. package/dist/esm/transactions/instances/chainId.d.mts +0 -1
  250. package/dist/esm/transactions/instances/identifier.d.mts +0 -1
  251. package/dist/esm/transactions/instances/index.d.mts +0 -1
  252. package/dist/esm/transactions/instances/index.mjs +1 -1
  253. package/dist/esm/transactions/instances/moduleId.d.mts +0 -1
  254. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  255. package/dist/esm/transactions/instances/multiAgentTransaction.d.mts +0 -1
  256. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  257. package/dist/esm/transactions/instances/rawTransaction.d.mts +0 -1
  258. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  259. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +0 -1
  260. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  261. package/dist/esm/transactions/instances/signedTransaction.d.mts +0 -1
  262. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  263. package/dist/esm/transactions/instances/simpleTransaction.d.mts +0 -1
  264. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  265. package/dist/esm/transactions/instances/transactionArgument.d.mts +0 -1
  266. package/dist/esm/transactions/instances/transactionPayload.d.mts +0 -1
  267. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  268. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +0 -1
  269. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  270. package/dist/esm/transactions/management/index.d.mts +0 -1
  271. package/dist/esm/transactions/management/index.mjs +1 -1
  272. package/dist/esm/transactions/management/transactionWorker.d.mts +0 -1
  273. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  274. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +0 -1
  275. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  276. package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -2
  277. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  278. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +2 -23
  279. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  280. package/dist/esm/transactions/transactionBuilder/signingMessage.d.mts +0 -1
  281. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  282. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +0 -1
  283. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  284. package/dist/esm/transactions/typeTag/index.d.mts +0 -1
  285. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  286. package/dist/esm/transactions/typeTag/parser.d.mts +0 -1
  287. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  288. package/dist/esm/transactions/types.d.mts +1 -10
  289. package/dist/esm/types/index.d.mts +0 -1
  290. package/dist/esm/types/index.mjs +1 -1
  291. package/dist/esm/types/types.d.mts +0 -1
  292. package/dist/esm/utils/const.d.mts +7 -1
  293. package/dist/esm/utils/const.mjs +1 -1
  294. package/dist/esm/utils/helpers.d.mts +0 -1
  295. package/dist/esm/utils/index.d.mts +1 -2
  296. package/dist/esm/utils/index.mjs +1 -1
  297. package/dist/esm/utils/normalizeBundle.d.mts +0 -1
  298. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  299. package/dist/esm/version.d.mts +1 -1
  300. package/dist/esm/version.mjs +1 -1
  301. package/package.json +1 -2
  302. package/src/api/transactionSubmission/build.ts +1 -82
  303. package/src/internal/keyless.ts +11 -1
  304. package/src/transactions/index.ts +0 -1
  305. package/src/transactions/transactionBuilder/remoteAbi.ts +1 -55
  306. package/src/transactions/types.ts +0 -11
  307. package/src/types/index.ts +0 -1
  308. package/src/utils/const.ts +7 -0
  309. package/src/version.ts +1 -1
  310. package/dist/esm/chunk-3DQVGPFE.mjs +0 -2
  311. package/dist/esm/chunk-3DQVGPFE.mjs.map +0 -1
  312. package/dist/esm/chunk-4PBXTMN3.mjs +0 -2
  313. package/dist/esm/chunk-4PBXTMN3.mjs.map +0 -1
  314. package/dist/esm/chunk-AMCJQIOT.mjs +0 -2
  315. package/dist/esm/chunk-EEB7EZFO.mjs +0 -2
  316. package/dist/esm/chunk-EEB7EZFO.mjs.map +0 -1
  317. package/dist/esm/chunk-G2GN4LH5.mjs +0 -2
  318. package/dist/esm/chunk-G2GN4LH5.mjs.map +0 -1
  319. package/dist/esm/chunk-L56DQ4N3.mjs +0 -2
  320. package/dist/esm/chunk-L56DQ4N3.mjs.map +0 -1
  321. package/dist/esm/chunk-UIRAXHDH.mjs +0 -1
  322. package/dist/esm/transactions/script-composer/index.d.mts +0 -44
  323. package/dist/esm/transactions/script-composer/index.mjs +0 -2
  324. package/src/transactions/script-composer/index.ts +0 -76
  325. /package/dist/esm/{chunk-XKOSS5KC.mjs.map → chunk-26WX3UFP.mjs.map} +0 -0
  326. /package/dist/esm/{chunk-HEHVWRMO.mjs.map → chunk-2E3BT4YW.mjs.map} +0 -0
  327. /package/dist/esm/{chunk-JLD7DLKM.mjs.map → chunk-2LQ4FTSR.mjs.map} +0 -0
  328. /package/dist/esm/{chunk-E2NYQVP3.mjs.map → chunk-2REHS35S.mjs.map} +0 -0
  329. /package/dist/esm/{chunk-QQM47PHZ.mjs.map → chunk-2YTHKFJZ.mjs.map} +0 -0
  330. /package/dist/esm/{chunk-IBMZYDAR.mjs.map → chunk-4IQZOAN7.mjs.map} +0 -0
  331. /package/dist/esm/{chunk-VCY3JGZM.mjs.map → chunk-4J2JYRV3.mjs.map} +0 -0
  332. /package/dist/esm/{chunk-5AKSORBJ.mjs.map → chunk-5KCKWL2C.mjs.map} +0 -0
  333. /package/dist/esm/{chunk-WSFHH3BK.mjs.map → chunk-5O3RHPER.mjs.map} +0 -0
  334. /package/dist/esm/{chunk-AAATWCJT.mjs.map → chunk-7OHMMGS6.mjs.map} +0 -0
  335. /package/dist/esm/{chunk-L2QVUMBV.mjs.map → chunk-A3USS2NC.mjs.map} +0 -0
  336. /package/dist/esm/{chunk-DP3YPGIK.mjs.map → chunk-AGEJNSEX.mjs.map} +0 -0
  337. /package/dist/esm/{chunk-XT5T5LAP.mjs.map → chunk-BP45UJII.mjs.map} +0 -0
  338. /package/dist/esm/{chunk-SU2WB34N.mjs.map → chunk-CEW2NI3K.mjs.map} +0 -0
  339. /package/dist/esm/{chunk-6LLGRGCN.mjs.map → chunk-CPKG25HX.mjs.map} +0 -0
  340. /package/dist/esm/{chunk-X3JPX7T6.mjs.map → chunk-D54FD6XE.mjs.map} +0 -0
  341. /package/dist/esm/{chunk-YZ3YPLEU.mjs.map → chunk-DYELAVMR.mjs.map} +0 -0
  342. /package/dist/esm/{chunk-2QBCTW67.mjs.map → chunk-E2GPZCQI.mjs.map} +0 -0
  343. /package/dist/esm/{chunk-7WXDXBXK.mjs.map → chunk-EJKX6MGV.mjs.map} +0 -0
  344. /package/dist/esm/{chunk-HXXELLHN.mjs.map → chunk-ERDYU5YQ.mjs.map} +0 -0
  345. /package/dist/esm/{chunk-CA3Q2X6B.mjs.map → chunk-ETF76XA3.mjs.map} +0 -0
  346. /package/dist/esm/{chunk-UIRAXHDH.mjs.map → chunk-FD6FGKYY.mjs.map} +0 -0
  347. /package/dist/esm/{chunk-OKE3FXIP.mjs.map → chunk-FFCCBAEZ.mjs.map} +0 -0
  348. /package/dist/esm/{chunk-K4TJRYGQ.mjs.map → chunk-FYYTCJS4.mjs.map} +0 -0
  349. /package/dist/esm/{chunk-3XCYCFYI.mjs.map → chunk-GX4CYRK4.mjs.map} +0 -0
  350. /package/dist/esm/{chunk-5NJWJXSS.mjs.map → chunk-GZBVXXUL.mjs.map} +0 -0
  351. /package/dist/esm/{chunk-IDNDUJOK.mjs.map → chunk-H7AALSJ7.mjs.map} +0 -0
  352. /package/dist/esm/{chunk-SBCLBDCP.mjs.map → chunk-HBWIDPNN.mjs.map} +0 -0
  353. /package/dist/esm/{chunk-PW3ISXPN.mjs.map → chunk-HPZQGMSH.mjs.map} +0 -0
  354. /package/dist/esm/{chunk-OJBMR5CT.mjs.map → chunk-I5GENJBA.mjs.map} +0 -0
  355. /package/dist/esm/{transactions/script-composer/index.mjs.map → chunk-I5OYNCZS.mjs.map} +0 -0
  356. /package/dist/esm/{chunk-JJUINAQE.mjs.map → chunk-II26BNYA.mjs.map} +0 -0
  357. /package/dist/esm/{chunk-YPBNYKOD.mjs.map → chunk-IQ4SCMB6.mjs.map} +0 -0
  358. /package/dist/esm/{chunk-4YEOOZ2N.mjs.map → chunk-IUSAYAEI.mjs.map} +0 -0
  359. /package/dist/esm/{chunk-6K4TOFCO.mjs.map → chunk-JGLEKXFP.mjs.map} +0 -0
  360. /package/dist/esm/{chunk-DDVOBEJA.mjs.map → chunk-JIT2FYGE.mjs.map} +0 -0
  361. /package/dist/esm/{chunk-46L6BAJG.mjs.map → chunk-JONEH52T.mjs.map} +0 -0
  362. /package/dist/esm/{chunk-XUP6VABV.mjs.map → chunk-K62JTXWQ.mjs.map} +0 -0
  363. /package/dist/esm/{chunk-6PJH53CK.mjs.map → chunk-KCEI5JYS.mjs.map} +0 -0
  364. /package/dist/esm/{chunk-ZRWZIAF5.mjs.map → chunk-KM6IOJ6Y.mjs.map} +0 -0
  365. /package/dist/esm/{chunk-AVPQOD67.mjs.map → chunk-KX43GEAB.mjs.map} +0 -0
  366. /package/dist/esm/{chunk-DSKAMBBL.mjs.map → chunk-L25CRR2W.mjs.map} +0 -0
  367. /package/dist/esm/{chunk-WKNX43KN.mjs.map → chunk-LGHPJTF3.mjs.map} +0 -0
  368. /package/dist/esm/{chunk-ONFKJ57C.mjs.map → chunk-LHBMBCFC.mjs.map} +0 -0
  369. /package/dist/esm/{chunk-37Y54PJ5.mjs.map → chunk-LYO22HMF.mjs.map} +0 -0
  370. /package/dist/esm/{chunk-4DNCQM3S.mjs.map → chunk-MBEWPBGN.mjs.map} +0 -0
  371. /package/dist/esm/{chunk-MOGPSSTD.mjs.map → chunk-ML7D2CVG.mjs.map} +0 -0
  372. /package/dist/esm/{chunk-GBVRCWCD.mjs.map → chunk-NF7ZQQE3.mjs.map} +0 -0
  373. /package/dist/esm/{chunk-YNT7JHMS.mjs.map → chunk-O4MRRWRI.mjs.map} +0 -0
  374. /package/dist/esm/{chunk-BLLHTGAP.mjs.map → chunk-OVI7L7OG.mjs.map} +0 -0
  375. /package/dist/esm/{chunk-LAAFLCDM.mjs.map → chunk-P2FTRAK3.mjs.map} +0 -0
  376. /package/dist/esm/{chunk-TM7OZT3W.mjs.map → chunk-Q3CWUEXI.mjs.map} +0 -0
  377. /package/dist/esm/{chunk-F2AIWA7L.mjs.map → chunk-RC43EXC4.mjs.map} +0 -0
  378. /package/dist/esm/{chunk-NARS3JDH.mjs.map → chunk-RLH25IDA.mjs.map} +0 -0
  379. /package/dist/esm/{chunk-HFWFDS6Y.mjs.map → chunk-RSO5YIDW.mjs.map} +0 -0
  380. /package/dist/esm/{chunk-KT3DT5GV.mjs.map → chunk-SPX2YFZN.mjs.map} +0 -0
  381. /package/dist/esm/{chunk-AHWZA3GD.mjs.map → chunk-SY4HK6CC.mjs.map} +0 -0
  382. /package/dist/esm/{chunk-II654QZU.mjs.map → chunk-TGW36YOD.mjs.map} +0 -0
  383. /package/dist/esm/{chunk-FXUI3SSD.mjs.map → chunk-TQA6HY6A.mjs.map} +0 -0
  384. /package/dist/esm/{chunk-KA5FX53Q.mjs.map → chunk-U3GE6IPF.mjs.map} +0 -0
  385. /package/dist/esm/{chunk-JDNI5VIJ.mjs.map → chunk-UKVH4UGL.mjs.map} +0 -0
  386. /package/dist/esm/{chunk-H457BI3I.mjs.map → chunk-UWLW2VLZ.mjs.map} +0 -0
  387. /package/dist/esm/{chunk-2NHQQQZK.mjs.map → chunk-VGITSRT6.mjs.map} +0 -0
  388. /package/dist/esm/{chunk-L2SDI7PI.mjs.map → chunk-VGJIATTB.mjs.map} +0 -0
  389. /package/dist/esm/{chunk-NHKAQRJB.mjs.map → chunk-X7JNNNMC.mjs.map} +0 -0
  390. /package/dist/esm/{chunk-KUL55M2H.mjs.map → chunk-YIQ3JFHW.mjs.map} +0 -0
  391. /package/dist/esm/{chunk-WGIYSLH6.mjs.map → chunk-YP3VO6GM.mjs.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as o}from"./chunk-XT5T5LAP.mjs";import{a as d}from"./chunk-NHKAQRJB.mjs";import{a as y,b as l,c as C,d as T,e as O,f as h,g as L,h as P,i as S,j as V,k as b,l as R,n as w,o as I,p as v,q as k}from"./chunk-K4TJRYGQ.mjs";import{a as f}from"./chunk-6ZOVTYLJ.mjs";import{a as p}from"./chunk-HBIDHQ2M.mjs";import{b as r}from"./chunk-JNO7KPMG.mjs";import{e as u,f as A}from"./chunk-J245N3XF.mjs";import{h as g,i as m}from"./chunk-V4FKFCBL.mjs";var M=class{constructor(e){this.config=e}async getAccountInfo(e){return y({aptosConfig:this.config,...e})}async getAccountModules(e){return l({aptosConfig:this.config,...e})}async getAccountModule(e){return C({aptosConfig:this.config,...e})}async getAccountTransactions(e){return T({aptosConfig:this.config,...e})}async getAccountResources(e){return O({aptosConfig:this.config,...e})}async getAccountResource(e){return h({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return L({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),P({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),S({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),V({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),b({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),R({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),w({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),I({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:u,faMetadataAddress:A,...e})}async getAccountCoinAmount(e){let{accountAddress:a,coinType:s,faMetadataAddress:t,minimumLedgerVersion:N}=e;N&&console.warn(`minimumLedgerVersion is not used anymore, here for backward
1
+ import{a as d}from"./chunk-X7JNNNMC.mjs";import{a as y,b as l,c as C,d as T,e as O,f as h,g as L,h as P,i as S,j as V,k as b,l as R,n as w,o as I,p as v,q as k}from"./chunk-FYYTCJS4.mjs";import{a as o}from"./chunk-BP45UJII.mjs";import{a as f}from"./chunk-6ZOVTYLJ.mjs";import{b as r}from"./chunk-JNO7KPMG.mjs";import{a as p}from"./chunk-HBIDHQ2M.mjs";import{h as g,i as m}from"./chunk-V4FKFCBL.mjs";import{e as u,f as A}from"./chunk-J7PJSK3J.mjs";var M=class{constructor(e){this.config=e}async getAccountInfo(e){return y({aptosConfig:this.config,...e})}async getAccountModules(e){return l({aptosConfig:this.config,...e})}async getAccountModule(e){return C({aptosConfig:this.config,...e})}async getAccountTransactions(e){return T({aptosConfig:this.config,...e})}async getAccountResources(e){return O({aptosConfig:this.config,...e})}async getAccountResource(e){return h({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return L({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),P({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),S({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),V({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),b({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),R({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),w({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),I({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:u,faMetadataAddress:A,...e})}async getAccountCoinAmount(e){let{accountAddress:a,coinType:s,faMetadataAddress:t,minimumLedgerVersion:N}=e;N&&console.warn(`minimumLedgerVersion is not used anymore, here for backward
2
2
  compatibility see https://github.com/aptos-labs/aptos-ts-sdk/pull/519,
3
3
  will be removed in the near future`);let c=s;s===void 0&&t!==void 0&&(c=await p(async()=>{try{let n=(await d({aptosConfig:this.config,payload:{function:"0x1::coin::paired_coin",functionArguments:[t]}})).at(0);if(n.vec.length>0&&m(n.vec[0]))return g(n.vec[0])}catch{}},`coin-mapping-${t.toString()}`,1e3*60*5)());let i;if(s!==void 0&&t!==void 0)i=r.from(t).toStringLong();else if(s!==void 0&&t===void 0)s===u?i=r.A.toStringLong():i=f(r.A,s).toStringLong();else if(s===void 0&&t!==void 0){let n=r.from(t);i=n.toStringLong(),n===r.A&&(c=u)}else throw new Error("Either coinType, faMetadataAddress, or both must be provided");if(c!==void 0){let[n]=await d({aptosConfig:this.config,payload:{function:"0x1::coin::balance",typeArguments:[c],functionArguments:[a]}});return parseInt(n,10)}let[E]=await d({aptosConfig:this.config,payload:{function:"0x1::primary_fungible_store::balance",typeArguments:["0x1::object::ObjectCore"],functionArguments:[a,i]}});return parseInt(E,10)}async getAccountOwnedObjects(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),v({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return k({aptosConfig:this.config,...e})}};export{M as a};
4
- //# sourceMappingURL=chunk-4YEOOZ2N.mjs.map
4
+ //# sourceMappingURL=chunk-IUSAYAEI.mjs.map
@@ -1,2 +1,2 @@
1
- var S=(O=>(O.FULLNODE="Fullnode",O.INDEXER="Indexer",O.FAUCET="Faucet",O.PEPPER="Pepper",O.PROVER="Prover",O))(S||{}),t=2e5,R=20,n=20,o="0x1::aptos_coin::AptosCoin",A="0x000000000000000000000000000000000000000000000000000000000000000a",T="APTOS::RawTransaction",a="APTOS::RawTransactionWithData",E=(_=>(_.ACCOUNT_TRANSACTION_PROCESSOR="account_transactions_processor",_.DEFAULT="default_processor",_.EVENTS_PROCESSOR="events_processor",_.FUNGIBLE_ASSET_PROCESSOR="fungible_asset_processor",_.STAKE_PROCESSOR="stake_processor",_.TOKEN_V2_PROCESSOR="token_v2_processor",_.USER_TRANSACTION_PROCESSOR="user_transaction_processor",_.OBJECT_PROCESSOR="objects_processor",_))(E||{});export{S as a,t as b,R as c,n as d,o as e,A as f,T as g,a as h,E as i};
2
- //# sourceMappingURL=chunk-J245N3XF.mjs.map
1
+ var t=(S=>(S.FULLNODE="Fullnode",S.INDEXER="Indexer",S.FAUCET="Faucet",S.PEPPER="Pepper",S.PROVER="Prover",S))(t||{}),O=2e5,o=20,R=20,n="0x1::aptos_coin::AptosCoin",A="0x000000000000000000000000000000000000000000000000000000000000000a",T="APTOS::RawTransaction",a="APTOS::RawTransactionWithData",E=(_=>(_.ACCOUNT_TRANSACTION_PROCESSOR="account_transactions_processor",_.DEFAULT="default_processor",_.EVENTS_PROCESSOR="events_processor",_.FUNGIBLE_ASSET_PROCESSOR="fungible_asset_processor",_.STAKE_PROCESSOR="stake_processor",_.TOKEN_V2_PROCESSOR="token_v2_processor",_.USER_TRANSACTION_PROCESSOR="user_transaction_processor",_.OBJECT_PROCESSOR="objects_processor",_))(E||{}),r=/^https:\/\/securetoken\.google\.com\/[a-zA-Z0-9-_]+$/;export{t as a,O as b,o as c,R as d,n as e,A as f,T as g,a as h,E as i,r as j};
2
+ //# sourceMappingURL=chunk-J7PJSK3J.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/const.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Types of API endpoints used for routing requests in the Aptos network.\n */\nexport enum AptosApiType {\n FULLNODE = \"Fullnode\",\n INDEXER = \"Indexer\",\n FAUCET = \"Faucet\",\n PEPPER = \"Pepper\",\n PROVER = \"Prover\",\n}\n\n/**\n * The default max gas amount when none is given.\n *\n * This is the maximum number of gas units that will be used by a transaction before being rejected.\n *\n * Note that max gas amount varies based on the transaction. A larger transaction will go over this\n * default gas amount, and the value will need to be changed for the specific transaction.\n */\nexport const DEFAULT_MAX_GAS_AMOUNT = 200000;\n\n/**\n * The default transaction expiration seconds from now.\n *\n * This time is how long until the blockchain nodes will reject the transaction.\n *\n * Note that the transaction expiration time varies based on network connection and network load. It may need to be\n * increased for the transaction to be processed.\n */\nexport const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;\n\n/**\n * The default number of seconds to wait for a transaction to be processed.\n *\n * This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for\n * the results of the transaction. It may take longer based on network connection and network load.\n */\nexport const DEFAULT_TXN_TIMEOUT_SEC = 20;\n\n/**\n * The default gas currency for the network.\n */\nexport const APTOS_COIN = \"0x1::aptos_coin::AptosCoin\";\nexport const APTOS_FA = \"0x000000000000000000000000000000000000000000000000000000000000000a\";\n\nexport const RAW_TRANSACTION_SALT = \"APTOS::RawTransaction\";\nexport const RAW_TRANSACTION_WITH_DATA_SALT = \"APTOS::RawTransactionWithData\";\n\n/**\n * Supported processor types for the indexer API, sourced from the processor_status table in the indexer database.\n * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}\n */\nexport enum ProcessorType {\n ACCOUNT_TRANSACTION_PROCESSOR = \"account_transactions_processor\",\n DEFAULT = \"default_processor\",\n EVENTS_PROCESSOR = \"events_processor\",\n // Fungible asset processor also handles coins\n FUNGIBLE_ASSET_PROCESSOR = \"fungible_asset_processor\",\n STAKE_PROCESSOR = \"stake_processor\",\n // Token V2 processor replaces Token processor (not only for digital assets)\n TOKEN_V2_PROCESSOR = \"token_v2_processor\",\n USER_TRANSACTION_PROCESSOR = \"user_transaction_processor\",\n OBJECT_PROCESSOR = \"objects_processor\",\n}\n"],"mappings":"AAMO,IAAKA,OACVA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,OAAS,SALCA,OAAA,IAgBCC,EAAyB,IAUzBC,EAA+B,GAQ/BC,EAA0B,GAK1BC,EAAa,6BACbC,EAAW,qEAEXC,EAAuB,wBACvBC,EAAiC,gCAMlCC,OACVA,EAAA,8BAAgC,iCAChCA,EAAA,QAAU,oBACVA,EAAA,iBAAmB,mBAEnBA,EAAA,yBAA2B,2BAC3BA,EAAA,gBAAkB,kBAElBA,EAAA,mBAAqB,qBACrBA,EAAA,2BAA6B,6BAC7BA,EAAA,iBAAmB,oBAVTA,OAAA","names":["AptosApiType","DEFAULT_MAX_GAS_AMOUNT","DEFAULT_TXN_EXP_SEC_FROM_NOW","DEFAULT_TXN_TIMEOUT_SEC","APTOS_COIN","APTOS_FA","RAW_TRANSACTION_SALT","RAW_TRANSACTION_WITH_DATA_SALT","ProcessorType"]}
1
+ {"version":3,"sources":["../../src/utils/const.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Types of API endpoints used for routing requests in the Aptos network.\n */\nexport enum AptosApiType {\n FULLNODE = \"Fullnode\",\n INDEXER = \"Indexer\",\n FAUCET = \"Faucet\",\n PEPPER = \"Pepper\",\n PROVER = \"Prover\",\n}\n\n/**\n * The default max gas amount when none is given.\n *\n * This is the maximum number of gas units that will be used by a transaction before being rejected.\n *\n * Note that max gas amount varies based on the transaction. A larger transaction will go over this\n * default gas amount, and the value will need to be changed for the specific transaction.\n */\nexport const DEFAULT_MAX_GAS_AMOUNT = 200000;\n\n/**\n * The default transaction expiration seconds from now.\n *\n * This time is how long until the blockchain nodes will reject the transaction.\n *\n * Note that the transaction expiration time varies based on network connection and network load. It may need to be\n * increased for the transaction to be processed.\n */\nexport const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;\n\n/**\n * The default number of seconds to wait for a transaction to be processed.\n *\n * This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for\n * the results of the transaction. It may take longer based on network connection and network load.\n */\nexport const DEFAULT_TXN_TIMEOUT_SEC = 20;\n\n/**\n * The default gas currency for the network.\n */\nexport const APTOS_COIN = \"0x1::aptos_coin::AptosCoin\";\nexport const APTOS_FA = \"0x000000000000000000000000000000000000000000000000000000000000000a\";\n\nexport const RAW_TRANSACTION_SALT = \"APTOS::RawTransaction\";\nexport const RAW_TRANSACTION_WITH_DATA_SALT = \"APTOS::RawTransactionWithData\";\n\n/**\n * Supported processor types for the indexer API, sourced from the processor_status table in the indexer database.\n * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}\n */\nexport enum ProcessorType {\n ACCOUNT_TRANSACTION_PROCESSOR = \"account_transactions_processor\",\n DEFAULT = \"default_processor\",\n EVENTS_PROCESSOR = \"events_processor\",\n // Fungible asset processor also handles coins\n FUNGIBLE_ASSET_PROCESSOR = \"fungible_asset_processor\",\n STAKE_PROCESSOR = \"stake_processor\",\n // Token V2 processor replaces Token processor (not only for digital assets)\n TOKEN_V2_PROCESSOR = \"token_v2_processor\",\n USER_TRANSACTION_PROCESSOR = \"user_transaction_processor\",\n OBJECT_PROCESSOR = \"objects_processor\",\n}\n\n/**\n * Regular expression pattern for Firebase Auth issuer URLs\n * Matches URLs in the format: https://securetoken.google.com/[project-id]\n * where project-id can contain letters, numbers, hyphens, and underscores\n */\nexport const FIREBASE_AUTH_ISS_PATTERN = /^https:\\/\\/securetoken\\.google\\.com\\/[a-zA-Z0-9-_]+$/;\n"],"mappings":"AAMO,IAAKA,OACVA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,OAAS,SALCA,OAAA,IAgBCC,EAAyB,IAUzBC,EAA+B,GAQ/BC,EAA0B,GAK1BC,EAAa,6BACbC,EAAW,qEAEXC,EAAuB,wBACvBC,EAAiC,gCAMlCC,OACVA,EAAA,8BAAgC,iCAChCA,EAAA,QAAU,oBACVA,EAAA,iBAAmB,mBAEnBA,EAAA,yBAA2B,2BAC3BA,EAAA,gBAAkB,kBAElBA,EAAA,mBAAqB,qBACrBA,EAAA,2BAA6B,6BAC7BA,EAAA,iBAAmB,oBAVTA,OAAA,IAkBCC,EAA4B","names":["AptosApiType","DEFAULT_MAX_GAS_AMOUNT","DEFAULT_TXN_EXP_SEC_FROM_NOW","DEFAULT_TXN_TIMEOUT_SEC","APTOS_COIN","APTOS_FA","RAW_TRANSACTION_SALT","RAW_TRANSACTION_WITH_DATA_SALT","ProcessorType","FIREBASE_AUTH_ISS_PATTERN"]}
@@ -1,2 +1,2 @@
1
- import{a as o,b as r,c as t,d as s}from"./chunk-DSKAMBBL.mjs";import{a as n}from"./chunk-XT5T5LAP.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-6K4TOFCO.mjs.map
1
+ import{a as o,b as r,c as t,d as s}from"./chunk-L25CRR2W.mjs";import{a as n}from"./chunk-BP45UJII.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-JGLEKXFP.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-AHWZA3GD.mjs";import{a as g}from"./chunk-NHKAQRJB.mjs";import{c as A}from"./chunk-PW3ISXPN.mjs";import{s as f}from"./chunk-VHNX2NUR.mjs";import{b as w}from"./chunk-JNO7KPMG.mjs";var T=["A name must be between 3 and 63 characters long,","and can only contain lowercase a-z, 0-9, and hyphens.","A name may not start or end with a hyphen."].join(" ");function D(e){return!(!e||e.length<3||e.length>63||!/^[a-z\d][a-z\d-]{1,61}[a-z\d]$/.test(e))}function c(e){let[t,n,...o]=e.replace(/\.apt$/,"").split(".");if(o.length>0)throw new Error(`${e} is invalid. A name can only have two parts, a domain and a subdomain separated by a "."`);if(!D(t))throw new Error(`${t} is not valid. ${T}`);if(n&&!D(n))throw new Error(`${n} is not valid. ${T}`);return{domainName:n||t,subdomainName:n?t:void 0}}var I=(n=>(n[n.Independent=0]="Independent",n[n.FollowsDomain=1]="FollowsDomain",n))(I||{});function E(e){if(!e)return!1;let t=new Date(e.domain_expiration_timestamp).getTime()<Date.now(),n=new Date(e.expiration_timestamp).getTime()<Date.now();return e.subdomain&&t?!1:e.subdomain&&e.subdomain_expiration_policy===1?!0:!n}var j="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",v="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",O={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:v,custom:null,devnet:null};function d(e){let t=O[e.network];if(!t)throw new Error(`The ANS contract is not deployed to ${e.network}`);return t}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function F(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n),i=await g({aptosConfig:t,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function Y(e){let{aptosConfig:t,expiration:n,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(t),{domainName:y,subdomainName:N}=c(o),x=n.policy==="subdomain:independent"||n.policy==="subdomain:follow-domain";if(N&&!x)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(x&&!N)throw new Error(`Policy is set to ${n.policy} but no subdomain was provided`);if(n.policy==="domain"){let h=n.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let G=h*31536e3;return await m({aptosConfig:t,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[y,G,s,i]},options:a})}if(!N)throw new Error(`${n.policy} requires a subdomain to be provided.`);let _=await P({aptosConfig:t,name:y});if(!_)throw new Error("The domain does not exist");let S=n.policy==="subdomain:independent"?n.expirationDate:_;if(S>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:t,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[y,N,Math.round(S/1e3),n.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function P(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n);try{let i=await g({aptosConfig:t,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function K(e){let{aptosConfig:t,address:n}=e,o=d(t),r=await g({aptosConfig:t,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(n).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function W(e){let{aptosConfig:t,sender:n,name:o,options:r}=e,s=d(t);if(!o)return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function H(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n),i=await g({aptosConfig:t,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function J(e){let{aptosConfig:t,sender:n,name:o,address:r,options:s}=e,i=d(t),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function X(e){let{aptosConfig:t,name:n}=e,{domainName:o,subdomainName:r=""}=c(n),a=(await A({aptosConfig:t,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=l(a)),E(a)?a:void 0}async function Z(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountNames",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(l)}async function ee(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountDomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(l)}async function ne(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(l)}async function te(e){let{aptosConfig:t,options:n,domain:o}=e;return(await A({aptosConfig:t,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""}}}}})).current_aptos_names.map(l).filter(E)}async function C(e){let{aptosConfig:t}=e,n=d(t),[o]=await g({aptosConfig:t,payload:{function:`${n}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function oe(e){let{aptosConfig:t,sender:n,name:o,years:r=1,options:s}=e,i=d(t),a=r*31536e3,{domainName:u,subdomainName:p}=c(o);if(p)throw new Error("Subdomains cannot be renewed");if(r!==1)throw new Error("Currently, only 1 year renewals are supported");return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function l(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,D as b,c,I as d,E as e,j as f,v as g,F as h,Y as i,P as j,K as k,W as l,H as m,J as n,X as o,Z as p,ee as q,ne as r,te as s,oe as t};
2
- //# sourceMappingURL=chunk-DDVOBEJA.mjs.map
1
+ import{a as m}from"./chunk-SY4HK6CC.mjs";import{a as g}from"./chunk-X7JNNNMC.mjs";import{c as A}from"./chunk-HPZQGMSH.mjs";import{s as f}from"./chunk-VHNX2NUR.mjs";import{b as w}from"./chunk-JNO7KPMG.mjs";var T=["A name must be between 3 and 63 characters long,","and can only contain lowercase a-z, 0-9, and hyphens.","A name may not start or end with a hyphen."].join(" ");function D(e){return!(!e||e.length<3||e.length>63||!/^[a-z\d][a-z\d-]{1,61}[a-z\d]$/.test(e))}function c(e){let[t,n,...o]=e.replace(/\.apt$/,"").split(".");if(o.length>0)throw new Error(`${e} is invalid. A name can only have two parts, a domain and a subdomain separated by a "."`);if(!D(t))throw new Error(`${t} is not valid. ${T}`);if(n&&!D(n))throw new Error(`${n} is not valid. ${T}`);return{domainName:n||t,subdomainName:n?t:void 0}}var I=(n=>(n[n.Independent=0]="Independent",n[n.FollowsDomain=1]="FollowsDomain",n))(I||{});function E(e){if(!e)return!1;let t=new Date(e.domain_expiration_timestamp).getTime()<Date.now(),n=new Date(e.expiration_timestamp).getTime()<Date.now();return e.subdomain&&t?!1:e.subdomain&&e.subdomain_expiration_policy===1?!0:!n}var j="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",v="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",O={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:v,custom:null,devnet:null};function d(e){let t=O[e.network];if(!t)throw new Error(`The ANS contract is not deployed to ${e.network}`);return t}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function F(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n),i=await g({aptosConfig:t,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function Y(e){let{aptosConfig:t,expiration:n,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(t),{domainName:y,subdomainName:N}=c(o),x=n.policy==="subdomain:independent"||n.policy==="subdomain:follow-domain";if(N&&!x)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(x&&!N)throw new Error(`Policy is set to ${n.policy} but no subdomain was provided`);if(n.policy==="domain"){let h=n.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let G=h*31536e3;return await m({aptosConfig:t,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[y,G,s,i]},options:a})}if(!N)throw new Error(`${n.policy} requires a subdomain to be provided.`);let _=await P({aptosConfig:t,name:y});if(!_)throw new Error("The domain does not exist");let S=n.policy==="subdomain:independent"?n.expirationDate:_;if(S>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:t,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[y,N,Math.round(S/1e3),n.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function P(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n);try{let i=await g({aptosConfig:t,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function K(e){let{aptosConfig:t,address:n}=e,o=d(t),r=await g({aptosConfig:t,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(n).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function W(e){let{aptosConfig:t,sender:n,name:o,options:r}=e,s=d(t);if(!o)return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function H(e){let{aptosConfig:t,name:n}=e,o=d(t),{domainName:r,subdomainName:s}=c(n),i=await g({aptosConfig:t,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function J(e){let{aptosConfig:t,sender:n,name:o,address:r,options:s}=e,i=d(t),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function X(e){let{aptosConfig:t,name:n}=e,{domainName:o,subdomainName:r=""}=c(n),a=(await A({aptosConfig:t,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=l(a)),E(a)?a:void 0}async function Z(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountNames",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(l)}async function ee(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountDomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(l)}async function ne(e){let{aptosConfig:t,options:n,accountAddress:o}=e,r=await C({aptosConfig:t});return(await A({aptosConfig:t,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(l)}async function te(e){let{aptosConfig:t,options:n,domain:o}=e;return(await A({aptosConfig:t,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:n?.limit,offset:n?.offset,order_by:n?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""}}}}})).current_aptos_names.map(l).filter(E)}async function C(e){let{aptosConfig:t}=e,n=d(t),[o]=await g({aptosConfig:t,payload:{function:`${n}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function oe(e){let{aptosConfig:t,sender:n,name:o,years:r=1,options:s}=e,i=d(t),a=r*31536e3,{domainName:u,subdomainName:p}=c(o);if(p)throw new Error("Subdomains cannot be renewed");if(r!==1)throw new Error("Currently, only 1 year renewals are supported");return await m({aptosConfig:t,sender:n.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function l(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,D as b,c,I as d,E as e,j as f,v as g,F as h,Y as i,P as j,K as k,W as l,H as m,J as n,X as o,Z as p,ee as q,ne as r,te as s,oe as t};
2
+ //# sourceMappingURL=chunk-JIT2FYGE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-JJUINAQE.mjs";import{a as T}from"./chunk-KA5FX53Q.mjs";import{a as f}from"./chunk-3DQVGPFE.mjs";import{a as d}from"./chunk-6PJH53CK.mjs";import{d as c,e as u,f as g,i as m,j as p,k as y,l as A}from"./chunk-AHWZA3GD.mjs";import{a,b as o,c as i,d as s,e,g as r}from"./chunk-OJBMR5CT.mjs";var P=class{constructor(n){this.config=n,this.build=new f(this.config),this.simulate=new h(this.config),this.submit=new T(this.config),this.batch=new d(this.config)}async getTransactions(n){return a({aptosConfig:this.config,...n})}async getTransactionByVersion(n){return i({aptosConfig:this.config,...n})}async getTransactionByHash(n){return s({aptosConfig:this.config,...n})}async isPendingTransaction(n){return e({aptosConfig:this.config,...n})}async waitForTransaction(n){return r({aptosConfig:this.config,...n})}async getGasPriceEstimation(){return o({aptosConfig:this.config})}getSigningMessage(n){return c(n)}async publishPackageTransaction(n){return y({aptosConfig:this.config,...n})}async rotateAuthKey(n){return A({aptosConfig:this.config,...n})}sign(n){return u({...n})}signAsFeePayer(n){return g({...n})}async batchTransactionsForSingleAccount(n){try{let{sender:t,data:l,options:b}=n;this.batch.forSingleAccount({sender:t,data:l,options:b})}catch(t){throw new Error(`failed to submit transactions with error: ${t}`)}}async signAndSubmitTransaction(n){return m({aptosConfig:this.config,...n})}async signAndSubmitAsFeePayer(n){return p({aptosConfig:this.config,...n})}};export{P as a};
2
- //# sourceMappingURL=chunk-46L6BAJG.mjs.map
1
+ import{a as h}from"./chunk-II26BNYA.mjs";import{a as T}from"./chunk-U3GE6IPF.mjs";import{a as f}from"./chunk-XIB6LX22.mjs";import{a as d}from"./chunk-KCEI5JYS.mjs";import{d as c,e as u,f as g,i as m,j as p,k as y,l as A}from"./chunk-SY4HK6CC.mjs";import{a,b as o,c as i,d as s,e,g as r}from"./chunk-I5GENJBA.mjs";var P=class{constructor(n){this.config=n,this.build=new f(this.config),this.simulate=new h(this.config),this.submit=new T(this.config),this.batch=new d(this.config)}async getTransactions(n){return a({aptosConfig:this.config,...n})}async getTransactionByVersion(n){return i({aptosConfig:this.config,...n})}async getTransactionByHash(n){return s({aptosConfig:this.config,...n})}async isPendingTransaction(n){return e({aptosConfig:this.config,...n})}async waitForTransaction(n){return r({aptosConfig:this.config,...n})}async getGasPriceEstimation(){return o({aptosConfig:this.config})}getSigningMessage(n){return c(n)}async publishPackageTransaction(n){return y({aptosConfig:this.config,...n})}async rotateAuthKey(n){return A({aptosConfig:this.config,...n})}sign(n){return u({...n})}signAsFeePayer(n){return g({...n})}async batchTransactionsForSingleAccount(n){try{let{sender:t,data:l,options:b}=n;this.batch.forSingleAccount({sender:t,data:l,options:b})}catch(t){throw new Error(`failed to submit transactions with error: ${t}`)}}async signAndSubmitTransaction(n){return m({aptosConfig:this.config,...n})}async signAndSubmitAsFeePayer(n){return p({aptosConfig:this.config,...n})}};export{P as a};
2
+ //# sourceMappingURL=chunk-JONEH52T.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as S,c as k,d as R,e as V}from"./chunk-GMKKHGXK.mjs";import{a as M}from"./chunk-UGTIALNW.mjs";import{a as E,b as w}from"./chunk-3XCYCFYI.mjs";import{b as _,d as U}from"./chunk-L2SDI7PI.mjs";import{b as C}from"./chunk-MHN6XY4Z.mjs";import{a as f}from"./chunk-4O5XDQDO.mjs";import{a as P}from"./chunk-AKIO3OIT.mjs";import{a as D}from"./chunk-HBIDHQ2M.mjs";import{b as m}from"./chunk-JNO7KPMG.mjs";import{b as g}from"./chunk-6LLGRGCN.mjs";import{d as l}from"./chunk-F45G3GP3.mjs";import{a as y,b as K}from"./chunk-AJ5JHBAE.mjs";import{b as p,c as T}from"./chunk-SPRNSFUV.mjs";import{b as B}from"./chunk-V4FKFCBL.mjs";import{a as h}from"./chunk-D52UKPQF.mjs";import{jwtDecode as W}from"jwt-decode";import{sha3_256 as $}from"@noble/hashes/sha3";var He=1e7,Z=120,Y=30,X=330,Te=120,Pe=350,Ce=300,_e=93,o=class o extends C{constructor(e,t){super();let r=p.fromHexInput(t).toUint8Array();if(r.length!==o.ID_COMMITMENT_LENGTH)throw new Error(`Id Commitment length in bytes should be ${o.ID_COMMITMENT_LENGTH}`);this.iss=e,this.idCommitment=r}authKey(){let e=new K;return e.serializeU32AsUleb128(3),e.serializeFixedBytes(this.bcsToBytes()),P.fromSchemeAndBytes({scheme:2,input:e.toUint8Array()})}verifySignature(e){throw new Error("Not yet implemented")}serialize(e){e.serializeStr(this.iss),e.serializeBytes(this.idCommitment)}static deserialize(e){let t=e.deserializeStr(),r=e.deserializeBytes();return new o(t,r)}static load(e){let t=e.deserializeStr(),r=e.deserializeBytes();return new o(t,r)}static isPublicKey(e){return e instanceof o}static create(e){return J(e),new o(e.iss,J(e))}static fromJwtAndPepper(e){let{jwt:t,pepper:r,uidKey:s="sub"}=e,a=W(t);if(typeof a.iss!="string")throw new Error("iss was not found");if(typeof a.aud!="string")throw new Error("aud was not found or an array of values");let n=a[s];return o.create({iss:a.iss,uidKey:s,uidVal:n,aud:a.aud,pepper:r})}static isInstance(e){return"iss"in e&&typeof e.iss=="string"&&"idCommitment"in e&&e.idCommitment instanceof Uint8Array}};o.ID_COMMITMENT_LENGTH=32;var G=o;function J(i){let{uidKey:e,uidVal:t,aud:r,pepper:s}=i,a=[k(p.fromHexInput(s).toUint8Array()),S(r,Z),S(t,X),S(e,Y)];return R(V(a),G.ID_COMMITMENT_LENGTH)}var O=class i extends f{constructor(e){super();let{jwtHeader:t,ephemeralCertificate:r,expiryDateSecs:s,ephemeralPublicKey:a,ephemeralSignature:n}=e;this.jwtHeader=t,this.ephemeralCertificate=r,this.expiryDateSecs=s,this.ephemeralPublicKey=a,this.ephemeralSignature=n}getJwkKid(){return ee(this.jwtHeader).kid}serialize(e){this.ephemeralCertificate.serialize(e),e.serializeStr(this.jwtHeader),e.serializeU64(this.expiryDateSecs),this.ephemeralPublicKey.serialize(e),this.ephemeralSignature.serialize(e)}static deserialize(e){let t=x.deserialize(e),r=e.deserializeStr(),s=e.deserializeU64(),a=E.deserialize(e),n=w.deserialize(e);return new i({jwtHeader:r,expiryDateSecs:Number(s),ephemeralCertificate:t,ephemeralPublicKey:a,ephemeralSignature:n})}static getSimulationSignature(){return new i({jwtHeader:"{}",ephemeralCertificate:new x(new z({proof:new b(new A({a:new Uint8Array(32),b:new Uint8Array(64),c:new Uint8Array(32)}),0),expHorizonSecs:0}),0),expiryDateSecs:0,ephemeralPublicKey:new E(new _(new Uint8Array(32))),ephemeralSignature:new w(new U(new Uint8Array(64)))})}static isSignature(e){return e instanceof i}},x=class i extends f{constructor(e,t){super(),this.signature=e,this.variant=t}toUint8Array(){return this.signature.toUint8Array()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return new i(z.deserialize(e),t);default:throw new Error(`Unknown variant index for EphemeralCertificate: ${t}`)}}},c=class i extends y{constructor(e){if(super(),this.data=p.fromHexInput(e).toUint8Array(),this.data.length!==32)throw new Error("Input needs to be 32 bytes")}serialize(e){e.serializeFixedBytes(this.data)}static deserialize(e){let t=e.deserializeFixedBytes(32);return new i(t)}},d=class i extends y{constructor(e){if(super(),this.data=p.fromHexInput(e).toUint8Array(),this.data.length!==64)throw new Error("Input needs to be 64 bytes")}serialize(e){e.serializeFixedBytes(this.data)}static deserialize(e){let t=e.deserializeFixedBytes(64);return new i(t)}},A=class i extends M{constructor(e){super();let{a:t,b:r,c:s}=e;this.a=new c(t),this.b=new d(r),this.c=new c(s)}serialize(e){this.a.serialize(e),this.b.serialize(e),this.c.serialize(e)}static deserialize(e){let t=c.deserialize(e).bcsToBytes(),r=d.deserialize(e).bcsToBytes(),s=c.deserialize(e).bcsToBytes();return new i({a:t,b:r,c:s})}},b=class i extends y{constructor(e,t){super(),this.proof=e,this.variant=t}serialize(e){e.serializeU32AsUleb128(this.variant),this.proof.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return new i(A.deserialize(e),t);default:throw new Error(`Unknown variant index for ZkProof: ${t}`)}}},z=class i extends f{constructor(e){super();let{proof:t,expHorizonSecs:r,trainingWheelsSignature:s,extraField:a,overrideAudVal:n}=e;this.proof=t,this.expHorizonSecs=r,this.trainingWheelsSignature=s,this.extraField=a,this.overrideAudVal=n}static fromBytes(e){return i.deserialize(new h(e))}serialize(e){this.proof.serialize(e),e.serializeU64(this.expHorizonSecs),e.serializeOption(this.extraField),e.serializeOption(this.overrideAudVal),e.serializeOption(this.trainingWheelsSignature)}static deserialize(e){let t=b.deserialize(e),r=Number(e.deserializeU64()),s=e.deserializeOption("string"),a=e.deserializeOption("string"),n=e.deserializeOption(w);return new i({proof:t,expHorizonSecs:r,trainingWheelsSignature:n,extraField:s,overrideAudVal:a})}},v=class i{constructor(e,t){this.verificationKey=e,this.maxExpHorizonSecs=t}static create(e,t){return new i(new I({alphaG1:e.alpha_g1,betaG2:e.beta_g2,deltaG2:e.delta_g2,gammaAbcG1:e.gamma_abc_g1,gammaG2:e.gamma_g2}),t)}},I=class i{constructor(e){let{alphaG1:t,betaG2:r,deltaG2:s,gammaAbcG1:a,gammaG2:n}=e;this.alphaG1=new c(t),this.betaG2=new d(r),this.deltaG2=new d(s),this.gammaAbcG1=[new c(a[0]),new c(a[1])],this.gammaG2=new d(n)}hash(){let e=new K;return this.serialize(e),$.create().update(e.toUint8Array()).digest()}serialize(e){this.alphaG1.serialize(e),this.betaG2.serialize(e),this.deltaG2.serialize(e),this.gammaAbcG1[0].serialize(e),this.gammaAbcG1[1].serialize(e),this.gammaG2.serialize(e)}static fromGroth16VerificationKeyResponse(e){return new i({alphaG1:e.alpha_g1,betaG2:e.beta_g2,deltaG2:e.delta_g2,gammaAbcG1:e.gamma_abc_g1,gammaG2:e.gamma_g2})}};async function Ue(i){let{aptosConfig:e}=i;try{return await D(async()=>{let t=await q(i),r=await Q(i);return v.create(r,Number(t.max_exp_horizon_secs))},`keyless-configuration-${e.network}`,1e3*60*5)()}catch(t){throw t instanceof l?t:l.fromErrorType({type:25,error:t})}}function ke(i){let{jwt:e,uidKey:t="sub"}=i,r;try{r=W(e)}catch(a){throw l.fromErrorType({type:12,details:`Failed to parse JWT - ${B(a)}`})}if(typeof r.iss!="string")throw l.fromErrorType({type:12,details:"JWT is missing 'iss' in the payload. This should never happen."});if(typeof r.aud!="string")throw l.fromErrorType({type:12,details:"JWT is missing 'aud' in the payload or 'aud' is an array of values."});let s=r[t];return{iss:r.iss,aud:r.aud,uidVal:s}}async function q(i){let{aptosConfig:e,options:t}=i,r="0x1::keyless_account::Configuration";try{let{data:s}=await g({aptosConfig:e,originMethod:"getKeylessConfigurationResource",path:`accounts/${m.from("0x1").toString()}/resource/${r}`,params:{ledger_version:t?.ledgerVersion}});return s.data}catch(s){throw l.fromErrorType({type:22,error:s})}}async function Q(i){let{aptosConfig:e,options:t}=i,r="0x1::keyless_account::Groth16VerificationKey";try{let{data:s}=await g({aptosConfig:e,originMethod:"getGroth16VerificationKeyResource",path:`accounts/${m.from("0x1").toString()}/resource/${r}`,params:{ledger_version:t?.ledgerVersion}});return s.data}catch(s){throw l.fromErrorType({type:23,error:s})}}async function Re(i){let{aptosConfig:e,jwkAddr:t,options:r}=i,s;if(t){let n="0x1::jwks::FederatedJWKs",{data:u}=await g({aptosConfig:e,originMethod:"getKeylessJWKs",path:`accounts/${m.from(t).toString()}/resource/${n}`,params:{ledger_version:r?.ledgerVersion}});s=u}else{let n="0x1::jwks::PatchedJWKs",{data:u}=await g({aptosConfig:e,originMethod:"getKeylessJWKs",path:`accounts/0x1/resource/${n}`,params:{ledger_version:r?.ledgerVersion}});s=u}let a=new Map;for(let n of s.data.jwks.entries){let u=[];for(let j of n.jwks){let{data:L}=j.variant,N=new h(p.fromHexInput(L).toUint8Array()),F=H.deserialize(N);u.push(F)}a.set(T(n.issuer),u)}return a}var H=class i extends y{constructor(e){super();let{kid:t,kty:r,alg:s,e:a,n}=e;this.kid=t,this.kty=r,this.alg=s,this.e=a,this.n=n}serialize(e){e.serializeStr(this.kid),e.serializeStr(this.kty),e.serializeStr(this.alg),e.serializeStr(this.e),e.serializeStr(this.n)}static fromMoveStruct(e){let{data:t}=e.variant,r=new h(p.fromHexInput(t).toUint8Array());return i.deserialize(r)}static deserialize(e){let t=e.deserializeStr(),r=e.deserializeStr(),s=e.deserializeStr(),a=e.deserializeStr(),n=e.deserializeStr();return new i({kid:t,kty:r,alg:s,n:a,e:n})}};function ee(i){try{let e=JSON.parse(i);if(e.kid===void 0)throw new Error("JWT header missing kid");return e}catch{throw new Error("Failed to parse JWT header.")}}export{He as a,Z as b,Y as c,X as d,Te as e,Pe as f,Ce as g,_e as h,G as i,O as j,x as k,A as l,b as m,z as n,v as o,I as p,Ue as q,ke as r,Re as s,H as t,ee as u};
2
- //# sourceMappingURL=chunk-XUP6VABV.mjs.map
1
+ import{a as S,c as k,d as R,e as V}from"./chunk-GMKKHGXK.mjs";import{a as M}from"./chunk-UGTIALNW.mjs";import{a as E,b as w}from"./chunk-GX4CYRK4.mjs";import{b as _,d as U}from"./chunk-VGJIATTB.mjs";import{a as f}from"./chunk-4O5XDQDO.mjs";import{b as C}from"./chunk-MHN6XY4Z.mjs";import{a as P}from"./chunk-AKIO3OIT.mjs";import{b as m}from"./chunk-JNO7KPMG.mjs";import{a as D}from"./chunk-HBIDHQ2M.mjs";import{b as g}from"./chunk-CPKG25HX.mjs";import{d as l}from"./chunk-F45G3GP3.mjs";import{b as B}from"./chunk-V4FKFCBL.mjs";import{a as h}from"./chunk-D52UKPQF.mjs";import{a as y,b as K}from"./chunk-AJ5JHBAE.mjs";import{b as p,c as T}from"./chunk-SPRNSFUV.mjs";import{jwtDecode as W}from"jwt-decode";import{sha3_256 as $}from"@noble/hashes/sha3";var He=1e7,Z=120,Y=30,X=330,Te=120,Pe=350,Ce=300,_e=93,o=class o extends C{constructor(e,t){super();let r=p.fromHexInput(t).toUint8Array();if(r.length!==o.ID_COMMITMENT_LENGTH)throw new Error(`Id Commitment length in bytes should be ${o.ID_COMMITMENT_LENGTH}`);this.iss=e,this.idCommitment=r}authKey(){let e=new K;return e.serializeU32AsUleb128(3),e.serializeFixedBytes(this.bcsToBytes()),P.fromSchemeAndBytes({scheme:2,input:e.toUint8Array()})}verifySignature(e){throw new Error("Not yet implemented")}serialize(e){e.serializeStr(this.iss),e.serializeBytes(this.idCommitment)}static deserialize(e){let t=e.deserializeStr(),r=e.deserializeBytes();return new o(t,r)}static load(e){let t=e.deserializeStr(),r=e.deserializeBytes();return new o(t,r)}static isPublicKey(e){return e instanceof o}static create(e){return J(e),new o(e.iss,J(e))}static fromJwtAndPepper(e){let{jwt:t,pepper:r,uidKey:s="sub"}=e,a=W(t);if(typeof a.iss!="string")throw new Error("iss was not found");if(typeof a.aud!="string")throw new Error("aud was not found or an array of values");let n=a[s];return o.create({iss:a.iss,uidKey:s,uidVal:n,aud:a.aud,pepper:r})}static isInstance(e){return"iss"in e&&typeof e.iss=="string"&&"idCommitment"in e&&e.idCommitment instanceof Uint8Array}};o.ID_COMMITMENT_LENGTH=32;var G=o;function J(i){let{uidKey:e,uidVal:t,aud:r,pepper:s}=i,a=[k(p.fromHexInput(s).toUint8Array()),S(r,Z),S(t,X),S(e,Y)];return R(V(a),G.ID_COMMITMENT_LENGTH)}var O=class i extends f{constructor(e){super();let{jwtHeader:t,ephemeralCertificate:r,expiryDateSecs:s,ephemeralPublicKey:a,ephemeralSignature:n}=e;this.jwtHeader=t,this.ephemeralCertificate=r,this.expiryDateSecs=s,this.ephemeralPublicKey=a,this.ephemeralSignature=n}getJwkKid(){return ee(this.jwtHeader).kid}serialize(e){this.ephemeralCertificate.serialize(e),e.serializeStr(this.jwtHeader),e.serializeU64(this.expiryDateSecs),this.ephemeralPublicKey.serialize(e),this.ephemeralSignature.serialize(e)}static deserialize(e){let t=x.deserialize(e),r=e.deserializeStr(),s=e.deserializeU64(),a=E.deserialize(e),n=w.deserialize(e);return new i({jwtHeader:r,expiryDateSecs:Number(s),ephemeralCertificate:t,ephemeralPublicKey:a,ephemeralSignature:n})}static getSimulationSignature(){return new i({jwtHeader:"{}",ephemeralCertificate:new x(new z({proof:new b(new A({a:new Uint8Array(32),b:new Uint8Array(64),c:new Uint8Array(32)}),0),expHorizonSecs:0}),0),expiryDateSecs:0,ephemeralPublicKey:new E(new _(new Uint8Array(32))),ephemeralSignature:new w(new U(new Uint8Array(64)))})}static isSignature(e){return e instanceof i}},x=class i extends f{constructor(e,t){super(),this.signature=e,this.variant=t}toUint8Array(){return this.signature.toUint8Array()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return new i(z.deserialize(e),t);default:throw new Error(`Unknown variant index for EphemeralCertificate: ${t}`)}}},c=class i extends y{constructor(e){if(super(),this.data=p.fromHexInput(e).toUint8Array(),this.data.length!==32)throw new Error("Input needs to be 32 bytes")}serialize(e){e.serializeFixedBytes(this.data)}static deserialize(e){let t=e.deserializeFixedBytes(32);return new i(t)}},d=class i extends y{constructor(e){if(super(),this.data=p.fromHexInput(e).toUint8Array(),this.data.length!==64)throw new Error("Input needs to be 64 bytes")}serialize(e){e.serializeFixedBytes(this.data)}static deserialize(e){let t=e.deserializeFixedBytes(64);return new i(t)}},A=class i extends M{constructor(e){super();let{a:t,b:r,c:s}=e;this.a=new c(t),this.b=new d(r),this.c=new c(s)}serialize(e){this.a.serialize(e),this.b.serialize(e),this.c.serialize(e)}static deserialize(e){let t=c.deserialize(e).bcsToBytes(),r=d.deserialize(e).bcsToBytes(),s=c.deserialize(e).bcsToBytes();return new i({a:t,b:r,c:s})}},b=class i extends y{constructor(e,t){super(),this.proof=e,this.variant=t}serialize(e){e.serializeU32AsUleb128(this.variant),this.proof.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return new i(A.deserialize(e),t);default:throw new Error(`Unknown variant index for ZkProof: ${t}`)}}},z=class i extends f{constructor(e){super();let{proof:t,expHorizonSecs:r,trainingWheelsSignature:s,extraField:a,overrideAudVal:n}=e;this.proof=t,this.expHorizonSecs=r,this.trainingWheelsSignature=s,this.extraField=a,this.overrideAudVal=n}static fromBytes(e){return i.deserialize(new h(e))}serialize(e){this.proof.serialize(e),e.serializeU64(this.expHorizonSecs),e.serializeOption(this.extraField),e.serializeOption(this.overrideAudVal),e.serializeOption(this.trainingWheelsSignature)}static deserialize(e){let t=b.deserialize(e),r=Number(e.deserializeU64()),s=e.deserializeOption("string"),a=e.deserializeOption("string"),n=e.deserializeOption(w);return new i({proof:t,expHorizonSecs:r,trainingWheelsSignature:n,extraField:s,overrideAudVal:a})}},v=class i{constructor(e,t){this.verificationKey=e,this.maxExpHorizonSecs=t}static create(e,t){return new i(new I({alphaG1:e.alpha_g1,betaG2:e.beta_g2,deltaG2:e.delta_g2,gammaAbcG1:e.gamma_abc_g1,gammaG2:e.gamma_g2}),t)}},I=class i{constructor(e){let{alphaG1:t,betaG2:r,deltaG2:s,gammaAbcG1:a,gammaG2:n}=e;this.alphaG1=new c(t),this.betaG2=new d(r),this.deltaG2=new d(s),this.gammaAbcG1=[new c(a[0]),new c(a[1])],this.gammaG2=new d(n)}hash(){let e=new K;return this.serialize(e),$.create().update(e.toUint8Array()).digest()}serialize(e){this.alphaG1.serialize(e),this.betaG2.serialize(e),this.deltaG2.serialize(e),this.gammaAbcG1[0].serialize(e),this.gammaAbcG1[1].serialize(e),this.gammaG2.serialize(e)}static fromGroth16VerificationKeyResponse(e){return new i({alphaG1:e.alpha_g1,betaG2:e.beta_g2,deltaG2:e.delta_g2,gammaAbcG1:e.gamma_abc_g1,gammaG2:e.gamma_g2})}};async function Ue(i){let{aptosConfig:e}=i;try{return await D(async()=>{let t=await q(i),r=await Q(i);return v.create(r,Number(t.max_exp_horizon_secs))},`keyless-configuration-${e.network}`,1e3*60*5)()}catch(t){throw t instanceof l?t:l.fromErrorType({type:25,error:t})}}function ke(i){let{jwt:e,uidKey:t="sub"}=i,r;try{r=W(e)}catch(a){throw l.fromErrorType({type:12,details:`Failed to parse JWT - ${B(a)}`})}if(typeof r.iss!="string")throw l.fromErrorType({type:12,details:"JWT is missing 'iss' in the payload. This should never happen."});if(typeof r.aud!="string")throw l.fromErrorType({type:12,details:"JWT is missing 'aud' in the payload or 'aud' is an array of values."});let s=r[t];return{iss:r.iss,aud:r.aud,uidVal:s}}async function q(i){let{aptosConfig:e,options:t}=i,r="0x1::keyless_account::Configuration";try{let{data:s}=await g({aptosConfig:e,originMethod:"getKeylessConfigurationResource",path:`accounts/${m.from("0x1").toString()}/resource/${r}`,params:{ledger_version:t?.ledgerVersion}});return s.data}catch(s){throw l.fromErrorType({type:22,error:s})}}async function Q(i){let{aptosConfig:e,options:t}=i,r="0x1::keyless_account::Groth16VerificationKey";try{let{data:s}=await g({aptosConfig:e,originMethod:"getGroth16VerificationKeyResource",path:`accounts/${m.from("0x1").toString()}/resource/${r}`,params:{ledger_version:t?.ledgerVersion}});return s.data}catch(s){throw l.fromErrorType({type:23,error:s})}}async function Re(i){let{aptosConfig:e,jwkAddr:t,options:r}=i,s;if(t){let n="0x1::jwks::FederatedJWKs",{data:u}=await g({aptosConfig:e,originMethod:"getKeylessJWKs",path:`accounts/${m.from(t).toString()}/resource/${n}`,params:{ledger_version:r?.ledgerVersion}});s=u}else{let n="0x1::jwks::PatchedJWKs",{data:u}=await g({aptosConfig:e,originMethod:"getKeylessJWKs",path:`accounts/0x1/resource/${n}`,params:{ledger_version:r?.ledgerVersion}});s=u}let a=new Map;for(let n of s.data.jwks.entries){let u=[];for(let j of n.jwks){let{data:L}=j.variant,N=new h(p.fromHexInput(L).toUint8Array()),F=H.deserialize(N);u.push(F)}a.set(T(n.issuer),u)}return a}var H=class i extends y{constructor(e){super();let{kid:t,kty:r,alg:s,e:a,n}=e;this.kid=t,this.kty=r,this.alg=s,this.e=a,this.n=n}serialize(e){e.serializeStr(this.kid),e.serializeStr(this.kty),e.serializeStr(this.alg),e.serializeStr(this.e),e.serializeStr(this.n)}static fromMoveStruct(e){let{data:t}=e.variant,r=new h(p.fromHexInput(t).toUint8Array());return i.deserialize(r)}static deserialize(e){let t=e.deserializeStr(),r=e.deserializeStr(),s=e.deserializeStr(),a=e.deserializeStr(),n=e.deserializeStr();return new i({kid:t,kty:r,alg:s,n:a,e:n})}};function ee(i){try{let e=JSON.parse(i);if(e.kid===void 0)throw new Error("JWT header missing kid");return e}catch{throw new Error("Failed to parse JWT header.")}}export{He as a,Z as b,Y as c,X as d,Te as e,Pe as f,Ce as g,_e as h,G as i,O as j,x as k,A as l,b as m,z as n,v as o,I as p,Ue as q,ke as r,Re as s,H as t,ee as u};
2
+ //# sourceMappingURL=chunk-K62JTXWQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as a}from"./chunk-F2AIWA7L.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-6PJH53CK.mjs.map
1
+ import{c as a}from"./chunk-RC43EXC4.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-KCEI5JYS.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as n}from"./chunk-PW3ISXPN.mjs";import{o as g,t as d}from"./chunk-VHNX2NUR.mjs";import{b as s}from"./chunk-JNO7KPMG.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-ZRWZIAF5.mjs.map
1
+ import{c as n}from"./chunk-HPZQGMSH.mjs";import{o as g,t as d}from"./chunk-VHNX2NUR.mjs";import{b as s}from"./chunk-JNO7KPMG.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-KM6IOJ6Y.mjs.map
@@ -0,0 +1,2 @@
1
+ import{c as l}from"./chunk-AOROYJ74.mjs";import{a as k,b as c,d as A,e as g,f as P,g as z,h as D,i as m,j as L,l as R,m as X,n as q,o as H,p as J,q as K,s as i,t as Q}from"./chunk-5O3RHPER.mjs";import{c as j}from"./chunk-FYYTCJS4.mjs";import{b as S,c as I,d as x,e as M,f as O,g as C,h as _,i as V,n as G}from"./chunk-T6ADNZE5.mjs";import{b as d}from"./chunk-JNO7KPMG.mjs";import{a as y,c as F,d as s}from"./chunk-Q3CWUEXI.mjs";import{a as w,b as h,c as B,d as E,e as v,f as $,g as b}from"./chunk-42H7WETG.mjs";var Y=new TextEncoder;function sn(n){return n?.map(e=>c(e)?l(e):e)??[]}async function W(n,e,t,u){let r=await j({aptosConfig:u,accountAddress:n,moduleName:e});if(r.abi)return r.abi.exposed_functions.find(o=>o.name===t)}async function fn(n,e,t,u){let r=await W(n,e,t,u);if(!r)throw new Error(`Could not find entry function ABI for '${n}::${e}::${t}'`);if(!r.is_entry)throw new Error(`'${n}::${e}::${t}' is not an entry function`);let o=Q(r),T=[];for(let f=o;f<r.params.length;f+=1)T.push(l(r.params[f],{allowGenerics:!0}));return{signers:o,typeParameters:r.generic_type_params,parameters:T}}async function on(n,e,t,u){let r=await W(n,e,t,u);if(!r)throw new Error(`Could not find view function ABI for '${n}::${e}::${t}'`);if(!r.is_view)throw new Error(`'${n}::${e}::${t}' is not an view function`);let o=[];for(let f=0;f<r.params.length;f+=1)o.push(l(r.params[f],{allowGenerics:!0}));let T=[];for(let f=0;f<r.return.length;f+=1)T.push(l(r.return[f],{allowGenerics:!0}));return{typeParameters:r.generic_type_params,parameters:o,returnTypes:T}}function cn(n,e,t,u,r){if(u>=e.parameters.length)throw new Error(`Too many arguments for '${n}', expected ${e.parameters.length}`);let o=e.parameters[u];return U(t,o,u,r)}function U(n,e,t,u){return z(n)?(p(e,n,t),n):Z(n,e,t,u)}function Z(n,e,t,u){if(e.isBool()){if(k(n))return new w(n);if(c(n)){if(n==="true")return new w(!0);if(n==="false")return new w(!1)}i("boolean",t)}if(e.isAddress()){if(c(n))return d.fromString(n);i("string | AccountAddress",t)}if(e.isU8()){let r=A(n);if(r!==void 0)return new h(r);i("number | string",t)}if(e.isU16()){let r=A(n);if(r!==void 0)return new B(r);i("number | string",t)}if(e.isU32()){let r=A(n);if(r!==void 0)return new E(r);i("number | string",t)}if(e.isU64()){if(g(n))return new v(BigInt(n));i("bigint | number | string",t)}if(e.isU128()){if(g(n))return new $(BigInt(n));i("bigint | number | string",t)}if(e.isU256()){if(g(n))return new b(BigInt(n));i("bigint | number | string",t)}if(e.isGeneric()){let r=e.value;if(r<0||r>=u.length)throw new Error(`Generic argument ${e.toString()} is invalid for argument ${t}`);return U(n,u[r],t,u)}if(e.isVector()){if(e.value.isU8()){if(c(n))return y.U8(Y.encode(n));if(n instanceof Uint8Array)return y.U8(n);if(n instanceof ArrayBuffer)return y.U8(new Uint8Array(n))}if(Array.isArray(n))return new y(n.map(r=>U(r,e.value,t,u)));throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}if(e.isStruct()){if(e.isString()){if(c(n))return new F(n);i("string",t)}if(e.isObject()){if(c(n))return d.fromString(n);i("string | AccountAddress",t)}if(e.isOption()){if(P(n)){let r=e.value.typeArgs[0];return r instanceof S?new s(null):r instanceof V?new s(null):r instanceof I?new s(null):r instanceof x?new s(null):r instanceof M?new s(null):r instanceof O?new s(null):r instanceof C?new s(null):r instanceof _?new s(null):new s(null)}return new s(U(n,e.value.typeArgs[0],t,u))}throw new Error(`Unsupported struct input type for argument ${t}, type '${e.toString()}'`)}throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}function p(n,e,t){if(n.isBool()){if(D(e))return;i("Bool",t)}if(n.isAddress()){if(m(e))return;i("AccountAddress",t)}if(n.isU8()){if(R(e))return;i("U8",t)}if(n.isU16()){if(X(e))return;i("U16",t)}if(n.isU32()){if(q(e))return;i("U32",t)}if(n.isU64()){if(H(e))return;i("U64",t)}if(n.isU128()){if(J(e))return;i("U128",t)}if(n.isU256()){if(K(e))return;i("U256",t)}if(n.isVector()){if(e instanceof y){e.values.length>0&&p(n.value,e.values[0],t);return}i("MoveVector",t)}if(n instanceof G){if(n.isString()){if(L(e))return;i("MoveString",t)}if(n.isObject()){if(m(e))return;i("AccountAddress",t)}if(n.isOption()){if(e instanceof s){e.value!==void 0&&p(n.value.typeArgs[0],e.value,t);return}i("MoveOption",t)}}throw new Error(`Type mismatch for argument ${t}, expected '${n.toString()}'`)}export{sn as a,W as b,fn as c,on as d,cn as e,U as f};
2
+ //# sourceMappingURL=chunk-KTM6KVUJ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/transactions/transactionBuilder/remoteAbi.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { parseTypeTag } from \"../typeTag/parser\";\nimport {\n TypeTag,\n TypeTagAddress,\n TypeTagBool,\n TypeTagStruct,\n TypeTagU128,\n TypeTagU16,\n TypeTagU256,\n TypeTagU32,\n TypeTagU64,\n TypeTagU8,\n} from \"../typeTag\";\nimport { AptosConfig } from \"../../api/aptosConfig\";\nimport {\n EntryFunctionArgumentTypes,\n SimpleEntryFunctionArgumentTypes,\n EntryFunctionABI,\n ViewFunctionABI,\n FunctionABI,\n TypeArgument,\n} from \"../types\";\nimport { Bool, MoveOption, MoveString, MoveVector, U128, U16, U256, U32, U64, U8 } from \"../../bcs\";\nimport { AccountAddress } from \"../../core\";\nimport { getModule } from \"../../internal/account\";\nimport {\n findFirstNonSignerArg,\n isBcsAddress,\n isBcsBool,\n isBcsString,\n isBcsU128,\n isBcsU16,\n isBcsU256,\n isBcsU32,\n isBcsU64,\n isBcsU8,\n isBool,\n isEncodedEntryFunctionArgument,\n isLargeNumber,\n isEmptyOption,\n isString,\n throwTypeMismatch,\n convertNumber,\n} from \"./helpers\";\nimport { MoveFunction } from \"../../types\";\n\nconst TEXT_ENCODER = new TextEncoder();\n\n/**\n * Convert type arguments to only type tags, allowing for string representations of type tags.\n *\n * @param typeArguments - An optional array of type arguments that may include string representations.\n * @returns An array of TypeTag objects derived from the provided type arguments.\n */\nexport function standardizeTypeTags(typeArguments?: Array<TypeArgument>): Array<TypeTag> {\n return (\n typeArguments?.map((typeArg: TypeArgument): TypeTag => {\n // Convert to TypeTag if it's a string representation\n if (isString(typeArg)) {\n return parseTypeTag(typeArg);\n }\n return typeArg;\n }) ?? []\n );\n}\n\n/**\n * Fetches the ABI of a specified function from the on-chain module ABI. This function allows you to access the details of a\n * specific function within a module.\n *\n * @param moduleAddress - The address of the module from which to fetch the function ABI.\n * @param moduleName - The name of the module containing the function.\n * @param functionName - The name of the function whose ABI is to be fetched.\n * @param aptosConfig - The configuration settings for Aptos.\n */\nexport async function fetchFunctionAbi(\n moduleAddress: string,\n moduleName: string,\n functionName: string,\n aptosConfig: AptosConfig,\n): Promise<MoveFunction | undefined> {\n // This fetch from the API is currently cached\n const module = await getModule({ aptosConfig, accountAddress: moduleAddress, moduleName });\n\n if (module.abi) {\n return module.abi.exposed_functions.find((func) => func.name === functionName);\n }\n\n return undefined;\n}\n\n/**\n * Fetches the ABI for an entry function from the specified module address.\n * This function validates if the ABI corresponds to an entry function and retrieves its parameters.\n *\n * @param moduleAddress - The address of the module containing the entry function.\n * @param moduleName - The name of the module containing the entry function.\n * @param functionName - The name of the entry function to fetch the ABI for.\n * @param aptosConfig - The configuration settings for Aptos.\n * @returns An object containing the number of signers, type parameters, and function parameters.\n * @throws Error if the ABI cannot be found or if the function is not an entry function.\n */\nexport async function fetchEntryFunctionAbi(\n moduleAddress: string,\n moduleName: string,\n functionName: string,\n aptosConfig: AptosConfig,\n): Promise<EntryFunctionABI> {\n const functionAbi = await fetchFunctionAbi(moduleAddress, moduleName, functionName, aptosConfig);\n\n // If there's no ABI, then the function is invalid\n if (!functionAbi) {\n throw new Error(`Could not find entry function ABI for '${moduleAddress}::${moduleName}::${functionName}'`);\n }\n\n // Non-entry functions also can't be used\n if (!functionAbi.is_entry) {\n throw new Error(`'${moduleAddress}::${moduleName}::${functionName}' is not an entry function`);\n }\n\n // Remove the signer arguments\n const numSigners = findFirstNonSignerArg(functionAbi);\n const params: TypeTag[] = [];\n for (let i = numSigners; i < functionAbi.params.length; i += 1) {\n params.push(parseTypeTag(functionAbi.params[i], { allowGenerics: true }));\n }\n\n return {\n signers: numSigners,\n typeParameters: functionAbi.generic_type_params,\n parameters: params,\n };\n}\n\n/**\n * Fetches the ABI for a view function from the specified module address.\n * This function ensures that the ABI is valid and retrieves the type parameters, parameters, and return types for the view function.\n *\n * @param moduleAddress - The address of the module containing the view function.\n * @param moduleName - The name of the module containing the view function.\n * @param functionName - The name of the view function for which to fetch the ABI.\n * @param aptosConfig - The configuration settings for Aptos.\n * @returns An object containing the type parameters, parameters, and return types of the view function.\n * @throws Error if the ABI cannot be found or if the function is not a view function.\n */\nexport async function fetchViewFunctionAbi(\n moduleAddress: string,\n moduleName: string,\n functionName: string,\n aptosConfig: AptosConfig,\n): Promise<ViewFunctionABI> {\n const functionAbi = await fetchFunctionAbi(moduleAddress, moduleName, functionName, aptosConfig);\n\n // If there's no ABI, then the function is invalid\n if (!functionAbi) {\n throw new Error(`Could not find view function ABI for '${moduleAddress}::${moduleName}::${functionName}'`);\n }\n\n // Non-view functions can't be used\n if (!functionAbi.is_view) {\n throw new Error(`'${moduleAddress}::${moduleName}::${functionName}' is not an view function`);\n }\n\n // Type tag parameters for the function\n const params: TypeTag[] = [];\n for (let i = 0; i < functionAbi.params.length; i += 1) {\n params.push(parseTypeTag(functionAbi.params[i], { allowGenerics: true }));\n }\n\n // The return types of the view function\n const returnTypes: TypeTag[] = [];\n for (let i = 0; i < functionAbi.return.length; i += 1) {\n returnTypes.push(parseTypeTag(functionAbi.return[i], { allowGenerics: true }));\n }\n\n return {\n typeParameters: functionAbi.generic_type_params,\n parameters: params,\n returnTypes,\n };\n}\n\n/**\n * Converts a non-BCS encoded argument into BCS encoded, if necessary.\n * This function checks the provided argument against the expected parameter type and converts it accordingly.\n *\n * @param functionName - The name of the function for which the argument is being converted.\n * @param functionAbi - The ABI (Application Binary Interface) of the function, which defines its parameters.\n * @param arg - The argument to be converted, which can be of various types.\n * @param position - The index of the argument in the function's parameter list.\n * @param genericTypeParams - An array of type tags for any generic type parameters.\n */\nexport function convertArgument(\n functionName: string,\n functionAbi: FunctionABI,\n arg: EntryFunctionArgumentTypes | SimpleEntryFunctionArgumentTypes,\n position: number,\n genericTypeParams: Array<TypeTag>,\n) {\n // Ensure not too many arguments\n if (position >= functionAbi.parameters.length) {\n throw new Error(`Too many arguments for '${functionName}', expected ${functionAbi.parameters.length}`);\n }\n\n const param = functionAbi.parameters[position];\n return checkOrConvertArgument(arg, param, position, genericTypeParams);\n}\n\n/**\n * Checks if the provided argument is BCS encoded and converts it if necessary, ensuring type compatibility with the ABI.\n * This function helps in validating and converting arguments for entry functions based on their expected types.\n *\n * @param arg - The argument to check or convert, which can be either a simple or entry function argument type.\n * @param param - The expected type tag for the argument.\n * @param position - The position of the argument in the function call.\n * @param genericTypeParams - An array of generic type parameters that may be used for conversion.\n */\nexport function checkOrConvertArgument(\n arg: SimpleEntryFunctionArgumentTypes | EntryFunctionArgumentTypes,\n param: TypeTag,\n position: number,\n genericTypeParams: Array<TypeTag>,\n) {\n // If the argument is bcs encoded, we can just use it directly\n if (isEncodedEntryFunctionArgument(arg)) {\n // Ensure the type matches the ABI\n\n /**\n * Checks the type of the provided argument against the expected type.\n * This function helps validate that the argument conforms to the specified type requirements.\n *\n * @param typeArgs - The expected type arguments.\n * @param arg - The argument to be checked.\n * @param position - The position of the argument in the context of the check.\n */\n checkType(param, arg, position);\n return arg;\n }\n\n // If it is not BCS encoded, we will need to convert it with the ABI\n return parseArg(arg, param, position, genericTypeParams);\n}\n\n/**\n * Parses a non-BCS encoded argument into a BCS encoded argument recursively.\n * This function helps convert various types of input arguments into their corresponding BCS encoded formats based on the\n * specified parameter type.\n *\n * @param arg - The argument to be parsed, which can be of various types.\n * @param param - The type tag that defines the expected type of the argument.\n * @param position - The position of the argument in the function call, used for error reporting.\n * @param genericTypeParams - An array of type tags for generic type parameters, used when the parameter type is generic.\n */\nfunction parseArg(\n arg: SimpleEntryFunctionArgumentTypes,\n param: TypeTag,\n position: number,\n genericTypeParams: Array<TypeTag>,\n): EntryFunctionArgumentTypes {\n if (param.isBool()) {\n if (isBool(arg)) {\n return new Bool(arg);\n }\n if (isString(arg)) {\n if (arg === \"true\") return new Bool(true);\n if (arg === \"false\") return new Bool(false);\n }\n\n /**\n * Throws a type mismatch error for the specified move option.\n *\n * @param moveOption - The name of the move option that caused the type mismatch.\n * @param position - The position where the error occurred.\n */\n throwTypeMismatch(\"boolean\", position);\n }\n // TODO: support uint8array?\n if (param.isAddress()) {\n if (isString(arg)) {\n return AccountAddress.fromString(arg);\n }\n throwTypeMismatch(\"string | AccountAddress\", position);\n }\n if (param.isU8()) {\n const num = convertNumber(arg);\n if (num !== undefined) {\n return new U8(num);\n }\n throwTypeMismatch(\"number | string\", position);\n }\n if (param.isU16()) {\n const num = convertNumber(arg);\n if (num !== undefined) {\n return new U16(num);\n }\n throwTypeMismatch(\"number | string\", position);\n }\n if (param.isU32()) {\n const num = convertNumber(arg);\n if (num !== undefined) {\n return new U32(num);\n }\n throwTypeMismatch(\"number | string\", position);\n }\n if (param.isU64()) {\n if (isLargeNumber(arg)) {\n return new U64(BigInt(arg));\n }\n throwTypeMismatch(\"bigint | number | string\", position);\n }\n if (param.isU128()) {\n if (isLargeNumber(arg)) {\n return new U128(BigInt(arg));\n }\n throwTypeMismatch(\"bigint | number | string\", position);\n }\n if (param.isU256()) {\n if (isLargeNumber(arg)) {\n return new U256(BigInt(arg));\n }\n throwTypeMismatch(\"bigint | number | string\", position);\n }\n\n // Generic needs to use the subtype\n if (param.isGeneric()) {\n const genericIndex = param.value;\n if (genericIndex < 0 || genericIndex >= genericTypeParams.length) {\n throw new Error(`Generic argument ${param.toString()} is invalid for argument ${position}`);\n }\n\n return checkOrConvertArgument(arg, genericTypeParams[genericIndex], position, genericTypeParams);\n }\n\n // We have to special case some vectors for Vector<u8>\n if (param.isVector()) {\n // Check special case for Vector<u8>\n if (param.value.isU8()) {\n // We don't allow vector<u8>, but we convert strings to UTF8 Uint8Array\n // This is legacy behavior from the original SDK\n if (isString(arg)) {\n return MoveVector.U8(TEXT_ENCODER.encode(arg));\n }\n if (arg instanceof Uint8Array) {\n return MoveVector.U8(arg);\n }\n if (arg instanceof ArrayBuffer) {\n return MoveVector.U8(new Uint8Array(arg));\n }\n }\n\n // TODO: Support Uint16Array, Uint32Array, BigUint64Array?\n\n if (Array.isArray(arg)) {\n return new MoveVector(arg.map((item) => checkOrConvertArgument(item, param.value, position, genericTypeParams)));\n }\n\n throw new Error(`Type mismatch for argument ${position}, type '${param.toString()}'`);\n }\n\n // Handle structs as they're more complex\n if (param.isStruct()) {\n if (param.isString()) {\n if (isString(arg)) {\n return new MoveString(arg);\n }\n throwTypeMismatch(\"string\", position);\n }\n if (param.isObject()) {\n // The inner type of Object doesn't matter, since it's just syntactic sugar\n if (isString(arg)) {\n return AccountAddress.fromString(arg);\n }\n throwTypeMismatch(\"string | AccountAddress\", position);\n }\n\n if (param.isOption()) {\n if (isEmptyOption(arg)) {\n // Here we attempt to reconstruct the underlying type\n // Note, for some reason the `isBool` etc. does not work with the compiler\n const innerParam = param.value.typeArgs[0];\n if (innerParam instanceof TypeTagBool) {\n return new MoveOption<Bool>(null);\n }\n if (innerParam instanceof TypeTagAddress) {\n return new MoveOption<AccountAddress>(null);\n }\n if (innerParam instanceof TypeTagU8) {\n return new MoveOption<U8>(null);\n }\n if (innerParam instanceof TypeTagU16) {\n return new MoveOption<U16>(null);\n }\n if (innerParam instanceof TypeTagU32) {\n return new MoveOption<U32>(null);\n }\n if (innerParam instanceof TypeTagU64) {\n return new MoveOption<U64>(null);\n }\n if (innerParam instanceof TypeTagU128) {\n return new MoveOption<U128>(null);\n }\n if (innerParam instanceof TypeTagU256) {\n return new MoveOption<U256>(null);\n }\n\n // In all other cases, we will use a placeholder, it doesn't actually matter what the type is, but it will be obvious\n // Note: This is a placeholder U8 type, and does not match the actual type, as that can't be dynamically grabbed\n return new MoveOption<MoveString>(null);\n }\n\n return new MoveOption(checkOrConvertArgument(arg, param.value.typeArgs[0], position, genericTypeParams));\n }\n\n throw new Error(`Unsupported struct input type for argument ${position}, type '${param.toString()}'`);\n }\n\n throw new Error(`Type mismatch for argument ${position}, type '${param.toString()}'`);\n}\n\n/**\n * Checks that the type of the BCS encoded argument matches the ABI\n * @param param\n * @param arg\n * @param position\n */\nfunction checkType(param: TypeTag, arg: EntryFunctionArgumentTypes, position: number) {\n if (param.isBool()) {\n if (isBcsBool(arg)) {\n return;\n }\n throwTypeMismatch(\"Bool\", position);\n }\n if (param.isAddress()) {\n if (isBcsAddress(arg)) {\n return;\n }\n throwTypeMismatch(\"AccountAddress\", position);\n }\n if (param.isU8()) {\n if (isBcsU8(arg)) {\n return;\n }\n throwTypeMismatch(\"U8\", position);\n }\n if (param.isU16()) {\n if (isBcsU16(arg)) {\n return;\n }\n throwTypeMismatch(\"U16\", position);\n }\n if (param.isU32()) {\n if (isBcsU32(arg)) {\n return;\n }\n throwTypeMismatch(\"U32\", position);\n }\n if (param.isU64()) {\n if (isBcsU64(arg)) {\n return;\n }\n throwTypeMismatch(\"U64\", position);\n }\n if (param.isU128()) {\n if (isBcsU128(arg)) {\n return;\n }\n throwTypeMismatch(\"U128\", position);\n }\n if (param.isU256()) {\n if (isBcsU256(arg)) {\n return;\n }\n throwTypeMismatch(\"U256\", position);\n }\n if (param.isVector()) {\n if (arg instanceof MoveVector) {\n // If there's anything in it, check that the inner types match\n // Note that since it's typed, the first item should be the same as the rest\n if (arg.values.length > 0) {\n checkType(param.value, arg.values[0], position);\n }\n\n return;\n }\n throwTypeMismatch(\"MoveVector\", position);\n }\n\n // Handle structs as they're more complex\n if (param instanceof TypeTagStruct) {\n if (param.isString()) {\n if (isBcsString(arg)) {\n return;\n }\n throwTypeMismatch(\"MoveString\", position);\n }\n if (param.isObject()) {\n if (isBcsAddress(arg)) {\n return;\n }\n throwTypeMismatch(\"AccountAddress\", position);\n }\n if (param.isOption()) {\n if (arg instanceof MoveOption) {\n // If there's a value, we can check the inner type (otherwise it doesn't really matter)\n if (arg.value !== undefined) {\n checkType(param.value.typeArgs[0], arg.value, position);\n }\n return;\n }\n throwTypeMismatch(\"MoveOption\", position);\n }\n }\n\n throw new Error(`Type mismatch for argument ${position}, expected '${param.toString()}'`);\n}\n"],"mappings":"+fAiDA,IAAMA,EAAe,IAAI,YAQlB,SAASC,GAAoBC,EAAqD,CACvF,OACEA,GAAe,IAAKC,GAEdC,EAASD,CAAO,EACXE,EAAaF,CAAO,EAEtBA,CACR,GAAK,CAAC,CAEX,CAWA,eAAsBG,EACpBC,EACAC,EACAC,EACAC,EACmC,CAEnC,IAAMC,EAAS,MAAMC,EAAU,CAAE,YAAAF,EAAa,eAAgBH,EAAe,WAAAC,CAAW,CAAC,EAEzF,GAAIG,EAAO,IACT,OAAOA,EAAO,IAAI,kBAAkB,KAAME,GAASA,EAAK,OAASJ,CAAY,CAIjF,CAaA,eAAsBK,GACpBP,EACAC,EACAC,EACAC,EAC2B,CAC3B,IAAMK,EAAc,MAAMT,EAAiBC,EAAeC,EAAYC,EAAcC,CAAW,EAG/F,GAAI,CAACK,EACH,MAAM,IAAI,MAAM,0CAA0CR,CAAa,KAAKC,CAAU,KAAKC,CAAY,GAAG,EAI5G,GAAI,CAACM,EAAY,SACf,MAAM,IAAI,MAAM,IAAIR,CAAa,KAAKC,CAAU,KAAKC,CAAY,4BAA4B,EAI/F,IAAMO,EAAaC,EAAsBF,CAAW,EAC9CG,EAAoB,CAAC,EAC3B,QAASC,EAAIH,EAAYG,EAAIJ,EAAY,OAAO,OAAQI,GAAK,EAC3DD,EAAO,KAAKb,EAAaU,EAAY,OAAOI,CAAC,EAAG,CAAE,cAAe,EAAK,CAAC,CAAC,EAG1E,MAAO,CACL,QAASH,EACT,eAAgBD,EAAY,oBAC5B,WAAYG,CACd,CACF,CAaA,eAAsBE,GACpBb,EACAC,EACAC,EACAC,EAC0B,CAC1B,IAAMK,EAAc,MAAMT,EAAiBC,EAAeC,EAAYC,EAAcC,CAAW,EAG/F,GAAI,CAACK,EACH,MAAM,IAAI,MAAM,yCAAyCR,CAAa,KAAKC,CAAU,KAAKC,CAAY,GAAG,EAI3G,GAAI,CAACM,EAAY,QACf,MAAM,IAAI,MAAM,IAAIR,CAAa,KAAKC,CAAU,KAAKC,CAAY,2BAA2B,EAI9F,IAAMS,EAAoB,CAAC,EAC3B,QAASC,EAAI,EAAGA,EAAIJ,EAAY,OAAO,OAAQI,GAAK,EAClDD,EAAO,KAAKb,EAAaU,EAAY,OAAOI,CAAC,EAAG,CAAE,cAAe,EAAK,CAAC,CAAC,EAI1E,IAAME,EAAyB,CAAC,EAChC,QAASF,EAAI,EAAGA,EAAIJ,EAAY,OAAO,OAAQI,GAAK,EAClDE,EAAY,KAAKhB,EAAaU,EAAY,OAAOI,CAAC,EAAG,CAAE,cAAe,EAAK,CAAC,CAAC,EAG/E,MAAO,CACL,eAAgBJ,EAAY,oBAC5B,WAAYG,EACZ,YAAAG,CACF,CACF,CAYO,SAASC,GACdb,EACAM,EACAQ,EACAC,EACAC,EACA,CAEA,GAAID,GAAYT,EAAY,WAAW,OACrC,MAAM,IAAI,MAAM,2BAA2BN,CAAY,eAAeM,EAAY,WAAW,MAAM,EAAE,EAGvG,IAAMW,EAAQX,EAAY,WAAWS,CAAQ,EAC7C,OAAOG,EAAuBJ,EAAKG,EAAOF,EAAUC,CAAiB,CACvE,CAWO,SAASE,EACdJ,EACAG,EACAF,EACAC,EACA,CAEA,OAAIG,EAA+BL,CAAG,GAWpCM,EAAUH,EAAOH,EAAKC,CAAQ,EACvBD,GAIFO,EAASP,EAAKG,EAAOF,EAAUC,CAAiB,CACzD,CAYA,SAASK,EACPP,EACAG,EACAF,EACAC,EAC4B,CAC5B,GAAIC,EAAM,OAAO,EAAG,CAClB,GAAIK,EAAOR,CAAG,EACZ,OAAO,IAAIS,EAAKT,CAAG,EAErB,GAAInB,EAASmB,CAAG,EAAG,CACjB,GAAIA,IAAQ,OAAQ,OAAO,IAAIS,EAAK,EAAI,EACxC,GAAIT,IAAQ,QAAS,OAAO,IAAIS,EAAK,EAAK,CAC5C,CAQAC,EAAkB,UAAWT,CAAQ,CACvC,CAEA,GAAIE,EAAM,UAAU,EAAG,CACrB,GAAItB,EAASmB,CAAG,EACd,OAAOW,EAAe,WAAWX,CAAG,EAEtCU,EAAkB,0BAA2BT,CAAQ,CACvD,CACA,GAAIE,EAAM,KAAK,EAAG,CAChB,IAAMS,EAAMC,EAAcb,CAAG,EAC7B,GAAIY,IAAQ,OACV,OAAO,IAAIE,EAAGF,CAAG,EAEnBF,EAAkB,kBAAmBT,CAAQ,CAC/C,CACA,GAAIE,EAAM,MAAM,EAAG,CACjB,IAAMS,EAAMC,EAAcb,CAAG,EAC7B,GAAIY,IAAQ,OACV,OAAO,IAAIG,EAAIH,CAAG,EAEpBF,EAAkB,kBAAmBT,CAAQ,CAC/C,CACA,GAAIE,EAAM,MAAM,EAAG,CACjB,IAAMS,EAAMC,EAAcb,CAAG,EAC7B,GAAIY,IAAQ,OACV,OAAO,IAAII,EAAIJ,CAAG,EAEpBF,EAAkB,kBAAmBT,CAAQ,CAC/C,CACA,GAAIE,EAAM,MAAM,EAAG,CACjB,GAAIc,EAAcjB,CAAG,EACnB,OAAO,IAAIkB,EAAI,OAAOlB,CAAG,CAAC,EAE5BU,EAAkB,2BAA4BT,CAAQ,CACxD,CACA,GAAIE,EAAM,OAAO,EAAG,CAClB,GAAIc,EAAcjB,CAAG,EACnB,OAAO,IAAImB,EAAK,OAAOnB,CAAG,CAAC,EAE7BU,EAAkB,2BAA4BT,CAAQ,CACxD,CACA,GAAIE,EAAM,OAAO,EAAG,CAClB,GAAIc,EAAcjB,CAAG,EACnB,OAAO,IAAIoB,EAAK,OAAOpB,CAAG,CAAC,EAE7BU,EAAkB,2BAA4BT,CAAQ,CACxD,CAGA,GAAIE,EAAM,UAAU,EAAG,CACrB,IAAMkB,EAAelB,EAAM,MAC3B,GAAIkB,EAAe,GAAKA,GAAgBnB,EAAkB,OACxD,MAAM,IAAI,MAAM,oBAAoBC,EAAM,SAAS,CAAC,4BAA4BF,CAAQ,EAAE,EAG5F,OAAOG,EAAuBJ,EAAKE,EAAkBmB,CAAY,EAAGpB,EAAUC,CAAiB,CACjG,CAGA,GAAIC,EAAM,SAAS,EAAG,CAEpB,GAAIA,EAAM,MAAM,KAAK,EAAG,CAGtB,GAAItB,EAASmB,CAAG,EACd,OAAOsB,EAAW,GAAG7C,EAAa,OAAOuB,CAAG,CAAC,EAE/C,GAAIA,aAAe,WACjB,OAAOsB,EAAW,GAAGtB,CAAG,EAE1B,GAAIA,aAAe,YACjB,OAAOsB,EAAW,GAAG,IAAI,WAAWtB,CAAG,CAAC,CAE5C,CAIA,GAAI,MAAM,QAAQA,CAAG,EACnB,OAAO,IAAIsB,EAAWtB,EAAI,IAAKuB,GAASnB,EAAuBmB,EAAMpB,EAAM,MAAOF,EAAUC,CAAiB,CAAC,CAAC,EAGjH,MAAM,IAAI,MAAM,8BAA8BD,CAAQ,WAAWE,EAAM,SAAS,CAAC,GAAG,CACtF,CAGA,GAAIA,EAAM,SAAS,EAAG,CACpB,GAAIA,EAAM,SAAS,EAAG,CACpB,GAAItB,EAASmB,CAAG,EACd,OAAO,IAAIwB,EAAWxB,CAAG,EAE3BU,EAAkB,SAAUT,CAAQ,CACtC,CACA,GAAIE,EAAM,SAAS,EAAG,CAEpB,GAAItB,EAASmB,CAAG,EACd,OAAOW,EAAe,WAAWX,CAAG,EAEtCU,EAAkB,0BAA2BT,CAAQ,CACvD,CAEA,GAAIE,EAAM,SAAS,EAAG,CACpB,GAAIsB,EAAczB,CAAG,EAAG,CAGtB,IAAM0B,EAAavB,EAAM,MAAM,SAAS,CAAC,EACzC,OAAIuB,aAAsBC,EACjB,IAAIC,EAAiB,IAAI,EAE9BF,aAAsBG,EACjB,IAAID,EAA2B,IAAI,EAExCF,aAAsBI,EACjB,IAAIF,EAAe,IAAI,EAE5BF,aAAsBK,EACjB,IAAIH,EAAgB,IAAI,EAE7BF,aAAsBM,EACjB,IAAIJ,EAAgB,IAAI,EAE7BF,aAAsBO,EACjB,IAAIL,EAAgB,IAAI,EAE7BF,aAAsBQ,EACjB,IAAIN,EAAiB,IAAI,EAE9BF,aAAsBS,EACjB,IAAIP,EAAiB,IAAI,EAK3B,IAAIA,EAAuB,IAAI,CACxC,CAEA,OAAO,IAAIA,EAAWxB,EAAuBJ,EAAKG,EAAM,MAAM,SAAS,CAAC,EAAGF,EAAUC,CAAiB,CAAC,CACzG,CAEA,MAAM,IAAI,MAAM,8CAA8CD,CAAQ,WAAWE,EAAM,SAAS,CAAC,GAAG,CACtG,CAEA,MAAM,IAAI,MAAM,8BAA8BF,CAAQ,WAAWE,EAAM,SAAS,CAAC,GAAG,CACtF,CAQA,SAASG,EAAUH,EAAgBH,EAAiCC,EAAkB,CACpF,GAAIE,EAAM,OAAO,EAAG,CAClB,GAAIiC,EAAUpC,CAAG,EACf,OAEFU,EAAkB,OAAQT,CAAQ,CACpC,CACA,GAAIE,EAAM,UAAU,EAAG,CACrB,GAAIkC,EAAarC,CAAG,EAClB,OAEFU,EAAkB,iBAAkBT,CAAQ,CAC9C,CACA,GAAIE,EAAM,KAAK,EAAG,CAChB,GAAImC,EAAQtC,CAAG,EACb,OAEFU,EAAkB,KAAMT,CAAQ,CAClC,CACA,GAAIE,EAAM,MAAM,EAAG,CACjB,GAAIoC,EAASvC,CAAG,EACd,OAEFU,EAAkB,MAAOT,CAAQ,CACnC,CACA,GAAIE,EAAM,MAAM,EAAG,CACjB,GAAIqC,EAASxC,CAAG,EACd,OAEFU,EAAkB,MAAOT,CAAQ,CACnC,CACA,GAAIE,EAAM,MAAM,EAAG,CACjB,GAAIsC,EAASzC,CAAG,EACd,OAEFU,EAAkB,MAAOT,CAAQ,CACnC,CACA,GAAIE,EAAM,OAAO,EAAG,CAClB,GAAIuC,EAAU1C,CAAG,EACf,OAEFU,EAAkB,OAAQT,CAAQ,CACpC,CACA,GAAIE,EAAM,OAAO,EAAG,CAClB,GAAIwC,EAAU3C,CAAG,EACf,OAEFU,EAAkB,OAAQT,CAAQ,CACpC,CACA,GAAIE,EAAM,SAAS,EAAG,CACpB,GAAIH,aAAesB,EAAY,CAGzBtB,EAAI,OAAO,OAAS,GACtBM,EAAUH,EAAM,MAAOH,EAAI,OAAO,CAAC,EAAGC,CAAQ,EAGhD,MACF,CACAS,EAAkB,aAAcT,CAAQ,CAC1C,CAGA,GAAIE,aAAiByC,EAAe,CAClC,GAAIzC,EAAM,SAAS,EAAG,CACpB,GAAI0C,EAAY7C,CAAG,EACjB,OAEFU,EAAkB,aAAcT,CAAQ,CAC1C,CACA,GAAIE,EAAM,SAAS,EAAG,CACpB,GAAIkC,EAAarC,CAAG,EAClB,OAEFU,EAAkB,iBAAkBT,CAAQ,CAC9C,CACA,GAAIE,EAAM,SAAS,EAAG,CACpB,GAAIH,aAAe4B,EAAY,CAEzB5B,EAAI,QAAU,QAChBM,EAAUH,EAAM,MAAM,SAAS,CAAC,EAAGH,EAAI,MAAOC,CAAQ,EAExD,MACF,CACAS,EAAkB,aAAcT,CAAQ,CAC1C,CACF,CAEA,MAAM,IAAI,MAAM,8BAA8BA,CAAQ,eAAeE,EAAM,SAAS,CAAC,GAAG,CAC1F","names":["TEXT_ENCODER","standardizeTypeTags","typeArguments","typeArg","isString","parseTypeTag","fetchFunctionAbi","moduleAddress","moduleName","functionName","aptosConfig","module","getModule","func","fetchEntryFunctionAbi","functionAbi","numSigners","findFirstNonSignerArg","params","i","fetchViewFunctionAbi","returnTypes","convertArgument","arg","position","genericTypeParams","param","checkOrConvertArgument","isEncodedEntryFunctionArgument","checkType","parseArg","isBool","Bool","throwTypeMismatch","AccountAddress","num","convertNumber","U8","U16","U32","isLargeNumber","U64","U128","U256","genericIndex","MoveVector","item","MoveString","isEmptyOption","innerParam","TypeTagBool","MoveOption","TypeTagAddress","TypeTagU8","TypeTagU16","TypeTagU32","TypeTagU64","TypeTagU128","TypeTagU256","isBcsBool","isBcsAddress","isBcsU8","isBcsU16","isBcsU32","isBcsU64","isBcsU128","isBcsU256","TypeTagStruct","isBcsString"]}
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-YZ3YPLEU.mjs";import{a as g,b}from"./chunk-QQM47PHZ.mjs";import{b as y,d as p}from"./chunk-L2SDI7PI.mjs";import{b as c}from"./chunk-JNO7KPMG.mjs";import{a as h}from"./chunk-AJ5JHBAE.mjs";var n=class extends h{static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){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: ${t}`)}}isEd25519(){return this instanceof o}isMultiEd25519(){return this instanceof d}isMultiAgent(){return this instanceof u}isFeePayer(){return this instanceof l}isSingleSender(){return this instanceof A}},o=class r extends n{constructor(e,t){super(),this.public_key=e,this.signature=t}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let t=y.deserialize(e),s=p.deserialize(e);return new r(t,s)}},d=class r extends n{constructor(e,t){super(),this.public_key=e,this.signature=t}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let t=g.deserialize(e),s=b.deserialize(e);return new r(t,s)}},u=class r extends n{constructor(e,t,s){super(),this.sender=e,this.secondary_signer_addresses=t,this.secondary_signers=s}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let t=i.deserialize(e),s=e.deserializeVector(c),a=e.deserializeVector(i);return new r(t,s,a)}},l=class r extends n{constructor(e,t,s,a){super(),this.sender=e,this.secondary_signer_addresses=t,this.secondary_signers=s,this.fee_payer=a}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 t=i.deserialize(e),s=e.deserializeVector(c),a=e.deserializeVector(i),_=c.deserialize(e),z=i.deserialize(e),S={address:_,authenticator:z};return new r(t,s,a,S)}},A=class r extends n{constructor(e){super(),this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let t=i.deserialize(e);return new r(t)}};export{n as a,o as b,d as c,u as d,l as e,A as f};
2
- //# sourceMappingURL=chunk-AVPQOD67.mjs.map
1
+ import{a as i}from"./chunk-DYELAVMR.mjs";import{a as g,b}from"./chunk-2YTHKFJZ.mjs";import{b as y,d as p}from"./chunk-VGJIATTB.mjs";import{b as c}from"./chunk-JNO7KPMG.mjs";import{a as h}from"./chunk-AJ5JHBAE.mjs";var n=class extends h{static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){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: ${t}`)}}isEd25519(){return this instanceof o}isMultiEd25519(){return this instanceof d}isMultiAgent(){return this instanceof u}isFeePayer(){return this instanceof l}isSingleSender(){return this instanceof A}},o=class r extends n{constructor(e,t){super(),this.public_key=e,this.signature=t}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let t=y.deserialize(e),s=p.deserialize(e);return new r(t,s)}},d=class r extends n{constructor(e,t){super(),this.public_key=e,this.signature=t}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let t=g.deserialize(e),s=b.deserialize(e);return new r(t,s)}},u=class r extends n{constructor(e,t,s){super(),this.sender=e,this.secondary_signer_addresses=t,this.secondary_signers=s}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let t=i.deserialize(e),s=e.deserializeVector(c),a=e.deserializeVector(i);return new r(t,s,a)}},l=class r extends n{constructor(e,t,s,a){super(),this.sender=e,this.secondary_signer_addresses=t,this.secondary_signers=s,this.fee_payer=a}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 t=i.deserialize(e),s=e.deserializeVector(c),a=e.deserializeVector(i),_=c.deserialize(e),z=i.deserialize(e),S={address:_,authenticator:z};return new r(t,s,a,S)}},A=class r extends n{constructor(e){super(),this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let t=i.deserialize(e);return new r(t)}};export{n as a,o as b,d as c,u as d,l as e,A as f};
2
+ //# sourceMappingURL=chunk-KX43GEAB.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as d}from"./chunk-PW3ISXPN.mjs";import{p as c}from"./chunk-VHNX2NUR.mjs";import{b as i}from"./chunk-JNO7KPMG.mjs";var a=300,g=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,s={_or:[{account_address:{_eq:e.split("::")[0]}},{account_address:{_eq:"0x0000000000000000000000000000000000000000000000000000000000000000"},sequence_number:{_eq:0},creation_number:{_eq:0}}],indexed_type:{_eq:e}};return p({aptosConfig:o,options:{...n,where:s}})}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;g(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-DSKAMBBL.mjs.map
1
+ import{c as d}from"./chunk-HPZQGMSH.mjs";import{p as c}from"./chunk-VHNX2NUR.mjs";import{b as i}from"./chunk-JNO7KPMG.mjs";var a=300,g=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,s={_or:[{account_address:{_eq:e.split("::")[0]}},{account_address:{_eq:"0x0000000000000000000000000000000000000000000000000000000000000000"},sequence_number:{_eq:0},creation_number:{_eq:0}}],indexed_type:{_eq:e}};return p({aptosConfig:o,options:{...n,where:s}})}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;g(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-L25CRR2W.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as p}from"./chunk-KT3DT5GV.mjs";async function o(e){let{type:t,originMethod:s,path:i,body:r,acceptType:R,contentType:f,params:c,aptosConfig:n,overrides:A}=e,d=n.getRequestUrl(t);return p({url:d,method:"POST",originMethod:s,path:i,body:r,contentType:f,acceptType:R,params:c,overrides:A},n,e.type)}async function q(e){let{aptosConfig:t}=e;return o({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function C(e){let{aptosConfig:t}=e;return o({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function E(e){let{aptosConfig:t}=e,s={...t,clientConfig:{...t.clientConfig}};return delete s?.clientConfig?.API_KEY,o({...e,type:"Faucet",overrides:{...s.clientConfig,...s.faucetConfig,...e.overrides,HEADERS:{...s.clientConfig?.HEADERS,...s.faucetConfig?.HEADERS}}})}async function a(e){return o({...e,type:"Pepper"})}async function m(e){return o({...e,type:"Prover"})}export{o as a,q as b,C as c,E as d,a as e,m as f};
2
- //# sourceMappingURL=chunk-WKNX43KN.mjs.map
1
+ import{b as p}from"./chunk-SPX2YFZN.mjs";async function o(e){let{type:t,originMethod:s,path:i,body:r,acceptType:R,contentType:f,params:c,aptosConfig:n,overrides:A}=e,d=n.getRequestUrl(t);return p({url:d,method:"POST",originMethod:s,path:i,body:r,contentType:f,acceptType:R,params:c,overrides:A},n,e.type)}async function q(e){let{aptosConfig:t}=e;return o({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function C(e){let{aptosConfig:t}=e;return o({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function E(e){let{aptosConfig:t}=e,s={...t,clientConfig:{...t.clientConfig}};return delete s?.clientConfig?.API_KEY,o({...e,type:"Faucet",overrides:{...s.clientConfig,...s.faucetConfig,...e.overrides,HEADERS:{...s.clientConfig?.HEADERS,...s.faucetConfig?.HEADERS}}})}async function a(e){return o({...e,type:"Pepper"})}async function m(e){return o({...e,type:"Prover"})}export{o as a,q as b,C as c,E as d,a as e,m as f};
2
+ //# sourceMappingURL=chunk-LGHPJTF3.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as f}from"./chunk-H457BI3I.mjs";import{a as h}from"./chunk-YPBNYKOD.mjs";import{r as y}from"./chunk-XUP6VABV.mjs";import{b as K}from"./chunk-JNO7KPMG.mjs";import{b as A}from"./chunk-SPRNSFUV.mjs";import{a as m}from"./chunk-D52UKPQF.mjs";var w=class d extends f{constructor(e){let r=h.create(e);super({publicKey:r,...e}),this.publicKey=r}serialize(e){super.serialize(e),this.publicKey.jwkAddress.serialize(e)}static deserialize(e){let{address:r,proof:c,ephemeralKeyPair:i,jwt:s,uidKey:t,pepper:n,verificationKeyHash:o}=f.partialDeserialize(e),l=K.deserialize(e),{iss:a,aud:p,uidVal:u}=y({jwt:s,uidKey:t});return new d({address:r,proof:c,ephemeralKeyPair:i,iss:a,uidKey:t,uidVal:u,aud:p,pepper:n,jwt:s,verificationKeyHash:o,jwkAddress:l})}static fromBytes(e){return d.deserialize(new m(A.hexInputToUint8Array(e)))}static create(e){let{address:r,proof:c,jwt:i,ephemeralKeyPair:s,pepper:t,jwkAddress:n,uidKey:o="sub",proofFetchCallback:l,verificationKey:a}=e,{iss:p,aud:u,uidVal:g}=y({jwt:i,uidKey:o});return new d({address:r,proof:c,ephemeralKeyPair:s,iss:p,uidKey:o,uidVal:g,aud:u,pepper:t,jwkAddress:K.from(n),jwt:i,proofFetchCallback:l,verificationKeyHash:a?a.hash():void 0})}};export{w as a};
2
- //# sourceMappingURL=chunk-ONFKJ57C.mjs.map
1
+ import{b as f}from"./chunk-UWLW2VLZ.mjs";import{a as h}from"./chunk-IQ4SCMB6.mjs";import{r as y}from"./chunk-K62JTXWQ.mjs";import{b as K}from"./chunk-JNO7KPMG.mjs";import{a as m}from"./chunk-D52UKPQF.mjs";import{b as A}from"./chunk-SPRNSFUV.mjs";var w=class d extends f{constructor(e){let r=h.create(e);super({publicKey:r,...e}),this.publicKey=r}serialize(e){super.serialize(e),this.publicKey.jwkAddress.serialize(e)}static deserialize(e){let{address:r,proof:c,ephemeralKeyPair:i,jwt:s,uidKey:t,pepper:n,verificationKeyHash:o}=f.partialDeserialize(e),l=K.deserialize(e),{iss:a,aud:p,uidVal:u}=y({jwt:s,uidKey:t});return new d({address:r,proof:c,ephemeralKeyPair:i,iss:a,uidKey:t,uidVal:u,aud:p,pepper:n,jwt:s,verificationKeyHash:o,jwkAddress:l})}static fromBytes(e){return d.deserialize(new m(A.hexInputToUint8Array(e)))}static create(e){let{address:r,proof:c,jwt:i,ephemeralKeyPair:s,pepper:t,jwkAddress:n,uidKey:o="sub",proofFetchCallback:l,verificationKey:a}=e,{iss:p,aud:u,uidVal:g}=y({jwt:i,uidKey:o});return new d({address:r,proof:c,ephemeralKeyPair:s,iss:p,uidKey:o,uidVal:g,aud:u,pepper:t,jwkAddress:K.from(n),jwt:i,proofFetchCallback:l,verificationKeyHash:a?a.hash():void 0})}};export{w as a};
2
+ //# sourceMappingURL=chunk-LHBMBCFC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-X3JPX7T6.mjs";import{a as e}from"./chunk-AVPQOD67.mjs";import{a as r}from"./chunk-AJ5JHBAE.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-37Y54PJ5.mjs.map
1
+ import{a as i}from"./chunk-D54FD6XE.mjs";import{a as e}from"./chunk-KX43GEAB.mjs";import{a as r}from"./chunk-AJ5JHBAE.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-LYO22HMF.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as a}from"./chunk-PW3ISXPN.mjs";import{u as n}from"./chunk-VHNX2NUR.mjs";import{b as s}from"./chunk-JNO7KPMG.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-4DNCQM3S.mjs.map
1
+ import{c as a}from"./chunk-HPZQGMSH.mjs";import{u as n}from"./chunk-VHNX2NUR.mjs";import{b as s}from"./chunk-JNO7KPMG.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-MBEWPBGN.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-2QBCTW67.mjs";import{a as A}from"./chunk-HFWFDS6Y.mjs";import{a as h}from"./chunk-CA3Q2X6B.mjs";import{a as y}from"./chunk-JDNI5VIJ.mjs";import{a as m}from"./chunk-46L6BAJG.mjs";import{a as d}from"./chunk-V5NDNR36.mjs";import{a as r}from"./chunk-2NHQQQZK.mjs";import{a}from"./chunk-SBCLBDCP.mjs";import{a as c}from"./chunk-6K4TOFCO.mjs";import{a as l}from"./chunk-5NJWJXSS.mjs";import{a as f}from"./chunk-OKE3FXIP.mjs";import{a as g}from"./chunk-AAATWCJT.mjs";import{a as s}from"./chunk-4YEOOZ2N.mjs";import{a as p}from"./chunk-E2NYQVP3.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-MOGPSSTD.mjs.map
1
+ import{a as g}from"./chunk-7OHMMGS6.mjs";import{a as u}from"./chunk-E2GPZCQI.mjs";import{a as A}from"./chunk-RSO5YIDW.mjs";import{a as h}from"./chunk-ETF76XA3.mjs";import{a as y}from"./chunk-UKVH4UGL.mjs";import{a as m}from"./chunk-JONEH52T.mjs";import{a as p}from"./chunk-2REHS35S.mjs";import{a as d}from"./chunk-V5NDNR36.mjs";import{a as r}from"./chunk-VGITSRT6.mjs";import{a}from"./chunk-HBWIDPNN.mjs";import{a as c}from"./chunk-JGLEKXFP.mjs";import{a as l}from"./chunk-GZBVXXUL.mjs";import{a as f}from"./chunk-FFCCBAEZ.mjs";import{a as s}from"./chunk-IUSAYAEI.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-ML7D2CVG.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as g}from"./chunk-H457BI3I.mjs";import{e as a}from"./chunk-YZ3YPLEU.mjs";import{a as m,b as u}from"./chunk-BLLHTGAP.mjs";import{b as y}from"./chunk-JNO7KPMG.mjs";var p=class l{constructor(e){let{multiKey:s,signers:i,address:r}=e;this.publicKey=s,this.signingScheme=3,this.accountAddress=r?y.from(r):this.publicKey.authKey().derivedAddress();let t=[];for(let n of i)t.push(this.publicKey.getIndex(n.publicKey));let c=i.map((n,o)=>[n,t[o]]);c.sort((n,o)=>n[1]-o[1]),this.signers=c.map(n=>n[0]),this.signerIndicies=c.map(n=>n[1]),this.signaturesBitmap=this.publicKey.createBitmap({bits:t})}static fromPublicKeysAndSigners(e){let{publicKeys:s,signaturesRequired:i,signers:r}=e,t=new m({publicKeys:s,signaturesRequired:i});return new l({multiKey:t,signers:r})}static isMultiKeySigner(e){return e instanceof l}signWithAuthenticator(e){return new a(this.publicKey,this.sign(e))}signTransactionWithAuthenticator(e){return new a(this.publicKey,this.signTransaction(e))}async waitForProofFetch(){let s=this.signers.filter(i=>i instanceof g).map(async i=>i.waitForProofFetch());await Promise.all(s)}async checkKeylessAccountValidity(e){let i=this.signers.filter(r=>r instanceof g).map(r=>r.checkKeylessAccountValidity(e));await Promise.all(i)}sign(e){let s=[];for(let i of this.signers)s.push(i.sign(e));return new u({signatures:s,bitmap:this.signaturesBitmap})}signTransaction(e){let s=[];for(let i of this.signers)s.push(i.signTransaction(e));return new u({signatures:s,bitmap:this.signaturesBitmap})}verifySignature(e){let{message:s,signature:i}=e;if(!this.signerIndicies.every((t,c)=>c===0||t>=this.signerIndicies[c-1]))return!1;for(let t=0;t<i.signatures.length;t+=1){let c=i.signatures[t];if(!this.publicKey.publicKeys[this.signerIndicies[t]].verifySignature({message:s,signature:c}))return!1}return!0}};export{p as a};
2
- //# sourceMappingURL=chunk-GBVRCWCD.mjs.map
1
+ import{b as g}from"./chunk-UWLW2VLZ.mjs";import{e as a}from"./chunk-DYELAVMR.mjs";import{a as m,b as u}from"./chunk-OVI7L7OG.mjs";import{b as y}from"./chunk-JNO7KPMG.mjs";var p=class l{constructor(e){let{multiKey:s,signers:i,address:r}=e;this.publicKey=s,this.signingScheme=3,this.accountAddress=r?y.from(r):this.publicKey.authKey().derivedAddress();let t=[];for(let n of i)t.push(this.publicKey.getIndex(n.publicKey));let c=i.map((n,o)=>[n,t[o]]);c.sort((n,o)=>n[1]-o[1]),this.signers=c.map(n=>n[0]),this.signerIndicies=c.map(n=>n[1]),this.signaturesBitmap=this.publicKey.createBitmap({bits:t})}static fromPublicKeysAndSigners(e){let{publicKeys:s,signaturesRequired:i,signers:r}=e,t=new m({publicKeys:s,signaturesRequired:i});return new l({multiKey:t,signers:r})}static isMultiKeySigner(e){return e instanceof l}signWithAuthenticator(e){return new a(this.publicKey,this.sign(e))}signTransactionWithAuthenticator(e){return new a(this.publicKey,this.signTransaction(e))}async waitForProofFetch(){let s=this.signers.filter(i=>i instanceof g).map(async i=>i.waitForProofFetch());await Promise.all(s)}async checkKeylessAccountValidity(e){let i=this.signers.filter(r=>r instanceof g).map(r=>r.checkKeylessAccountValidity(e));await Promise.all(i)}sign(e){let s=[];for(let i of this.signers)s.push(i.sign(e));return new u({signatures:s,bitmap:this.signaturesBitmap})}signTransaction(e){let s=[];for(let i of this.signers)s.push(i.signTransaction(e));return new u({signatures:s,bitmap:this.signaturesBitmap})}verifySignature(e){let{message:s,signature:i}=e;if(!this.signerIndicies.every((t,c)=>c===0||t>=this.signerIndicies[c-1]))return!1;for(let t=0;t<i.signatures.length;t+=1){let c=i.signatures[t];if(!this.publicKey.publicKeys[this.signerIndicies[t]].verifySignature({message:s,signature:c}))return!1}return!0}};export{p as a};
2
+ //# sourceMappingURL=chunk-NF7ZQQE3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-X3JPX7T6.mjs";import{b as a}from"./chunk-JNO7KPMG.mjs";import{a as i}from"./chunk-AJ5JHBAE.mjs";var o=class t extends i{constructor(e,r){super(),this.rawTransaction=e,this.feePayerAddress=r}serialize(e){this.rawTransaction.serialize(e),this.feePayerAddress===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.feePayerAddress.serialize(e))}static deserialize(e){let r=n.deserialize(e),d=e.deserializeBool(),s;return d&&(s=a.deserialize(e)),new t(r,s)}};export{o as a};
2
- //# sourceMappingURL=chunk-YNT7JHMS.mjs.map
1
+ import{a as n}from"./chunk-D54FD6XE.mjs";import{b as a}from"./chunk-JNO7KPMG.mjs";import{a as i}from"./chunk-AJ5JHBAE.mjs";var o=class t extends i{constructor(e,r){super(),this.rawTransaction=e,this.feePayerAddress=r}serialize(e){this.rawTransaction.serialize(e),this.feePayerAddress===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.feePayerAddress.serialize(e))}static deserialize(e){let r=n.deserialize(e),d=e.deserializeBool(),s;return d&&(s=a.deserialize(e)),new t(r,s)}};export{o as a};
2
+ //# sourceMappingURL=chunk-O4MRRWRI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o,b as l}from"./chunk-LAAFLCDM.mjs";import{b as m}from"./chunk-MHN6XY4Z.mjs";import{a as g}from"./chunk-4O5XDQDO.mjs";import{a as y}from"./chunk-AKIO3OIT.mjs";function d(h){let e=h;return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}var p=class h 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 y.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let r=e.deserializeVector(o),t=e.deserializeU8();return new h({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),b=i[c];b|=t>>n%8,i[c]=b}),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")}static isInstance(e){return"publicKeys"in e&&"signaturesRequired"in e}},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 l?a:new l(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}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let r=e.deserializeVector(l),t=e.deserializeBytes();return new s({signatures:r,bitmap:t})}};s.BITMAP_LEN=4,s.MAX_SIGNATURES_SUPPORTED=s.BITMAP_LEN*8;var f=s;export{p as a,f as b};
2
- //# sourceMappingURL=chunk-BLLHTGAP.mjs.map
1
+ import{a as o,b as l}from"./chunk-P2FTRAK3.mjs";import{a as g}from"./chunk-4O5XDQDO.mjs";import{b as m}from"./chunk-MHN6XY4Z.mjs";import{a as y}from"./chunk-AKIO3OIT.mjs";function d(h){let e=h;return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}var p=class h 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 y.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let r=e.deserializeVector(o),t=e.deserializeU8();return new h({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),b=i[c];b|=t>>n%8,i[c]=b}),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")}static isInstance(e){return"publicKeys"in e&&"signaturesRequired"in e}},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 l?a:new l(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}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let r=e.deserializeVector(l),t=e.deserializeBytes();return new s({signatures:r,bitmap:t})}};s.BITMAP_LEN=4,s.MAX_SIGNATURES_SUPPORTED=s.BITMAP_LEN*8;var f=s;export{p as a,f as b};
2
+ //# sourceMappingURL=chunk-OVI7L7OG.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,c}from"./chunk-KUL55M2H.mjs";import{a as u}from"./chunk-YPBNYKOD.mjs";import{i as o,j as l}from"./chunk-XUP6VABV.mjs";import{b as n,d as s}from"./chunk-L2SDI7PI.mjs";import{b as p}from"./chunk-MHN6XY4Z.mjs";import{a as f}from"./chunk-4O5XDQDO.mjs";import{a as b}from"./chunk-AKIO3OIT.mjs";var K=class r extends p{constructor(e){if(super(),this.publicKey=e,e instanceof n)this.variant=0;else if(e instanceof a)this.variant=1;else if(e instanceof o)this.variant=3;else if(e instanceof u)this.variant=4;else throw new Error("Unsupported public key type")}verifySignature(e){let{message:t,signature:i}=e;return y.isInstance(i)?this.publicKey.verifySignature({message:t,signature:i.signature}):!1}authKey(){return b.fromSchemeAndBytes({scheme:2,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.publicKey.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32(),i;switch(t){case 0:i=n.deserialize(e);break;case 1:i=a.deserialize(e);break;case 3:i=o.deserialize(e);break;case 4:i=u.deserialize(e);break;default:throw new Error(`Unknown variant index for AnyPublicKey: ${t}`)}return new r(i)}static isPublicKey(e){return e instanceof r}isEd25519(){return this.publicKey instanceof n}isSecp256k1PublicKey(){return this.publicKey instanceof a}static isInstance(e){return"publicKey"in e&&"variant"in e}},y=class r extends f{constructor(e){if(super(),this.signature=e,e instanceof s)this.variant=0;else if(e instanceof c)this.variant=1;else if(e instanceof l)this.variant=3;else throw new Error("Unsupported signature type")}toUint8Array(){return console.warn("[Aptos SDK] Calls to AnySignature.toUint8Array() will soon return the underlying signature bytes. Use AnySignature.bcsToBytes() instead."),this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32(),i;switch(t){case 0:i=s.deserialize(e);break;case 1:i=c.deserialize(e);break;case 3:i=l.deserialize(e);break;default:throw new Error(`Unknown variant index for AnySignature: ${t}`)}return new r(i)}static isInstance(e){return"signature"in e&&typeof e.signature=="object"&&e.signature!==null&&"toUint8Array"in e.signature}};export{K as a,y as b};
2
- //# sourceMappingURL=chunk-LAAFLCDM.mjs.map
1
+ import{a,c}from"./chunk-YIQ3JFHW.mjs";import{a as u}from"./chunk-IQ4SCMB6.mjs";import{i as o,j as l}from"./chunk-K62JTXWQ.mjs";import{b as n,d as s}from"./chunk-VGJIATTB.mjs";import{a as f}from"./chunk-4O5XDQDO.mjs";import{b as p}from"./chunk-MHN6XY4Z.mjs";import{a as b}from"./chunk-AKIO3OIT.mjs";var K=class r extends p{constructor(e){if(super(),this.publicKey=e,e instanceof n)this.variant=0;else if(e instanceof a)this.variant=1;else if(e instanceof o)this.variant=3;else if(e instanceof u)this.variant=4;else throw new Error("Unsupported public key type")}verifySignature(e){let{message:t,signature:i}=e;return y.isInstance(i)?this.publicKey.verifySignature({message:t,signature:i.signature}):!1}authKey(){return b.fromSchemeAndBytes({scheme:2,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.publicKey.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32(),i;switch(t){case 0:i=n.deserialize(e);break;case 1:i=a.deserialize(e);break;case 3:i=o.deserialize(e);break;case 4:i=u.deserialize(e);break;default:throw new Error(`Unknown variant index for AnyPublicKey: ${t}`)}return new r(i)}static isPublicKey(e){return e instanceof r}isEd25519(){return this.publicKey instanceof n}isSecp256k1PublicKey(){return this.publicKey instanceof a}static isInstance(e){return"publicKey"in e&&"variant"in e}},y=class r extends f{constructor(e){if(super(),this.signature=e,e instanceof s)this.variant=0;else if(e instanceof c)this.variant=1;else if(e instanceof l)this.variant=3;else throw new Error("Unsupported signature type")}toUint8Array(){return console.warn("[Aptos SDK] Calls to AnySignature.toUint8Array() will soon return the underlying signature bytes. Use AnySignature.bcsToBytes() instead."),this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32(),i;switch(t){case 0:i=s.deserialize(e);break;case 1:i=c.deserialize(e);break;case 3:i=l.deserialize(e);break;default:throw new Error(`Unknown variant index for AnySignature: ${t}`)}return new r(i)}static isInstance(e){return"signature"in e&&typeof e.signature=="object"&&e.signature!==null&&"toUint8Array"in e.signature}};export{K as a,y as b};
2
+ //# sourceMappingURL=chunk-P2FTRAK3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c,b as o,c as d,d as z,e as m,f as U,g as y}from"./chunk-42H7WETG.mjs";import{a as s}from"./chunk-AJ5JHBAE.mjs";import{b as u}from"./chunk-SPRNSFUV.mjs";import{a as b}from"./chunk-D52UKPQF.mjs";var t=class i extends s{constructor(e){super(),this.values=e}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){if(this.values[0]!==void 0&&!(this.values[0]instanceof o)){new p(this.bcsToBytes()).serializeForScriptFunction(e);return}e.serializeU32AsUleb128(4),e.serialize(this)}static U8(e){let r;if(Array.isArray(e)&&e.length===0)r=[];else if(Array.isArray(e)&&typeof e[0]=="number")r=e;else if(typeof e=="string"){let n=u.fromHexInput(e);r=Array.from(n.toUint8Array())}else if(e instanceof Uint8Array)r=Array.from(e);else throw new Error("Invalid input type, must be an number[], Uint8Array, or hex string");return new i(r.map(n=>new o(n)))}static U16(e){return new i(e.map(r=>new d(r)))}static U32(e){return new i(e.map(r=>new z(r)))}static U64(e){return new i(e.map(r=>new m(r)))}static U128(e){return new i(e.map(r=>new U(r)))}static U256(e){return new i(e.map(r=>new y(r)))}static Bool(e){return new i(e.map(r=>new c(r)))}static MoveString(e){return new i(e.map(r=>new a(r)))}serialize(e){e.serializeVector(this.values)}static deserialize(e,r){let n=e.deserializeUleb128AsU32(),l=new Array;for(let w=0;w<n;w+=1)l.push(r.deserialize(e));return new i(l)}},p=class i extends s{constructor(e){super(),this.value=u.fromHexInput(e).toUint8Array()}serialize(e){e.serializeBytes(this.value)}serializeForEntryFunction(e){this.serialize(e)}serializeForScriptFunction(e){e.serializeU32AsUleb128(9),this.serialize(e)}static deserialize(e){return new i(e.deserializeBytes())}toMoveVector(e){let r=new b(this.bcsToBytes());r.deserializeUleb128AsU32();let n=r.deserializeVector(e);return new t(n)}},a=class i extends s{constructor(e){super(),this.value=e}serialize(e){e.serializeStr(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){let n=new TextEncoder().encode(this.value);t.U8(n).serializeForScriptFunction(e)}static deserialize(e){return new i(e.deserializeStr())}},A=class i extends s{constructor(e){super(),typeof e<"u"&&e!==null?this.vec=new t([e]):this.vec=new t([]),[this.value]=this.vec.values}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}unwrap(){if(this.isSome())return this.vec.values[0];throw new Error("Called unwrap on a MoveOption with no value")}isSome(){return this.vec.values.length===1}serialize(e){this.vec.serialize(e)}static U8(e){return new i(e!=null?new o(e):void 0)}static U16(e){return new i(e!=null?new d(e):void 0)}static U32(e){return new i(e!=null?new z(e):void 0)}static U64(e){return new i(e!=null?new m(e):void 0)}static U128(e){return new i(e!=null?new U(e):void 0)}static U256(e){return new i(e!=null?new y(e):void 0)}static Bool(e){return new i(e!=null?new c(e):void 0)}static MoveString(e){return new i(e!=null?new a(e):void 0)}static deserialize(e,r){let n=t.deserialize(e,r);return new i(n.values[0])}};export{t as a,p as b,a as c,A as d};
2
- //# sourceMappingURL=chunk-TM7OZT3W.mjs.map
1
+ import{a as c,b as o,c as d,d as z,e as m,f as U,g as y}from"./chunk-42H7WETG.mjs";import{a as b}from"./chunk-D52UKPQF.mjs";import{a as s}from"./chunk-AJ5JHBAE.mjs";import{b as u}from"./chunk-SPRNSFUV.mjs";var t=class i extends s{constructor(e){super(),this.values=e}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){if(this.values[0]!==void 0&&!(this.values[0]instanceof o)){new p(this.bcsToBytes()).serializeForScriptFunction(e);return}e.serializeU32AsUleb128(4),e.serialize(this)}static U8(e){let r;if(Array.isArray(e)&&e.length===0)r=[];else if(Array.isArray(e)&&typeof e[0]=="number")r=e;else if(typeof e=="string"){let n=u.fromHexInput(e);r=Array.from(n.toUint8Array())}else if(e instanceof Uint8Array)r=Array.from(e);else throw new Error("Invalid input type, must be an number[], Uint8Array, or hex string");return new i(r.map(n=>new o(n)))}static U16(e){return new i(e.map(r=>new d(r)))}static U32(e){return new i(e.map(r=>new z(r)))}static U64(e){return new i(e.map(r=>new m(r)))}static U128(e){return new i(e.map(r=>new U(r)))}static U256(e){return new i(e.map(r=>new y(r)))}static Bool(e){return new i(e.map(r=>new c(r)))}static MoveString(e){return new i(e.map(r=>new a(r)))}serialize(e){e.serializeVector(this.values)}static deserialize(e,r){let n=e.deserializeUleb128AsU32(),l=new Array;for(let w=0;w<n;w+=1)l.push(r.deserialize(e));return new i(l)}},p=class i extends s{constructor(e){super(),this.value=u.fromHexInput(e).toUint8Array()}serialize(e){e.serializeBytes(this.value)}serializeForEntryFunction(e){this.serialize(e)}serializeForScriptFunction(e){e.serializeU32AsUleb128(9),this.serialize(e)}static deserialize(e){return new i(e.deserializeBytes())}toMoveVector(e){let r=new b(this.bcsToBytes());r.deserializeUleb128AsU32();let n=r.deserializeVector(e);return new t(n)}},a=class i extends s{constructor(e){super(),this.value=e}serialize(e){e.serializeStr(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){let n=new TextEncoder().encode(this.value);t.U8(n).serializeForScriptFunction(e)}static deserialize(e){return new i(e.deserializeStr())}},A=class i extends s{constructor(e){super(),typeof e<"u"&&e!==null?this.vec=new t([e]):this.vec=new t([]),[this.value]=this.vec.values}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}unwrap(){if(this.isSome())return this.vec.values[0];throw new Error("Called unwrap on a MoveOption with no value")}isSome(){return this.vec.values.length===1}serialize(e){this.vec.serialize(e)}static U8(e){return new i(e!=null?new o(e):void 0)}static U16(e){return new i(e!=null?new d(e):void 0)}static U32(e){return new i(e!=null?new z(e):void 0)}static U64(e){return new i(e!=null?new m(e):void 0)}static U128(e){return new i(e!=null?new U(e):void 0)}static U256(e){return new i(e!=null?new y(e):void 0)}static Bool(e){return new i(e!=null?new c(e):void 0)}static MoveString(e){return new i(e!=null?new a(e):void 0)}static deserialize(e,r){let n=t.deserialize(e,r);return new i(n.values[0])}};export{t as a,p as b,a as c,A as d};
2
+ //# sourceMappingURL=chunk-Q3CWUEXI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-VCY3JGZM.mjs";import{a as o,b as c}from"./chunk-2CJC43CV.mjs";import{a as h,i as d}from"./chunk-AHWZA3GD.mjs";import{g as u}from"./chunk-OJBMR5CT.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-F2AIWA7L.mjs.map
1
+ import{a as l}from"./chunk-4J2JYRV3.mjs";import{a as o,b as c}from"./chunk-2CJC43CV.mjs";import{a as h,i as d}from"./chunk-SY4HK6CC.mjs";import{g as u}from"./chunk-I5GENJBA.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-RC43EXC4.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as p}from"./chunk-FXUI3SSD.mjs";import{d as s}from"./chunk-YZ3YPLEU.mjs";import{a as u,b as y}from"./chunk-LAAFLCDM.mjs";import{b as a}from"./chunk-KUL55M2H.mjs";import{c as i}from"./chunk-L2SDI7PI.mjs";import{b as g}from"./chunk-JNO7KPMG.mjs";var h=class c{constructor(e){this.signingScheme=2;let{privateKey:r,address:t}=e;this.privateKey=r,this.publicKey=new u(r.publicKey()),this.accountAddress=t?g.from(t):this.publicKey.authKey().derivedAddress()}static generate(e={}){let{scheme:r=0}=e,t;switch(r){case 0:t=i.generate();break;case 2:t=a.generate();break;default:throw new Error(`Unsupported signature scheme ${r}`)}return new c({privateKey:t})}static fromDerivationPath(e){let{scheme:r=0,path:t,mnemonic:o}=e,n;switch(r){case 0:n=i.fromDerivationPath(t,o);break;case 2:n=a.fromDerivationPath(t,o);break;default:throw new Error(`Unsupported signature scheme ${r}`)}return new c({privateKey:n})}verifySignature(e){return this.publicKey.verifySignature(e)}signWithAuthenticator(e){return new s(this.publicKey,this.sign(e))}signTransactionWithAuthenticator(e){return new s(this.publicKey,this.signTransaction(e))}sign(e){return new y(this.privateKey.sign(e))}signTransaction(e){return this.sign(p(e))}};export{h as a};
2
- //# sourceMappingURL=chunk-NARS3JDH.mjs.map
1
+ import{d as p}from"./chunk-TQA6HY6A.mjs";import{d as s}from"./chunk-DYELAVMR.mjs";import{a as u,b as y}from"./chunk-P2FTRAK3.mjs";import{b as a}from"./chunk-YIQ3JFHW.mjs";import{c as i}from"./chunk-VGJIATTB.mjs";import{b as g}from"./chunk-JNO7KPMG.mjs";var h=class c{constructor(e){this.signingScheme=2;let{privateKey:r,address:t}=e;this.privateKey=r,this.publicKey=new u(r.publicKey()),this.accountAddress=t?g.from(t):this.publicKey.authKey().derivedAddress()}static generate(e={}){let{scheme:r=0}=e,t;switch(r){case 0:t=i.generate();break;case 2:t=a.generate();break;default:throw new Error(`Unsupported signature scheme ${r}`)}return new c({privateKey:t})}static fromDerivationPath(e){let{scheme:r=0,path:t,mnemonic:o}=e,n;switch(r){case 0:n=i.fromDerivationPath(t,o);break;case 2:n=a.fromDerivationPath(t,o);break;default:throw new Error(`Unsupported signature scheme ${r}`)}return new c({privateKey:n})}verifySignature(e){return this.publicKey.verifySignature(e)}signWithAuthenticator(e){return new s(this.publicKey,this.sign(e))}signTransactionWithAuthenticator(e){return new s(this.publicKey,this.signTransaction(e))}sign(e){return new y(this.privateKey.sign(e))}signTransaction(e){return this.sign(p(e))}};export{h as a};
2
+ //# sourceMappingURL=chunk-RLH25IDA.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as o}from"./chunk-4DNCQM3S.mjs";import{a as r}from"./chunk-XT5T5LAP.mjs";var t=class{constructor(e){this.config=e}async getObjectDataByObjectAddress(e){return await r({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"objects_processor"}),o({aptosConfig:this.config,...e})}};export{t as a};
2
- //# sourceMappingURL=chunk-HFWFDS6Y.mjs.map
1
+ import{b as o}from"./chunk-MBEWPBGN.mjs";import{a as r}from"./chunk-BP45UJII.mjs";var t=class{constructor(e){this.config=e}async getObjectDataByObjectAddress(e){return await r({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"objects_processor"}),o({aptosConfig:this.config,...e})}};export{t as a};
2
+ //# sourceMappingURL=chunk-RSO5YIDW.mjs.map
@@ -0,0 +1,2 @@
1
+ var o="1.32.1";export{o as a};
2
+ //# sourceMappingURL=chunk-RZGTHCJY.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.32.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.32.1\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
@@ -1,2 +1,2 @@
1
- import{e as r}from"./chunk-F45G3GP3.mjs";import{a as d}from"./chunk-AMCJQIOT.mjs";async function A(s,u){let{url:t,method:n,body:i,contentType:a,params:o,overrides:e,originMethod:R}=s,p={...e?.HEADERS,"x-aptos-client":`aptos-typescript-sdk/${d}`,"content-type":a??"application/json","x-aptos-typescript-sdk-origin-method":R};return e?.AUTH_TOKEN&&(p.Authorization=`Bearer ${e?.AUTH_TOKEN}`),e?.API_KEY&&(p.Authorization=`Bearer ${e?.API_KEY}`),u.provider({url:t,method:n,body:i,params:o,headers:p,overrides:e})}async function P(s,u,t){let{url:n,path:i}=s,a=i?`${n}/${i}`:n,o=await A({...s,url:a},u.client),e={status:o.status,statusText:o.statusText??"No status text provided",data:o.data,headers:o.headers,config:o.config,request:o.request,url:a};if(e.status===401)throw new r({apiType:t,aptosRequest:s,aptosResponse:e});if(t==="Indexer"){let R=e.data;if(R.errors)throw new r({apiType:t,aptosRequest:s,aptosResponse:e});e.data=R.data}else if((t==="Pepper"||t==="Prover")&&e.status>=400)throw new r({apiType:t,aptosRequest:s,aptosResponse:e});if(e.status>=200&&e.status<300)return e;throw new r({apiType:t,aptosRequest:s,aptosResponse:e})}export{A as a,P as b};
2
- //# sourceMappingURL=chunk-KT3DT5GV.mjs.map
1
+ import{e as r}from"./chunk-F45G3GP3.mjs";import{a as d}from"./chunk-RZGTHCJY.mjs";async function A(s,u){let{url:t,method:n,body:i,contentType:a,params:o,overrides:e,originMethod:R}=s,p={...e?.HEADERS,"x-aptos-client":`aptos-typescript-sdk/${d}`,"content-type":a??"application/json","x-aptos-typescript-sdk-origin-method":R};return e?.AUTH_TOKEN&&(p.Authorization=`Bearer ${e?.AUTH_TOKEN}`),e?.API_KEY&&(p.Authorization=`Bearer ${e?.API_KEY}`),u.provider({url:t,method:n,body:i,params:o,headers:p,overrides:e})}async function P(s,u,t){let{url:n,path:i}=s,a=i?`${n}/${i}`:n,o=await A({...s,url:a},u.client),e={status:o.status,statusText:o.statusText??"No status text provided",data:o.data,headers:o.headers,config:o.config,request:o.request,url:a};if(e.status===401)throw new r({apiType:t,aptosRequest:s,aptosResponse:e});if(t==="Indexer"){let R=e.data;if(R.errors)throw new r({apiType:t,aptosRequest:s,aptosResponse:e});e.data=R.data}else if((t==="Pepper"||t==="Prover")&&e.status>=400)throw new r({apiType:t,aptosRequest:s,aptosResponse:e});if(e.status>=200&&e.status<300)return e;throw new r({apiType:t,aptosRequest:s,aptosResponse:e})}export{A as a,P as b};
2
+ //# sourceMappingURL=chunk-SPX2YFZN.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g,f as l,g as R,i as x}from"./chunk-XKOSS5KC.mjs";import{a as K}from"./chunk-K4TJRYGQ.mjs";import{a as S}from"./chunk-II654QZU.mjs";import{a as y,b as C}from"./chunk-H457BI3I.mjs";import{d as I}from"./chunk-FXUI3SSD.mjs";import{a as w}from"./chunk-HEHVWRMO.mjs";import{a as b}from"./chunk-37Y54PJ5.mjs";import{c as m,m as c}from"./chunk-T6ADNZE5.mjs";import{a as h}from"./chunk-YPBNYKOD.mjs";import{i as P}from"./chunk-XUP6VABV.mjs";import{b as p}from"./chunk-JNO7KPMG.mjs";import{b as d}from"./chunk-WKNX43KN.mjs";import{a as s}from"./chunk-TM7OZT3W.mjs";import{b as f}from"./chunk-42H7WETG.mjs";import{a as T}from"./chunk-D52UKPQF.mjs";async function _(t){let e=await k(t);return v(t,e)}async function k(t){let{aptosConfig:e,data:n}=t,o,a;return"bytecode"in n?a=await g(n):"multisigAddress"in n?(o={aptosConfig:e,multisigAddress:n.multisigAddress,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},a=await g(o)):(o={aptosConfig:e,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},a=await g(o)),a}async function v(t,e){let{aptosConfig:n,sender:o,options:a}=t,i;if(M(t)&&(i=p.ZERO.toString()),N(t)){let{secondarySignerAddresses:r}=t;return l({aptosConfig:n,sender:o,payload:e,options:a,secondarySignerAddresses:r,feePayerAddress:i})}return l({aptosConfig:n,sender:o,payload:e,options:a,feePayerAddress:i})}function M(t){return t.withFeePayer===!0}function N(t){return"secondarySignerAddresses"in t}function sn(t){let{transaction:e}=t;return I(e)}function D(t){let{signer:e,transaction:n}=t;return e.signTransactionWithAuthenticator(n)}function G(t){let{signer:e,transaction:n}=t;if(!n.feePayerAddress)throw new Error(`Transaction ${n} is not a Fee Payer transaction`);return n.feePayerAddress=e.accountAddress,D({signer:e,transaction:n})}async function cn(t){let{aptosConfig:e,transaction:n,signerPublicKey:o,secondarySignersPublicKeys:a,feePayerPublicKey:i,options:r}=t,u=R({transaction:n,signerPublicKey:o,secondarySignersPublicKeys:a,feePayerPublicKey:i,options:r}),{data:A}=await d({aptosConfig:e,body:u,path:"transactions/simulate",params:{estimate_gas_unit_price:t.options?.estimateGasUnitPrice??!1,estimate_max_gas_amount:t.options?.estimateMaxGasAmount??!1,estimate_prioritized_gas_unit_price:t.options?.estimatePrioritizedGasUnitPrice??!1},originMethod:"simulateTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return A}async function U(t){let{aptosConfig:e}=t,n=x({...t});try{let{data:o}=await d({aptosConfig:e,body:n,path:"transactions",originMethod:"submitTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return o}catch(o){let a=b.deserialize(new T(n));throw a.authenticator.isSingleSender()&&a.authenticator.sender.isSingleKey()&&(a.authenticator.sender.public_key.publicKey instanceof P||a.authenticator.sender.public_key.publicKey instanceof h)&&await C.fetchJWK({aptosConfig:e,publicKey:a.authenticator.sender.public_key.publicKey,kid:a.authenticator.sender.signature.signature.getJwkKid()}),o}}async function O(t){let{aptosConfig:e,signer:n,feePayer:o,transaction:a}=t;y(n)&&await n.checkKeylessAccountValidity(e),y(o)&&await o.checkKeylessAccountValidity(e);let i=t.feePayerAuthenticator||o&&G({signer:o,transaction:a}),r=D({signer:n,transaction:a});return U({aptosConfig:e,transaction:a,senderAuthenticator:r,feePayerAuthenticator:i})}async function un(t){let{aptosConfig:e,senderAuthenticator:n,feePayer:o,transaction:a}=t;y(o)&&await o.checkKeylessAccountValidity(e);let i=G({signer:o,transaction:a});return U({aptosConfig:e,transaction:a,senderAuthenticator:n,feePayerAuthenticator:i})}var E={typeParameters:[],parameters:[c.u8(),new c(c.u8())]};async function pn(t){let{aptosConfig:e,account:n,metadataBytes:o,moduleBytecode:a,options:i}=t,r=a.map(u=>s.U8(u));return _({aptosConfig:e,sender:p.from(n),data:{function:"0x1::code::publish_package_txn",functionArguments:[s.U8(o),new s(r)],abi:E},options:i})}var V={typeParameters:[],parameters:[new m,c.u8(),new m,c.u8(),c.u8(),c.u8()]};async function yn(t){let{aptosConfig:e,fromAccount:n,toNewPrivateKey:o}=t,a=await K({aptosConfig:e,accountAddress:n.accountAddress}),i=S.fromPrivateKey({privateKey:o,legacy:!0}),u=new w({sequenceNumber:BigInt(a.sequence_number),originator:n.accountAddress,currentAuthKey:p.from(a.authentication_key),newPublicKey:i.publicKey}).bcsToBytes(),A=n.sign(u),B=i.sign(u),F=await _({aptosConfig:e,sender:n.accountAddress,data:{function:"0x1::account::rotate_authentication_key",functionArguments:[new f(n.signingScheme),s.U8(n.publicKey.toUint8Array()),new f(i.signingScheme),s.U8(i.publicKey.toUint8Array()),s.U8(A.toUint8Array()),s.U8(B.toUint8Array())],abi:V}});return O({aptosConfig:e,signer:n,transaction:F})}export{_ as a,k as b,v as c,sn as d,D as e,G as f,cn as g,U as h,O as i,un as j,pn as k,yn as l};
2
- //# sourceMappingURL=chunk-AHWZA3GD.mjs.map
1
+ import{a as g,f as l,g as R,i as x}from"./chunk-26WX3UFP.mjs";import{a as K}from"./chunk-FYYTCJS4.mjs";import{a as S}from"./chunk-TGW36YOD.mjs";import{a as y,b as C}from"./chunk-UWLW2VLZ.mjs";import{d as I}from"./chunk-TQA6HY6A.mjs";import{a as w}from"./chunk-2E3BT4YW.mjs";import{a as b}from"./chunk-LYO22HMF.mjs";import{c as m,m as c}from"./chunk-T6ADNZE5.mjs";import{a as h}from"./chunk-IQ4SCMB6.mjs";import{i as P}from"./chunk-K62JTXWQ.mjs";import{b as p}from"./chunk-JNO7KPMG.mjs";import{b as d}from"./chunk-LGHPJTF3.mjs";import{a as s}from"./chunk-Q3CWUEXI.mjs";import{b as f}from"./chunk-42H7WETG.mjs";import{a as T}from"./chunk-D52UKPQF.mjs";async function _(t){let e=await k(t);return v(t,e)}async function k(t){let{aptosConfig:e,data:n}=t,o,a;return"bytecode"in n?a=await g(n):"multisigAddress"in n?(o={aptosConfig:e,multisigAddress:n.multisigAddress,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},a=await g(o)):(o={aptosConfig:e,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},a=await g(o)),a}async function v(t,e){let{aptosConfig:n,sender:o,options:a}=t,i;if(M(t)&&(i=p.ZERO.toString()),N(t)){let{secondarySignerAddresses:r}=t;return l({aptosConfig:n,sender:o,payload:e,options:a,secondarySignerAddresses:r,feePayerAddress:i})}return l({aptosConfig:n,sender:o,payload:e,options:a,feePayerAddress:i})}function M(t){return t.withFeePayer===!0}function N(t){return"secondarySignerAddresses"in t}function sn(t){let{transaction:e}=t;return I(e)}function D(t){let{signer:e,transaction:n}=t;return e.signTransactionWithAuthenticator(n)}function G(t){let{signer:e,transaction:n}=t;if(!n.feePayerAddress)throw new Error(`Transaction ${n} is not a Fee Payer transaction`);return n.feePayerAddress=e.accountAddress,D({signer:e,transaction:n})}async function cn(t){let{aptosConfig:e,transaction:n,signerPublicKey:o,secondarySignersPublicKeys:a,feePayerPublicKey:i,options:r}=t,u=R({transaction:n,signerPublicKey:o,secondarySignersPublicKeys:a,feePayerPublicKey:i,options:r}),{data:A}=await d({aptosConfig:e,body:u,path:"transactions/simulate",params:{estimate_gas_unit_price:t.options?.estimateGasUnitPrice??!1,estimate_max_gas_amount:t.options?.estimateMaxGasAmount??!1,estimate_prioritized_gas_unit_price:t.options?.estimatePrioritizedGasUnitPrice??!1},originMethod:"simulateTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return A}async function U(t){let{aptosConfig:e}=t,n=x({...t});try{let{data:o}=await d({aptosConfig:e,body:n,path:"transactions",originMethod:"submitTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return o}catch(o){let a=b.deserialize(new T(n));throw a.authenticator.isSingleSender()&&a.authenticator.sender.isSingleKey()&&(a.authenticator.sender.public_key.publicKey instanceof P||a.authenticator.sender.public_key.publicKey instanceof h)&&await C.fetchJWK({aptosConfig:e,publicKey:a.authenticator.sender.public_key.publicKey,kid:a.authenticator.sender.signature.signature.getJwkKid()}),o}}async function O(t){let{aptosConfig:e,signer:n,feePayer:o,transaction:a}=t;y(n)&&await n.checkKeylessAccountValidity(e),y(o)&&await o.checkKeylessAccountValidity(e);let i=t.feePayerAuthenticator||o&&G({signer:o,transaction:a}),r=D({signer:n,transaction:a});return U({aptosConfig:e,transaction:a,senderAuthenticator:r,feePayerAuthenticator:i})}async function un(t){let{aptosConfig:e,senderAuthenticator:n,feePayer:o,transaction:a}=t;y(o)&&await o.checkKeylessAccountValidity(e);let i=G({signer:o,transaction:a});return U({aptosConfig:e,transaction:a,senderAuthenticator:n,feePayerAuthenticator:i})}var E={typeParameters:[],parameters:[c.u8(),new c(c.u8())]};async function pn(t){let{aptosConfig:e,account:n,metadataBytes:o,moduleBytecode:a,options:i}=t,r=a.map(u=>s.U8(u));return _({aptosConfig:e,sender:p.from(n),data:{function:"0x1::code::publish_package_txn",functionArguments:[s.U8(o),new s(r)],abi:E},options:i})}var V={typeParameters:[],parameters:[new m,c.u8(),new m,c.u8(),c.u8(),c.u8()]};async function yn(t){let{aptosConfig:e,fromAccount:n,toNewPrivateKey:o}=t,a=await K({aptosConfig:e,accountAddress:n.accountAddress}),i=S.fromPrivateKey({privateKey:o,legacy:!0}),u=new w({sequenceNumber:BigInt(a.sequence_number),originator:n.accountAddress,currentAuthKey:p.from(a.authentication_key),newPublicKey:i.publicKey}).bcsToBytes(),A=n.sign(u),B=i.sign(u),F=await _({aptosConfig:e,sender:n.accountAddress,data:{function:"0x1::account::rotate_authentication_key",functionArguments:[new f(n.signingScheme),s.U8(n.publicKey.toUint8Array()),new f(i.signingScheme),s.U8(i.publicKey.toUint8Array()),s.U8(A.toUint8Array()),s.U8(B.toUint8Array())],abi:V}});return O({aptosConfig:e,signer:n,transaction:F})}export{_ as a,k as b,v as c,sn as d,D as e,G as f,cn as g,U as h,O as i,un as j,pn as k,yn as l};
2
+ //# sourceMappingURL=chunk-SY4HK6CC.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-NARS3JDH.mjs";import{a as n}from"./chunk-JLD7DLKM.mjs";import{c as i}from"./chunk-L2SDI7PI.mjs";var o=class{static generate(e={}){let{scheme:t=0,legacy:r=!0}=e;return t===0&&r?n.generate():c.generate({scheme:t})}static fromPrivateKey(e){let{privateKey:t,address:r,legacy:a=!0}=e;return t instanceof i&&a?new n({privateKey:t,address:r}):new c({privateKey:t,address:r})}static fromPrivateKeyAndAddress(e){return this.fromPrivateKey(e)}static fromDerivationPath(e){let{scheme:t=0,mnemonic:r,path:a,legacy:s=!0}=e;return t===0&&s?n.fromDerivationPath({mnemonic:r,path:a}):c.fromDerivationPath({scheme:t,mnemonic:r,path:a})}static authKey(e){let{publicKey:t}=e;return t.authKey()}verifySignature(e){return this.publicKey.verifySignature(e)}};export{o as a};
2
- //# sourceMappingURL=chunk-II654QZU.mjs.map
1
+ import{a as c}from"./chunk-RLH25IDA.mjs";import{a as n}from"./chunk-2LQ4FTSR.mjs";import{c as i}from"./chunk-VGJIATTB.mjs";var o=class{static generate(e={}){let{scheme:t=0,legacy:r=!0}=e;return t===0&&r?n.generate():c.generate({scheme:t})}static fromPrivateKey(e){let{privateKey:t,address:r,legacy:a=!0}=e;return t instanceof i&&a?new n({privateKey:t,address:r}):new c({privateKey:t,address:r})}static fromPrivateKeyAndAddress(e){return this.fromPrivateKey(e)}static fromDerivationPath(e){let{scheme:t=0,mnemonic:r,path:a,legacy:s=!0}=e;return t===0&&s?n.fromDerivationPath({mnemonic:r,path:a}):c.fromDerivationPath({scheme:t,mnemonic:r,path:a})}static authKey(e){let{publicKey:t}=e;return t.authKey()}verifySignature(e){return this.publicKey.verifySignature(e)}};export{o as a};
2
+ //# sourceMappingURL=chunk-TGW36YOD.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as T,d as c}from"./chunk-X3JPX7T6.mjs";import{g as A,h as a}from"./chunk-J245N3XF.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-FXUI3SSD.mjs.map
1
+ import{c as T,d as c}from"./chunk-D54FD6XE.mjs";import{g as A,h as a}from"./chunk-J7PJSK3J.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-TQA6HY6A.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-I2NMCLNW.mjs";import{h as a}from"./chunk-AHWZA3GD.mjs";import{a as o}from"./chunk-KDMSOCZY.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
- //# sourceMappingURL=chunk-KA5FX53Q.mjs.map
1
+ import{a as i}from"./chunk-I2NMCLNW.mjs";import{h as a}from"./chunk-SY4HK6CC.mjs";import{a as o}from"./chunk-KDMSOCZY.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
+ //# sourceMappingURL=chunk-U3GE6IPF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-XT5T5LAP.mjs";import{a as o,b as r,c as s}from"./chunk-SU2WB34N.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-JDNI5VIJ.mjs.map
1
+ import{a as o,b as r,c as s}from"./chunk-CEW2NI3K.mjs";import{a as t}from"./chunk-BP45UJII.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-UKVH4UGL.mjs.map