@aptos-labs/ts-sdk 1.12.1 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (373) hide show
  1. package/dist/common/chunk-KSEUZTKY.js +2 -0
  2. package/dist/common/chunk-KSEUZTKY.js.map +1 -0
  3. package/dist/common/cli/index.d.ts +37 -0
  4. package/dist/common/cli/index.js +2 -0
  5. package/dist/common/cli/index.js.map +1 -0
  6. package/dist/common/index.d.ts +384 -111
  7. package/dist/common/index.js +24 -24
  8. package/dist/common/index.js.map +1 -1
  9. package/dist/esm/{Ed25519Account-DHqzsb8B.d.mts → Ed25519Account--qjfup2u.d.mts} +1 -1
  10. package/dist/esm/api/account.d.mts +51 -10
  11. package/dist/esm/api/account.mjs +1 -1
  12. package/dist/esm/api/ans.d.mts +10 -18
  13. package/dist/esm/api/ans.mjs +1 -1
  14. package/dist/esm/api/aptos.d.mts +6 -2
  15. package/dist/esm/api/aptos.mjs +1 -1
  16. package/dist/esm/api/aptosConfig.d.mts +4 -0
  17. package/dist/esm/api/aptosConfig.mjs +1 -1
  18. package/dist/esm/api/coin.d.mts +8 -1
  19. package/dist/esm/api/coin.mjs +1 -1
  20. package/dist/esm/api/digitalAsset.d.mts +144 -5
  21. package/dist/esm/api/digitalAsset.mjs +1 -1
  22. package/dist/esm/api/event.d.mts +14 -9
  23. package/dist/esm/api/event.mjs +1 -1
  24. package/dist/esm/api/faucet.d.mts +3 -0
  25. package/dist/esm/api/faucet.mjs +1 -1
  26. package/dist/esm/api/fungibleAsset.d.mts +30 -7
  27. package/dist/esm/api/fungibleAsset.mjs +1 -1
  28. package/dist/esm/api/general.d.mts +51 -28
  29. package/dist/esm/api/general.mjs +1 -1
  30. package/dist/esm/api/index.d.mts +2 -2
  31. package/dist/esm/api/index.mjs +1 -1
  32. package/dist/esm/api/staking.d.mts +11 -2
  33. package/dist/esm/api/staking.mjs +1 -1
  34. package/dist/esm/api/transaction.d.mts +60 -17
  35. package/dist/esm/api/transaction.mjs +1 -1
  36. package/dist/esm/api/transactionSubmission/build.d.mts +1 -1
  37. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  38. package/dist/esm/api/transactionSubmission/management.d.mts +2 -2
  39. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  40. package/dist/esm/api/transactionSubmission/sign.d.mts +2 -2
  41. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  42. package/dist/esm/api/transactionSubmission/simulate.d.mts +1 -1
  43. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  44. package/dist/esm/api/transactionSubmission/submit.d.mts +1 -1
  45. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  46. package/dist/esm/api/utils.mjs +1 -1
  47. package/dist/esm/bcs/index.mjs +1 -1
  48. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  49. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  50. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  51. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  52. package/dist/esm/bcs/serializer.mjs +1 -1
  53. package/dist/esm/{chunk-T4C6BVXK.mjs → chunk-2M6OT6DU.mjs} +2 -2
  54. package/dist/esm/chunk-2M6OT6DU.mjs.map +1 -0
  55. package/dist/esm/chunk-3CLYWZYZ.mjs +2 -0
  56. package/dist/esm/{chunk-A7XZTJ3D.mjs → chunk-3F6EYD5O.mjs} +2 -2
  57. package/dist/esm/{chunk-36QXVFR5.mjs → chunk-52C73T26.mjs} +2 -2
  58. package/dist/esm/{chunk-GJDGR3KQ.mjs → chunk-54BANKLA.mjs} +2 -2
  59. package/dist/esm/{chunk-CQS6ZCJ7.mjs → chunk-5AQEETAC.mjs} +1 -1
  60. package/dist/esm/chunk-5AQEETAC.mjs.map +1 -0
  61. package/dist/esm/{chunk-3RQ5V3F3.mjs → chunk-63AIRYJX.mjs} +2 -2
  62. package/dist/esm/{chunk-HJYT6LDB.mjs → chunk-647IOEXV.mjs} +2 -2
  63. package/dist/esm/{chunk-M4SQNMCW.mjs → chunk-6CBPMYW5.mjs} +2 -2
  64. package/dist/esm/chunk-6CBPMYW5.mjs.map +1 -0
  65. package/dist/esm/{chunk-GHYE26Q5.mjs → chunk-6FBKUTGF.mjs} +2 -2
  66. package/dist/esm/chunk-7CAEMK4R.mjs +2 -0
  67. package/dist/esm/chunk-7CAEMK4R.mjs.map +1 -0
  68. package/dist/esm/{chunk-AIPKOP3K.mjs → chunk-7PYFGGHM.mjs} +2 -2
  69. package/dist/esm/chunk-7PYFGGHM.mjs.map +1 -0
  70. package/dist/esm/{chunk-5ID6W7XL.mjs → chunk-A7MSW6OL.mjs} +2 -2
  71. package/dist/esm/{chunk-BCUSI3N6.mjs → chunk-AOCNYMMX.mjs} +2 -2
  72. package/dist/esm/{chunk-RIUFW2OG.mjs → chunk-AP7UZTPZ.mjs} +2 -2
  73. package/dist/esm/{chunk-FXHXOVL4.mjs → chunk-BMKDEIRL.mjs} +2 -2
  74. package/dist/esm/chunk-BMKDEIRL.mjs.map +1 -0
  75. package/dist/esm/{chunk-EV75CYGN.mjs → chunk-BSEQPVD6.mjs} +2 -2
  76. package/dist/esm/chunk-BWFJHFBQ.mjs +2 -0
  77. package/dist/esm/{chunk-U3YYSIIT.mjs → chunk-DMKUAQB7.mjs} +2 -2
  78. package/dist/esm/chunk-DSTKXJMA.mjs +2 -0
  79. package/dist/esm/chunk-FBPNHF54.mjs +2 -0
  80. package/dist/esm/{chunk-G56GPLTB.mjs → chunk-FS3NSGBF.mjs} +2 -2
  81. package/dist/esm/{chunk-UEKKYJGA.mjs → chunk-G2QII3AT.mjs} +2 -2
  82. package/dist/esm/{chunk-527DYQ3X.mjs → chunk-GMVVQD72.mjs} +2 -2
  83. package/dist/esm/chunk-GMVVQD72.mjs.map +1 -0
  84. package/dist/esm/{chunk-DUP7XY5P.mjs → chunk-GXVUN32G.mjs} +2 -2
  85. package/dist/esm/{chunk-VNIABDOT.mjs → chunk-H4UVHJ3M.mjs} +2 -2
  86. package/dist/esm/{chunk-KXFMI7RM.mjs → chunk-HB6T27S2.mjs} +2 -2
  87. package/dist/esm/{chunk-5NWTYUKC.mjs → chunk-HXN2WRUX.mjs} +2 -2
  88. package/dist/esm/{chunk-SUTBXHYU.mjs → chunk-I7YI22IW.mjs} +2 -2
  89. package/dist/esm/chunk-I7YI22IW.mjs.map +1 -0
  90. package/dist/esm/{chunk-FVMJDRHO.mjs → chunk-IA6XM7QE.mjs} +2 -2
  91. package/dist/esm/chunk-IA6XM7QE.mjs.map +1 -0
  92. package/dist/esm/{chunk-QRS4DGP3.mjs → chunk-IOSQVDZI.mjs} +2 -2
  93. package/dist/esm/{chunk-QRS4DGP3.mjs.map → chunk-IOSQVDZI.mjs.map} +1 -1
  94. package/dist/esm/{chunk-NF5OUPPU.mjs → chunk-IS3OLRMB.mjs} +2 -2
  95. package/dist/esm/chunk-IS3OLRMB.mjs.map +1 -0
  96. package/dist/esm/{chunk-DGLW7OBS.mjs → chunk-KL6VJ3UK.mjs} +2 -2
  97. package/dist/esm/{chunk-QRVYLV76.mjs → chunk-KOAUBVO6.mjs} +2 -2
  98. package/dist/esm/{chunk-25UTAIJG.mjs → chunk-KUOIRTNL.mjs} +2 -2
  99. package/dist/esm/chunk-KVIVMWN5.mjs +2 -0
  100. package/dist/esm/chunk-L4Q2XTHT.mjs +2 -0
  101. package/dist/esm/chunk-MIEV7J74.mjs +2 -0
  102. package/dist/esm/chunk-MIEV7J74.mjs.map +1 -0
  103. package/dist/esm/{chunk-5EN52MUT.mjs → chunk-NPFNYP75.mjs} +2 -2
  104. package/dist/esm/chunk-OKCU4GHN.mjs +2 -0
  105. package/dist/esm/chunk-OKCU4GHN.mjs.map +1 -0
  106. package/dist/esm/{chunk-6O5ZR5ME.mjs → chunk-ONDQ4MK7.mjs} +2 -2
  107. package/dist/esm/{chunk-NJRNZEHX.mjs → chunk-OWW6SIDP.mjs} +1 -1
  108. package/dist/esm/chunk-OWW6SIDP.mjs.map +1 -0
  109. package/dist/esm/chunk-QIAHBEEW.mjs +2 -0
  110. package/dist/esm/{chunk-SRDIYE3M.mjs.map → chunk-QIAHBEEW.mjs.map} +1 -1
  111. package/dist/esm/{chunk-EJBUUMWV.mjs → chunk-QK4P26SH.mjs} +2 -2
  112. package/dist/esm/{chunk-FPD4JBPV.mjs → chunk-QTSECE7R.mjs} +2 -2
  113. package/dist/esm/chunk-QTSECE7R.mjs.map +1 -0
  114. package/dist/esm/{chunk-FC5MU6ZN.mjs → chunk-QVKMFPAV.mjs} +2 -2
  115. package/dist/esm/{chunk-O3YFCZJ5.mjs → chunk-QW3VNZJ7.mjs} +2 -2
  116. package/dist/esm/chunk-R5QUBEH6.mjs +2 -0
  117. package/dist/esm/{chunk-JOLLCFQL.mjs → chunk-RAYJRFIG.mjs} +2 -2
  118. package/dist/esm/{chunk-JOLLCFQL.mjs.map → chunk-RAYJRFIG.mjs.map} +1 -1
  119. package/dist/esm/{chunk-35EWRSDK.mjs → chunk-RHBCVCOS.mjs} +2 -2
  120. package/dist/esm/{chunk-VLNBGWGX.mjs → chunk-SDUIZ3FY.mjs} +2 -2
  121. package/dist/esm/chunk-SDUIZ3FY.mjs.map +1 -0
  122. package/dist/esm/{chunk-XDXI3TRT.mjs → chunk-TBFLWWV4.mjs} +2 -2
  123. package/dist/esm/chunk-TBMAJ6AW.mjs +2 -0
  124. package/dist/esm/chunk-TGLSJGFO.mjs +2 -0
  125. package/dist/esm/chunk-TJDC5PWD.mjs +2 -0
  126. package/dist/esm/chunk-TLKV4NHK.mjs +2 -0
  127. package/dist/esm/chunk-TLKV4NHK.mjs.map +1 -0
  128. package/dist/esm/{chunk-YG6YYQRG.mjs → chunk-TR2YS7DT.mjs} +2 -2
  129. package/dist/esm/chunk-TR2YS7DT.mjs.map +1 -0
  130. package/dist/esm/{chunk-MJPUASSD.mjs → chunk-U43IJHQN.mjs} +2 -2
  131. package/dist/esm/{chunk-KAGLWBIJ.mjs → chunk-UML2VQZT.mjs} +2 -2
  132. package/dist/esm/{chunk-KQB7A4OX.mjs → chunk-V4YBGBCN.mjs} +2 -2
  133. package/dist/esm/{chunk-B4DWWHNL.mjs → chunk-V6SPPOWX.mjs} +2 -2
  134. package/dist/esm/{chunk-CP4QCRBZ.mjs → chunk-VBTJVPAM.mjs} +2 -2
  135. package/dist/esm/{chunk-3PMUIXFS.mjs → chunk-VM3EJYJU.mjs} +2 -2
  136. package/dist/esm/chunk-VM3EJYJU.mjs.map +1 -0
  137. package/dist/esm/chunk-VX6LTXGB.mjs +2 -0
  138. package/dist/esm/chunk-VX6LTXGB.mjs.map +1 -0
  139. package/dist/esm/chunk-WEZXFWPR.mjs +2 -0
  140. package/dist/esm/{chunk-CXR7MOBW.mjs.map → chunk-WEZXFWPR.mjs.map} +1 -1
  141. package/dist/esm/chunk-WFZDFFBM.mjs +2 -0
  142. package/dist/esm/{chunk-5ZQJLHJA.mjs → chunk-XYLYHSEI.mjs} +2 -2
  143. package/dist/esm/chunk-Y2VA7F5D.mjs +2 -0
  144. package/dist/esm/chunk-Y2VA7F5D.mjs.map +1 -0
  145. package/dist/esm/{chunk-FNLRLSGJ.mjs → chunk-Y5M5DD64.mjs} +2 -2
  146. package/dist/esm/{chunk-CAGDOGXS.mjs → chunk-YWQLLV2R.mjs} +2 -2
  147. package/dist/esm/chunk-ZEXZ4CX5.mjs +2 -0
  148. package/dist/esm/{chunk-3MFILHZT.mjs → chunk-ZKNM27TR.mjs} +2 -2
  149. package/dist/esm/{chunk-QJAI7DNA.mjs → chunk-ZPNCA4C7.mjs} +2 -2
  150. package/dist/esm/chunk-ZYYK3UXP.mjs +2 -0
  151. package/dist/esm/cli/index.mjs +1 -1
  152. package/dist/esm/client/core.mjs +1 -1
  153. package/dist/esm/client/get.mjs +1 -1
  154. package/dist/esm/client/index.mjs +1 -1
  155. package/dist/esm/client/post.mjs +1 -1
  156. package/dist/esm/client/types.mjs +1 -1
  157. package/dist/esm/core/account/Account.d.mts +2 -2
  158. package/dist/esm/core/account/Account.mjs +1 -1
  159. package/dist/esm/core/account/Ed25519Account.d.mts +2 -2
  160. package/dist/esm/core/account/Ed25519Account.mjs +1 -1
  161. package/dist/esm/core/account/SingleKeyAccount.d.mts +2 -2
  162. package/dist/esm/core/account/SingleKeyAccount.mjs +1 -1
  163. package/dist/esm/core/account/index.d.mts +2 -2
  164. package/dist/esm/core/account/index.mjs +1 -1
  165. package/dist/esm/core/account/utils/address.mjs +1 -1
  166. package/dist/esm/core/account/utils/index.mjs +1 -1
  167. package/dist/esm/core/accountAddress.mjs +1 -1
  168. package/dist/esm/core/authenticationKey.d.mts +1 -1
  169. package/dist/esm/core/authenticationKey.mjs +1 -1
  170. package/dist/esm/core/common.mjs +1 -1
  171. package/dist/esm/core/crypto/ed25519.d.mts +9 -2
  172. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  173. package/dist/esm/core/crypto/index.d.mts +1 -1
  174. package/dist/esm/core/crypto/index.mjs +1 -1
  175. package/dist/esm/core/crypto/multiEd25519.d.mts +1 -1
  176. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  177. package/dist/esm/core/crypto/multiKey.d.mts +1 -1
  178. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  179. package/dist/esm/core/crypto/privateKey.d.mts +1 -1
  180. package/dist/esm/core/crypto/publicKey.d.mts +1 -1
  181. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  182. package/dist/esm/core/crypto/secp256k1.d.mts +8 -1
  183. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  184. package/dist/esm/core/crypto/signature.mjs +1 -1
  185. package/dist/esm/core/crypto/singleKey.d.mts +1 -1
  186. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  187. package/dist/esm/core/crypto/utils.mjs +1 -1
  188. package/dist/esm/core/hex.mjs +1 -1
  189. package/dist/esm/core/index.d.mts +2 -2
  190. package/dist/esm/core/index.mjs +1 -1
  191. package/dist/esm/index.d.mts +2 -4
  192. package/dist/esm/index.mjs +1 -1
  193. package/dist/esm/internal/account.d.mts +3 -3
  194. package/dist/esm/internal/account.mjs +1 -1
  195. package/dist/esm/internal/ans.d.mts +2 -2
  196. package/dist/esm/internal/ans.mjs +1 -1
  197. package/dist/esm/internal/coin.d.mts +1 -1
  198. package/dist/esm/internal/coin.mjs +1 -1
  199. package/dist/esm/internal/digitalAsset.d.mts +3 -3
  200. package/dist/esm/internal/digitalAsset.mjs +1 -1
  201. package/dist/esm/internal/event.d.mts +1 -1
  202. package/dist/esm/internal/event.mjs +1 -1
  203. package/dist/esm/internal/faucet.mjs +1 -1
  204. package/dist/esm/internal/fungibleAsset.d.mts +6 -6
  205. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  206. package/dist/esm/internal/general.mjs +1 -1
  207. package/dist/esm/internal/staking.d.mts +2 -2
  208. package/dist/esm/internal/staking.mjs +1 -1
  209. package/dist/esm/internal/transaction.d.mts +5 -1
  210. package/dist/esm/internal/transaction.mjs +1 -1
  211. package/dist/esm/internal/transactionSubmission.d.mts +6 -6
  212. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  213. package/dist/esm/internal/view.d.mts +1 -1
  214. package/dist/esm/internal/view.mjs +1 -1
  215. package/dist/esm/transactions/authenticator/account.d.mts +1 -1
  216. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  217. package/dist/esm/transactions/authenticator/index.d.mts +1 -1
  218. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  219. package/dist/esm/transactions/authenticator/transaction.d.mts +1 -1
  220. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  221. package/dist/esm/transactions/index.d.mts +2 -2
  222. package/dist/esm/transactions/index.mjs +1 -1
  223. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  224. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  225. package/dist/esm/transactions/instances/index.d.mts +1 -1
  226. package/dist/esm/transactions/instances/index.mjs +1 -1
  227. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  228. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  229. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  230. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +1 -1
  231. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  232. package/dist/esm/transactions/instances/signedTransaction.d.mts +1 -1
  233. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  234. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  235. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  236. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +2 -2
  237. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  238. package/dist/esm/transactions/management/index.d.mts +2 -2
  239. package/dist/esm/transactions/management/index.mjs +1 -1
  240. package/dist/esm/transactions/management/transactionWorker.d.mts +2 -2
  241. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  242. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +1 -1
  243. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  244. package/dist/esm/transactions/transactionBuilder/index.d.mts +2 -2
  245. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  246. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -1
  247. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  248. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +2 -2
  249. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  250. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  251. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  252. package/dist/esm/transactions/types.d.mts +1 -1
  253. package/dist/esm/types/index.d.mts +1 -0
  254. package/dist/esm/types/index.mjs +1 -1
  255. package/dist/esm/version.d.mts +1 -1
  256. package/dist/esm/version.mjs +1 -1
  257. package/package.json +7 -6
  258. package/src/api/account.ts +48 -7
  259. package/src/api/ans.ts +8 -16
  260. package/src/api/aptos.ts +4 -0
  261. package/src/api/aptosConfig.ts +4 -0
  262. package/src/api/coin.ts +7 -0
  263. package/src/api/digitalAsset.ts +140 -1
  264. package/src/api/event.ts +13 -8
  265. package/src/api/faucet.ts +3 -0
  266. package/src/api/fungibleAsset.ts +27 -4
  267. package/src/api/general.ts +48 -25
  268. package/src/api/staking.ts +9 -0
  269. package/src/api/transaction.ts +57 -14
  270. package/src/client/core.ts +2 -1
  271. package/src/core/crypto/ed25519.ts +44 -10
  272. package/src/core/crypto/secp256k1.ts +9 -3
  273. package/src/index.ts +0 -1
  274. package/src/internal/account.ts +6 -9
  275. package/src/internal/digitalAsset.ts +1 -1
  276. package/src/internal/fungibleAsset.ts +3 -3
  277. package/src/internal/transaction.ts +48 -10
  278. package/src/types/index.ts +1 -0
  279. package/src/version.ts +1 -1
  280. package/dist/esm/chunk-3PMUIXFS.mjs.map +0 -1
  281. package/dist/esm/chunk-4AVC2RCH.mjs +0 -2
  282. package/dist/esm/chunk-4AVC2RCH.mjs.map +0 -1
  283. package/dist/esm/chunk-4NHWV5AI.mjs +0 -2
  284. package/dist/esm/chunk-527DYQ3X.mjs.map +0 -1
  285. package/dist/esm/chunk-AIPKOP3K.mjs.map +0 -1
  286. package/dist/esm/chunk-ARGODLTZ.mjs +0 -2
  287. package/dist/esm/chunk-ARGODLTZ.mjs.map +0 -1
  288. package/dist/esm/chunk-ASXXZH2D.mjs +0 -2
  289. package/dist/esm/chunk-ASXXZH2D.mjs.map +0 -1
  290. package/dist/esm/chunk-B7X6PSE7.mjs +0 -2
  291. package/dist/esm/chunk-BAYKVJBZ.mjs +0 -2
  292. package/dist/esm/chunk-CEHCDA3G.mjs +0 -2
  293. package/dist/esm/chunk-CQS6ZCJ7.mjs.map +0 -1
  294. package/dist/esm/chunk-CXR7MOBW.mjs +0 -2
  295. package/dist/esm/chunk-F7EMGK4M.mjs +0 -2
  296. package/dist/esm/chunk-FPD4JBPV.mjs.map +0 -1
  297. package/dist/esm/chunk-FVMJDRHO.mjs.map +0 -1
  298. package/dist/esm/chunk-FXHXOVL4.mjs.map +0 -1
  299. package/dist/esm/chunk-IZF6DFAL.mjs +0 -2
  300. package/dist/esm/chunk-LG7RJQ57.mjs +0 -2
  301. package/dist/esm/chunk-M4SQNMCW.mjs.map +0 -1
  302. package/dist/esm/chunk-N3U47Y6Y.mjs +0 -2
  303. package/dist/esm/chunk-NF5OUPPU.mjs.map +0 -1
  304. package/dist/esm/chunk-NJRNZEHX.mjs.map +0 -1
  305. package/dist/esm/chunk-PF57EOJY.mjs +0 -2
  306. package/dist/esm/chunk-SRDIYE3M.mjs +0 -2
  307. package/dist/esm/chunk-SUTBXHYU.mjs.map +0 -1
  308. package/dist/esm/chunk-SWZOGZJ6.mjs +0 -2
  309. package/dist/esm/chunk-SWZOGZJ6.mjs.map +0 -1
  310. package/dist/esm/chunk-SZKJ3TC5.mjs +0 -1
  311. package/dist/esm/chunk-SZKJ3TC5.mjs.map +0 -1
  312. package/dist/esm/chunk-T4C6BVXK.mjs.map +0 -1
  313. package/dist/esm/chunk-UGPALAPN.mjs +0 -2
  314. package/dist/esm/chunk-UQCSBLD5.mjs +0 -2
  315. package/dist/esm/chunk-VBDMQERT.mjs +0 -2
  316. package/dist/esm/chunk-VHANL47W.mjs +0 -2
  317. package/dist/esm/chunk-VHANL47W.mjs.map +0 -1
  318. package/dist/esm/chunk-VLNBGWGX.mjs.map +0 -1
  319. package/dist/esm/chunk-XX5J7KKC.mjs +0 -2
  320. package/dist/esm/chunk-YG6YYQRG.mjs.map +0 -1
  321. package/dist/esm/chunk-YIGDWPGM.mjs +0 -2
  322. package/dist/esm/chunk-YIGDWPGM.mjs.map +0 -1
  323. /package/dist/esm/{chunk-VBDMQERT.mjs.map → chunk-3CLYWZYZ.mjs.map} +0 -0
  324. /package/dist/esm/{chunk-A7XZTJ3D.mjs.map → chunk-3F6EYD5O.mjs.map} +0 -0
  325. /package/dist/esm/{chunk-36QXVFR5.mjs.map → chunk-52C73T26.mjs.map} +0 -0
  326. /package/dist/esm/{chunk-GJDGR3KQ.mjs.map → chunk-54BANKLA.mjs.map} +0 -0
  327. /package/dist/esm/{chunk-3RQ5V3F3.mjs.map → chunk-63AIRYJX.mjs.map} +0 -0
  328. /package/dist/esm/{chunk-HJYT6LDB.mjs.map → chunk-647IOEXV.mjs.map} +0 -0
  329. /package/dist/esm/{chunk-GHYE26Q5.mjs.map → chunk-6FBKUTGF.mjs.map} +0 -0
  330. /package/dist/esm/{chunk-5ID6W7XL.mjs.map → chunk-A7MSW6OL.mjs.map} +0 -0
  331. /package/dist/esm/{chunk-BCUSI3N6.mjs.map → chunk-AOCNYMMX.mjs.map} +0 -0
  332. /package/dist/esm/{chunk-RIUFW2OG.mjs.map → chunk-AP7UZTPZ.mjs.map} +0 -0
  333. /package/dist/esm/{chunk-EV75CYGN.mjs.map → chunk-BSEQPVD6.mjs.map} +0 -0
  334. /package/dist/esm/{chunk-PF57EOJY.mjs.map → chunk-BWFJHFBQ.mjs.map} +0 -0
  335. /package/dist/esm/{chunk-U3YYSIIT.mjs.map → chunk-DMKUAQB7.mjs.map} +0 -0
  336. /package/dist/esm/{chunk-B7X6PSE7.mjs.map → chunk-DSTKXJMA.mjs.map} +0 -0
  337. /package/dist/esm/{chunk-LG7RJQ57.mjs.map → chunk-FBPNHF54.mjs.map} +0 -0
  338. /package/dist/esm/{chunk-G56GPLTB.mjs.map → chunk-FS3NSGBF.mjs.map} +0 -0
  339. /package/dist/esm/{chunk-UEKKYJGA.mjs.map → chunk-G2QII3AT.mjs.map} +0 -0
  340. /package/dist/esm/{chunk-DUP7XY5P.mjs.map → chunk-GXVUN32G.mjs.map} +0 -0
  341. /package/dist/esm/{chunk-VNIABDOT.mjs.map → chunk-H4UVHJ3M.mjs.map} +0 -0
  342. /package/dist/esm/{chunk-KXFMI7RM.mjs.map → chunk-HB6T27S2.mjs.map} +0 -0
  343. /package/dist/esm/{chunk-5NWTYUKC.mjs.map → chunk-HXN2WRUX.mjs.map} +0 -0
  344. /package/dist/esm/{chunk-DGLW7OBS.mjs.map → chunk-KL6VJ3UK.mjs.map} +0 -0
  345. /package/dist/esm/{chunk-QRVYLV76.mjs.map → chunk-KOAUBVO6.mjs.map} +0 -0
  346. /package/dist/esm/{chunk-25UTAIJG.mjs.map → chunk-KUOIRTNL.mjs.map} +0 -0
  347. /package/dist/esm/{chunk-IZF6DFAL.mjs.map → chunk-KVIVMWN5.mjs.map} +0 -0
  348. /package/dist/esm/{chunk-UQCSBLD5.mjs.map → chunk-L4Q2XTHT.mjs.map} +0 -0
  349. /package/dist/esm/{chunk-5EN52MUT.mjs.map → chunk-NPFNYP75.mjs.map} +0 -0
  350. /package/dist/esm/{chunk-6O5ZR5ME.mjs.map → chunk-ONDQ4MK7.mjs.map} +0 -0
  351. /package/dist/esm/{chunk-EJBUUMWV.mjs.map → chunk-QK4P26SH.mjs.map} +0 -0
  352. /package/dist/esm/{chunk-FC5MU6ZN.mjs.map → chunk-QVKMFPAV.mjs.map} +0 -0
  353. /package/dist/esm/{chunk-O3YFCZJ5.mjs.map → chunk-QW3VNZJ7.mjs.map} +0 -0
  354. /package/dist/esm/{chunk-UGPALAPN.mjs.map → chunk-R5QUBEH6.mjs.map} +0 -0
  355. /package/dist/esm/{chunk-35EWRSDK.mjs.map → chunk-RHBCVCOS.mjs.map} +0 -0
  356. /package/dist/esm/{chunk-XDXI3TRT.mjs.map → chunk-TBFLWWV4.mjs.map} +0 -0
  357. /package/dist/esm/{chunk-CEHCDA3G.mjs.map → chunk-TBMAJ6AW.mjs.map} +0 -0
  358. /package/dist/esm/{chunk-BAYKVJBZ.mjs.map → chunk-TGLSJGFO.mjs.map} +0 -0
  359. /package/dist/esm/{chunk-F7EMGK4M.mjs.map → chunk-TJDC5PWD.mjs.map} +0 -0
  360. /package/dist/esm/{chunk-MJPUASSD.mjs.map → chunk-U43IJHQN.mjs.map} +0 -0
  361. /package/dist/esm/{chunk-KAGLWBIJ.mjs.map → chunk-UML2VQZT.mjs.map} +0 -0
  362. /package/dist/esm/{chunk-KQB7A4OX.mjs.map → chunk-V4YBGBCN.mjs.map} +0 -0
  363. /package/dist/esm/{chunk-B4DWWHNL.mjs.map → chunk-V6SPPOWX.mjs.map} +0 -0
  364. /package/dist/esm/{chunk-CP4QCRBZ.mjs.map → chunk-VBTJVPAM.mjs.map} +0 -0
  365. /package/dist/esm/{chunk-4NHWV5AI.mjs.map → chunk-WFZDFFBM.mjs.map} +0 -0
  366. /package/dist/esm/{chunk-5ZQJLHJA.mjs.map → chunk-XYLYHSEI.mjs.map} +0 -0
  367. /package/dist/esm/{chunk-FNLRLSGJ.mjs.map → chunk-Y5M5DD64.mjs.map} +0 -0
  368. /package/dist/esm/{chunk-CAGDOGXS.mjs.map → chunk-YWQLLV2R.mjs.map} +0 -0
  369. /package/dist/esm/{chunk-XX5J7KKC.mjs.map → chunk-ZEXZ4CX5.mjs.map} +0 -0
  370. /package/dist/esm/{chunk-3MFILHZT.mjs.map → chunk-ZKNM27TR.mjs.map} +0 -0
  371. /package/dist/esm/{chunk-QJAI7DNA.mjs.map → chunk-ZPNCA4C7.mjs.map} +0 -0
  372. /package/dist/esm/{chunk-N3U47Y6Y.mjs.map → chunk-ZYYK3UXP.mjs.map} +0 -0
  373. /package/dist/esm/{publicKey-B3XRNhHO.d.mts → publicKey-lq5djCIY.d.mts} +0 -0
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-FC5MU6ZN.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-DGLW7OBS.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-GJDGR3KQ.mjs";import"../../chunk-CP4QCRBZ.mjs";import"../../chunk-QRVYLV76.mjs";import"../../chunk-MJPUASSD.mjs";import"../../chunk-25UTAIJG.mjs";import"../../chunk-ICXA3DZH.mjs";import"../../chunk-B4DWWHNL.mjs";import"../../chunk-VBDMQERT.mjs";import"../../chunk-6O5ZR5ME.mjs";import"../../chunk-UQCSBLD5.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BAYKVJBZ.mjs";import"../../chunk-U3YYSIIT.mjs";import"../../chunk-35EWRSDK.mjs";import"../../chunk-PF57EOJY.mjs";import"../../chunk-B7X6PSE7.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-IZF6DFAL.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-VHANL47W.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-KAGLWBIJ.mjs";import"../../chunk-UEKKYJGA.mjs";import"../../chunk-QJAI7DNA.mjs";import"../../chunk-RIUFW2OG.mjs";import"../../chunk-XX5J7KKC.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-XDXI3TRT.mjs";import"../../chunk-EV75CYGN.mjs";import"../../chunk-JOLLCFQL.mjs";import"../../chunk-ARGODLTZ.mjs";import"../../chunk-ASXXZH2D.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-4AVC2RCH.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-FNLRLSGJ.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-DUP7XY5P.mjs";import"../../chunk-CAGDOGXS.mjs";import"../../chunk-SWZOGZJ6.mjs";import"../../chunk-CYDWEPFL.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-CXR7MOBW.mjs";import"../../chunk-C67BKZND.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
1
+ import{a}from"../../chunk-QVKMFPAV.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-KL6VJ3UK.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-54BANKLA.mjs";import"../../chunk-VBTJVPAM.mjs";import"../../chunk-U43IJHQN.mjs";import"../../chunk-KOAUBVO6.mjs";import"../../chunk-ICXA3DZH.mjs";import"../../chunk-V6SPPOWX.mjs";import"../../chunk-3CLYWZYZ.mjs";import"../../chunk-ONDQ4MK7.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-KUOIRTNL.mjs";import"../../chunk-L4Q2XTHT.mjs";import"../../chunk-TGLSJGFO.mjs";import"../../chunk-DMKUAQB7.mjs";import"../../chunk-BWFJHFBQ.mjs";import"../../chunk-RHBCVCOS.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-KVIVMWN5.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-7CAEMK4R.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-MIEV7J74.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-Y5M5DD64.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-GXVUN32G.mjs";import"../../chunk-YWQLLV2R.mjs";import"../../chunk-TLKV4NHK.mjs";import"../../chunk-CYDWEPFL.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-C67BKZND.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-G2QII3AT.mjs";import"../../chunk-ZPNCA4C7.mjs";import"../../chunk-AP7UZTPZ.mjs";import"../../chunk-ZEXZ4CX5.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-TBFLWWV4.mjs";import"../../chunk-BSEQPVD6.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-RAYJRFIG.mjs";import"../../chunk-OKCU4GHN.mjs";import"../../chunk-Y2VA7F5D.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-WEZXFWPR.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
2
2
  //# sourceMappingURL=simulate.mjs.map
@@ -11,7 +11,7 @@ import '../../bcs/serializer.mjs';
11
11
  import '../../core/hex.mjs';
12
12
  import '../../core/common.mjs';
13
13
  import '../../core/crypto/ed25519.mjs';
14
- import '../../publicKey-B3XRNhHO.mjs';
14
+ import '../../publicKey-lq5djCIY.mjs';
15
15
  import '../../core/accountAddress.mjs';
16
16
  import '../../transactions/instances/transactionArgument.mjs';
17
17
  import '../../core/crypto/signature.mjs';
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-HJYT6LDB.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-DGLW7OBS.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-GJDGR3KQ.mjs";import"../../chunk-CP4QCRBZ.mjs";import"../../chunk-QRVYLV76.mjs";import"../../chunk-MJPUASSD.mjs";import"../../chunk-25UTAIJG.mjs";import"../../chunk-ICXA3DZH.mjs";import"../../chunk-B4DWWHNL.mjs";import"../../chunk-VBDMQERT.mjs";import"../../chunk-6O5ZR5ME.mjs";import"../../chunk-UQCSBLD5.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-BAYKVJBZ.mjs";import"../../chunk-U3YYSIIT.mjs";import"../../chunk-35EWRSDK.mjs";import"../../chunk-PF57EOJY.mjs";import"../../chunk-B7X6PSE7.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-IZF6DFAL.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-VHANL47W.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-KAGLWBIJ.mjs";import"../../chunk-UEKKYJGA.mjs";import"../../chunk-QJAI7DNA.mjs";import"../../chunk-RIUFW2OG.mjs";import"../../chunk-XX5J7KKC.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-XDXI3TRT.mjs";import"../../chunk-EV75CYGN.mjs";import"../../chunk-JOLLCFQL.mjs";import"../../chunk-ARGODLTZ.mjs";import"../../chunk-ASXXZH2D.mjs";import"../../chunk-4NHWV5AI.mjs";import"../../chunk-UGPALAPN.mjs";import"../../chunk-F7EMGK4M.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-5EN52MUT.mjs";import"../../chunk-QRS4DGP3.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-4AVC2RCH.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-FNLRLSGJ.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-DUP7XY5P.mjs";import"../../chunk-CAGDOGXS.mjs";import"../../chunk-SWZOGZJ6.mjs";import"../../chunk-CYDWEPFL.mjs";import"../../chunk-GHYE26Q5.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-CXR7MOBW.mjs";import"../../chunk-C67BKZND.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
1
+ import{a}from"../../chunk-647IOEXV.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-KL6VJ3UK.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-54BANKLA.mjs";import"../../chunk-VBTJVPAM.mjs";import"../../chunk-U43IJHQN.mjs";import"../../chunk-KOAUBVO6.mjs";import"../../chunk-ICXA3DZH.mjs";import"../../chunk-V6SPPOWX.mjs";import"../../chunk-3CLYWZYZ.mjs";import"../../chunk-ONDQ4MK7.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-KUOIRTNL.mjs";import"../../chunk-L4Q2XTHT.mjs";import"../../chunk-TGLSJGFO.mjs";import"../../chunk-DMKUAQB7.mjs";import"../../chunk-BWFJHFBQ.mjs";import"../../chunk-RHBCVCOS.mjs";import"../../chunk-DSTKXJMA.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-KVIVMWN5.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-7CAEMK4R.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-MIEV7J74.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-Y5M5DD64.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-GXVUN32G.mjs";import"../../chunk-YWQLLV2R.mjs";import"../../chunk-TLKV4NHK.mjs";import"../../chunk-CYDWEPFL.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-C67BKZND.mjs";import"../../chunk-CYNQRMO5.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-MLWIHWNH.mjs";import"../../chunk-4QMXOWHP.mjs";import"../../chunk-UML2VQZT.mjs";import"../../chunk-G2QII3AT.mjs";import"../../chunk-ZPNCA4C7.mjs";import"../../chunk-AP7UZTPZ.mjs";import"../../chunk-ZEXZ4CX5.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-TBFLWWV4.mjs";import"../../chunk-BSEQPVD6.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-RAYJRFIG.mjs";import"../../chunk-OKCU4GHN.mjs";import"../../chunk-Y2VA7F5D.mjs";import"../../chunk-TJDC5PWD.mjs";import"../../chunk-WFZDFFBM.mjs";import"../../chunk-R5QUBEH6.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-WEZXFWPR.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-FS3NSGBF.mjs";import"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-NPFNYP75.mjs";import"../../chunk-IOSQVDZI.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
2
2
  //# sourceMappingURL=submit.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-O3YFCZJ5.mjs";import"../chunk-4AVC2RCH.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-FNLRLSGJ.mjs";import"../chunk-S4SEFF4K.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-DUP7XY5P.mjs";import"../chunk-CAGDOGXS.mjs";import"../chunk-SWZOGZJ6.mjs";import"../chunk-CYDWEPFL.mjs";import"../chunk-GHYE26Q5.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-NJRNZEHX.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-CXR7MOBW.mjs";import"../chunk-C67BKZND.mjs";import"../chunk-CYNQRMO5.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
1
+ import{a}from"../chunk-QW3VNZJ7.mjs";import"../chunk-7CAEMK4R.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-Y5M5DD64.mjs";import"../chunk-S4SEFF4K.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-GXVUN32G.mjs";import"../chunk-YWQLLV2R.mjs";import"../chunk-TLKV4NHK.mjs";import"../chunk-CYDWEPFL.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-C67BKZND.mjs";import"../chunk-CYNQRMO5.mjs";import"../chunk-WEZXFWPR.mjs";import"../chunk-OWW6SIDP.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
2
2
  //# sourceMappingURL=utils.mjs.map
@@ -1,2 +1,2 @@
1
- import"../chunk-FZY4PMEE.mjs";import{a as h}from"../chunk-N3U47Y6Y.mjs";import{a as g}from"../chunk-CEHCDA3G.mjs";import{a as p,b as q,c as r}from"../chunk-G56GPLTB.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-SRDIYE3M.mjs";import{a as f}from"../chunk-6IFMQ5AS.mjs";import{a,b,c,d,e}from"../chunk-36QXVFR5.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-NJRNZEHX.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{i as Bool,f as Deserializer,h as EntryFunctionBytes,g as FixedBytes,r as MoveOption,q as MoveString,p as MoveVector,a as Serializable,b as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,c as ensureBoolean,d as outOfRangeErrorMessage,e as validateNumberInRange};
1
+ import"../chunk-FZY4PMEE.mjs";import{a as p,b as q,c as r}from"../chunk-FS3NSGBF.mjs";import{a as h}from"../chunk-ZYYK3UXP.mjs";import{a as g}from"../chunk-TBMAJ6AW.mjs";import{a as i,b as j,c as k,d as l,e as m,f as n,g as o}from"../chunk-QIAHBEEW.mjs";import{a as f}from"../chunk-6IFMQ5AS.mjs";import"../chunk-OWW6SIDP.mjs";import"../chunk-4WPQQPUF.mjs";import{a,b,c,d,e}from"../chunk-52C73T26.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{i as Bool,f as Deserializer,h as EntryFunctionBytes,g as FixedBytes,r as MoveOption,q as MoveString,p as MoveVector,a as Serializable,b as Serializer,n as U128,k as U16,o as U256,l as U32,m as U64,j as U8,c as ensureBoolean,d as outOfRangeErrorMessage,e as validateNumberInRange};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-N3U47Y6Y.mjs";import"../../chunk-CEHCDA3G.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as EntryFunctionBytes};
1
+ import{a}from"../../chunk-ZYYK3UXP.mjs";import"../../chunk-TBMAJ6AW.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as EntryFunctionBytes};
2
2
  //# sourceMappingURL=entryFunctionBytes.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-CEHCDA3G.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as FixedBytes};
1
+ import{a}from"../../chunk-TBMAJ6AW.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as FixedBytes};
2
2
  //# sourceMappingURL=fixedBytes.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e,f,g}from"../../chunk-SRDIYE3M.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Bool,f as U128,c as U16,g as U256,d as U32,e as U64,b as U8};
1
+ import{a,b,c,d,e,f,g}from"../../chunk-QIAHBEEW.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Bool,f as U128,c as U16,g as U256,d as U32,e as U64,b as U8};
2
2
  //# sourceMappingURL=movePrimitives.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c}from"../../chunk-G56GPLTB.mjs";import"../../chunk-SRDIYE3M.mjs";import"../../chunk-36QXVFR5.mjs";import"../../chunk-BCUSI3N6.mjs";import"../../chunk-LG7RJQ57.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-NJRNZEHX.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-FVA2OPG4.mjs";export{c as MoveOption,b as MoveString,a as MoveVector};
1
+ import{a,b,c}from"../../chunk-FS3NSGBF.mjs";import"../../chunk-QIAHBEEW.mjs";import"../../chunk-OWW6SIDP.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-52C73T26.mjs";import"../../chunk-AOCNYMMX.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-FVA2OPG4.mjs";export{c as MoveOption,b as MoveString,a as MoveVector};
2
2
  //# sourceMappingURL=moveStructs.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b,c,d,e}from"../chunk-36QXVFR5.mjs";import"../chunk-BCUSI3N6.mjs";import"../chunk-LG7RJQ57.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as Serializable,b as Serializer,c as ensureBoolean,d as outOfRangeErrorMessage,e as validateNumberInRange};
1
+ import{a,b,c,d,e}from"../chunk-52C73T26.mjs";import"../chunk-AOCNYMMX.mjs";import"../chunk-FBPNHF54.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-FVA2OPG4.mjs";export{a as Serializable,b as Serializer,c as ensureBoolean,d as outOfRangeErrorMessage,e as validateNumberInRange};
2
2
  //# sourceMappingURL=serializer.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o,b as r,c as t,d as s}from"./chunk-KQB7A4OX.mjs";import{a as n}from"./chunk-O3YFCZJ5.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-T4C6BVXK.mjs.map
1
+ import{a as n}from"./chunk-QW3VNZJ7.mjs";import{a as o,b as r,c as t,d as s}from"./chunk-V4YBGBCN.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-2M6OT6DU.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/api/event.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n getAccountEventsByCreationNumber,\n getAccountEventsByEventType,\n getModuleEventsByEventType,\n getEvents,\n} from \"../internal/event\";\nimport { AnyNumber, GetEventsResponse, MoveStructId, OrderByArg, PaginationArgs, WhereArg } from \"../types\";\nimport { EventsBoolExp } from \"../types/generated/types\";\nimport { AccountAddressInput } from \"../core\";\nimport { ProcessorType } from \"../utils/const\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\n\n/**\n * A class to query all `Event` Aptos related queries\n */\nexport class Event {\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Get module events by event type\n *\n * @example\n * const events = await aptos.getModuleEventsByEventType({eventType:\"0x1::transaction_fee::FeeStatement\"})\n *\n * @param args.eventType - The event type\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n *\n * @returns Promise<GetEventsResponse>\n */\n async getModuleEventsByEventType(args: {\n eventType: MoveStructId;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & OrderByArg<GetEventsResponse[0]>;\n }): Promise<GetEventsResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.EVENTS_PROCESSOR,\n });\n return getModuleEventsByEventType({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Get events by creation number and an account address\n *\n * @example\n * const events = await aptos.getAccountEventsByCreationNumber({accountAddress:\"0x123\",creationNumber: 0})\n *\n * @param args.accountAddress - The account address\n * @param args.creationNumber - The event creation number\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n *\n * @returns Promise<GetEventsResponse>\n */\n async getAccountEventsByCreationNumber(args: {\n accountAddress: AccountAddressInput;\n creationNumber: AnyNumber;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<GetEventsResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.EVENTS_PROCESSOR,\n });\n return getAccountEventsByCreationNumber({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Get events by event type and an account address\n *\n * @example\n * const events = await aptos.getAccountEventsByEventType({accountAddress:\"0x123\",eventType: \"0x1::transaction_fee::FeeStatement\"})\n *\n * @param args.accountAddress - The account address\n * @param args.eventType - The event type\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n *\n * @returns Promise<GetEventsResponse>\n */\n async getAccountEventsByEventType(args: {\n accountAddress: AccountAddressInput;\n eventType: MoveStructId;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & OrderByArg<GetEventsResponse[0]>;\n }): Promise<GetEventsResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.EVENTS_PROCESSOR,\n });\n return getAccountEventsByEventType({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Get all events\n *\n * An optional `where` can be passed in to filter out the response.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @example\n * const events = await aptos.getEvents()\n * // with filtering\n * const events = await aptos.getEvents({options: { where: { account_address: { _eq: \"0x123\" } } }});\n *\n * @returns GetEventsQuery response type\n */\n async getEvents(args?: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & OrderByArg<GetEventsResponse[0]> & WhereArg<EventsBoolExp>;\n }): Promise<GetEventsResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.EVENTS_PROCESSOR,\n });\n return getEvents({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"uGAmBO,IAAMA,EAAN,KAAY,CACjB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAa3C,MAAM,2BAA2BC,EAIF,CAC7B,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,EAAK,qBAC3B,gCACF,CAAC,EACME,EAA2B,CAAE,YAAa,KAAK,OAAQ,GAAGF,CAAK,CAAC,CACzE,CAcA,MAAM,iCAAiCA,EAIR,CAC7B,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,EAAK,qBAC3B,gCACF,CAAC,EACMG,EAAiC,CAAE,YAAa,KAAK,OAAQ,GAAGH,CAAK,CAAC,CAC/E,CAcA,MAAM,4BAA4BA,EAKH,CAC7B,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,EAAK,qBAC3B,gCACF,CAAC,EACMI,EAA4B,CAAE,YAAa,KAAK,OAAQ,GAAGJ,CAAK,CAAC,CAC1E,CAcA,MAAM,UAAUA,EAGe,CAC7B,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,GAAM,qBAC5B,gCACF,CAAC,EACMK,EAAU,CAAE,YAAa,KAAK,OAAQ,GAAGL,CAAK,CAAC,CACxD,CACF","names":["Event","config","args","waitForIndexerOnVersion","getModuleEventsByEventType","getAccountEventsByCreationNumber","getAccountEventsByEventType","getEvents"]}
@@ -0,0 +1,2 @@
1
+ import{a as e}from"./chunk-L4Q2XTHT.mjs";import{a as i}from"./chunk-KVIVMWN5.mjs";import{a as r}from"./chunk-52C73T26.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=e.deserialize(t),s=i.deserialize(t);return new o(a,s)}};export{n as a};
2
+ //# sourceMappingURL=chunk-3CLYWZYZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-VHANL47W.mjs";import{a as e}from"./chunk-3JPVQHOR.mjs";var n=()=>Math.floor(Date.now()/1e3),r=class{constructor(t,i,o,a,c){this.lastUncommintedNumber=null;this.currentNumber=null;this.lock=!1;this.aptosConfig=t,this.account=i,this.maxWaitTime=o,this.maximumInFlight=a,this.sleepTime=c}async nextSequenceNumber(){for(;this.lock;)await e(this.sleepTime);this.lock=!0;let t=BigInt(0);try{if((this.lastUncommintedNumber===null||this.currentNumber===null)&&await this.initialize(),this.currentNumber-this.lastUncommintedNumber>=this.maximumInFlight){await this.update();let i=n();for(;this.currentNumber-this.lastUncommintedNumber>=this.maximumInFlight;)await e(this.sleepTime),n()-i>this.maxWaitTime?(console.warn(`Waited over 30 seconds for a transaction to commit, resyncing ${this.account.accountAddress.toString()}`),await this.initialize()):await this.update()}t=this.currentNumber,this.currentNumber+=BigInt(1)}catch(i){console.error("error in getting next sequence number for this account",i)}finally{this.lock=!1}return t}async initialize(){let{sequence_number:t}=await s({aptosConfig:this.aptosConfig,accountAddress:this.account.accountAddress});this.currentNumber=BigInt(t),this.lastUncommintedNumber=BigInt(t)}async update(){let{sequence_number:t}=await s({aptosConfig:this.aptosConfig,accountAddress:this.account.accountAddress});return this.lastUncommintedNumber=BigInt(t),this.lastUncommintedNumber}async synchronize(){if(this.lastUncommintedNumber!==this.currentNumber){for(;this.lock;)await e(this.sleepTime);this.lock=!0;try{await this.update();let t=n();for(;this.lastUncommintedNumber!==this.currentNumber;)n()-t>this.maxWaitTime?(console.warn(`Waited over 30 seconds for a transaction to commit, resyncing ${this.account.accountAddress.toString()}`),await this.initialize()):(await e(this.sleepTime),await this.update())}catch(t){console.error("error in synchronizing this account sequence number with the one on chain",t)}finally{this.lock=!1}}}};export{r as a};
2
- //# sourceMappingURL=chunk-A7XZTJ3D.mjs.map
1
+ import{a as e}from"./chunk-3JPVQHOR.mjs";import{a as s}from"./chunk-MIEV7J74.mjs";var n=()=>Math.floor(Date.now()/1e3),r=class{constructor(t,i,o,a,c){this.lastUncommintedNumber=null;this.currentNumber=null;this.lock=!1;this.aptosConfig=t,this.account=i,this.maxWaitTime=o,this.maximumInFlight=a,this.sleepTime=c}async nextSequenceNumber(){for(;this.lock;)await e(this.sleepTime);this.lock=!0;let t=BigInt(0);try{if((this.lastUncommintedNumber===null||this.currentNumber===null)&&await this.initialize(),this.currentNumber-this.lastUncommintedNumber>=this.maximumInFlight){await this.update();let i=n();for(;this.currentNumber-this.lastUncommintedNumber>=this.maximumInFlight;)await e(this.sleepTime),n()-i>this.maxWaitTime?(console.warn(`Waited over 30 seconds for a transaction to commit, resyncing ${this.account.accountAddress.toString()}`),await this.initialize()):await this.update()}t=this.currentNumber,this.currentNumber+=BigInt(1)}catch(i){console.error("error in getting next sequence number for this account",i)}finally{this.lock=!1}return t}async initialize(){let{sequence_number:t}=await s({aptosConfig:this.aptosConfig,accountAddress:this.account.accountAddress});this.currentNumber=BigInt(t),this.lastUncommintedNumber=BigInt(t)}async update(){let{sequence_number:t}=await s({aptosConfig:this.aptosConfig,accountAddress:this.account.accountAddress});return this.lastUncommintedNumber=BigInt(t),this.lastUncommintedNumber}async synchronize(){if(this.lastUncommintedNumber!==this.currentNumber){for(;this.lock;)await e(this.sleepTime);this.lock=!0;try{await this.update();let t=n();for(;this.lastUncommintedNumber!==this.currentNumber;)n()-t>this.maxWaitTime?(console.warn(`Waited over 30 seconds for a transaction to commit, resyncing ${this.account.accountAddress.toString()}`),await this.initialize()):(await e(this.sleepTime),await this.update())}catch(t){console.error("error in synchronizing this account sequence number with the one on chain",t)}finally{this.lock=!1}}}};export{r as a};
2
+ //# sourceMappingURL=chunk-3F6EYD5O.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-BCUSI3N6.mjs";import{a as U,b,c as f,d as u,e as h,f as y}from"./chunk-56CNRT2K.mjs";import{a as s}from"./chunk-FVA2OPG4.mjs";var B=class{bcsToBytes(){let e=new n;return this.serialize(e),e.toUint8Array()}bcsToHex(){let e=this.bcsToBytes();return c.fromHexInput(e)}},n=class{constructor(e=64){if(e<=0)throw new Error("Length needs to be greater than 0");this.buffer=new ArrayBuffer(e),this.offset=0}ensureBufferWillHandleSize(e){for(;this.buffer.byteLength<this.offset+e;){let t=new ArrayBuffer(this.buffer.byteLength*2);new Uint8Array(t).set(new Uint8Array(this.buffer)),this.buffer=t}}appendToBuffer(e){this.ensureBufferWillHandleSize(e.length),new Uint8Array(this.buffer,this.offset).set(e),this.offset+=e.length}serializeWithFunction(e,t,i){this.ensureBufferWillHandleSize(t);let a=new DataView(this.buffer,this.offset);e.apply(a,[0,i,!0]),this.offset+=t}serializeStr(e){let t=new TextEncoder;this.serializeBytes(t.encode(e))}serializeBytes(e){this.serializeU32AsUleb128(e.length),this.appendToBuffer(e)}serializeFixedBytes(e){this.appendToBuffer(e)}serializeBool(e){A(e);let t=e?1:0;this.appendToBuffer(new Uint8Array([t]))}serializeU8(e){this.appendToBuffer(new Uint8Array([e]))}serializeU16(e){this.serializeWithFunction(DataView.prototype.setUint16,2,e)}serializeU32(e){this.serializeWithFunction(DataView.prototype.setUint32,4,e)}serializeU64(e){let t=BigInt(e)&BigInt(f),i=BigInt(e)>>BigInt(32);this.serializeU32(Number(t)),this.serializeU32(Number(i))}serializeU128(e){let t=BigInt(e)&u,i=BigInt(e)>>BigInt(64);this.serializeU64(t),this.serializeU64(i)}serializeU256(e){let t=BigInt(e)&h,i=BigInt(e)>>BigInt(128);this.serializeU128(t),this.serializeU128(i)}serializeU32AsUleb128(e){let t=e,i=[];for(;t>>>7;)i.push(t&127|128),t>>>=7;i.push(t),this.appendToBuffer(new Uint8Array(i))}toUint8Array(){return new Uint8Array(this.buffer).slice(0,this.offset)}serialize(e){e.serialize(this)}serializeVector(e){this.serializeU32AsUleb128(e.length),e.forEach(t=>{t.serialize(this)})}};s([o(0,U)],n.prototype,"serializeU8",1),s([o(0,b)],n.prototype,"serializeU16",1),s([o(0,f)],n.prototype,"serializeU32",1),s([o(BigInt(0),u)],n.prototype,"serializeU64",1),s([o(BigInt(0),h)],n.prototype,"serializeU128",1),s([o(BigInt(0),y)],n.prototype,"serializeU256",1),s([o(0,f)],n.prototype,"serializeU32AsUleb128",1);function A(r){if(typeof r!="boolean")throw new Error(`${r} is not a boolean value`)}var g=(r,e,t)=>`${r} is out of range: [${e}, ${t}]`;function w(r,e,t){let i=BigInt(r);if(i>BigInt(t)||i<BigInt(e))throw new Error(g(r,e,t))}function o(r,e){return(t,i,a)=>{let p=a.value;return a.value=function(l){return w(l,r,e),p.apply(this,[l])},a}}export{B as a,n as b,A as c,g as d,w as e};
2
- //# sourceMappingURL=chunk-36QXVFR5.mjs.map
1
+ import{b as c}from"./chunk-AOCNYMMX.mjs";import{a as U,b,c as f,d as u,e as h,f as y}from"./chunk-56CNRT2K.mjs";import{a as s}from"./chunk-FVA2OPG4.mjs";var B=class{bcsToBytes(){let e=new n;return this.serialize(e),e.toUint8Array()}bcsToHex(){let e=this.bcsToBytes();return c.fromHexInput(e)}},n=class{constructor(e=64){if(e<=0)throw new Error("Length needs to be greater than 0");this.buffer=new ArrayBuffer(e),this.offset=0}ensureBufferWillHandleSize(e){for(;this.buffer.byteLength<this.offset+e;){let t=new ArrayBuffer(this.buffer.byteLength*2);new Uint8Array(t).set(new Uint8Array(this.buffer)),this.buffer=t}}appendToBuffer(e){this.ensureBufferWillHandleSize(e.length),new Uint8Array(this.buffer,this.offset).set(e),this.offset+=e.length}serializeWithFunction(e,t,i){this.ensureBufferWillHandleSize(t);let a=new DataView(this.buffer,this.offset);e.apply(a,[0,i,!0]),this.offset+=t}serializeStr(e){let t=new TextEncoder;this.serializeBytes(t.encode(e))}serializeBytes(e){this.serializeU32AsUleb128(e.length),this.appendToBuffer(e)}serializeFixedBytes(e){this.appendToBuffer(e)}serializeBool(e){A(e);let t=e?1:0;this.appendToBuffer(new Uint8Array([t]))}serializeU8(e){this.appendToBuffer(new Uint8Array([e]))}serializeU16(e){this.serializeWithFunction(DataView.prototype.setUint16,2,e)}serializeU32(e){this.serializeWithFunction(DataView.prototype.setUint32,4,e)}serializeU64(e){let t=BigInt(e)&BigInt(f),i=BigInt(e)>>BigInt(32);this.serializeU32(Number(t)),this.serializeU32(Number(i))}serializeU128(e){let t=BigInt(e)&u,i=BigInt(e)>>BigInt(64);this.serializeU64(t),this.serializeU64(i)}serializeU256(e){let t=BigInt(e)&h,i=BigInt(e)>>BigInt(128);this.serializeU128(t),this.serializeU128(i)}serializeU32AsUleb128(e){let t=e,i=[];for(;t>>>7;)i.push(t&127|128),t>>>=7;i.push(t),this.appendToBuffer(new Uint8Array(i))}toUint8Array(){return new Uint8Array(this.buffer).slice(0,this.offset)}serialize(e){e.serialize(this)}serializeVector(e){this.serializeU32AsUleb128(e.length),e.forEach(t=>{t.serialize(this)})}};s([o(0,U)],n.prototype,"serializeU8",1),s([o(0,b)],n.prototype,"serializeU16",1),s([o(0,f)],n.prototype,"serializeU32",1),s([o(BigInt(0),u)],n.prototype,"serializeU64",1),s([o(BigInt(0),h)],n.prototype,"serializeU128",1),s([o(BigInt(0),y)],n.prototype,"serializeU256",1),s([o(0,f)],n.prototype,"serializeU32AsUleb128",1);function A(r){if(typeof r!="boolean")throw new Error(`${r} is not a boolean value`)}var g=(r,e,t)=>`${r} is out of range: [${e}, ${t}]`;function w(r,e,t){let i=BigInt(r);if(i>BigInt(t)||i<BigInt(e))throw new Error(g(r,e,t))}function o(r,e){return(t,i,a)=>{let p=a.value;return a.value=function(l){return w(l,r,e),p.apply(this,[l])},a}}export{B as a,n as b,A as c,g as d,w as e};
2
+ //# sourceMappingURL=chunk-52C73T26.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as $,c as tn,d as en,e as M}from"./chunk-CP4QCRBZ.mjs";import{q as nn,t as T}from"./chunk-QRVYLV76.mjs";import{a as rn}from"./chunk-25UTAIJG.mjs";import{a as A}from"./chunk-VBDMQERT.mjs";import{a as Y}from"./chunk-6O5ZR5ME.mjs";import{a as l,c as f,d as g}from"./chunk-UQCSBLD5.mjs";import{c as X,d as z,e as Z,f as N,g as j,h as J,i as Q}from"./chunk-BAYKVJBZ.mjs";import{a as L}from"./chunk-PF57EOJY.mjs";import{b as R,d as F,e as _,f as D}from"./chunk-IZF6DFAL.mjs";import{a as K}from"./chunk-VHANL47W.mjs";import{b as h,d as p,e as q}from"./chunk-XX5J7KKC.mjs";import{a as v,b as E}from"./chunk-JOLLCFQL.mjs";import{a as G,c as k}from"./chunk-ARGODLTZ.mjs";import{a as x,c as B}from"./chunk-ASXXZH2D.mjs";import{b as u}from"./chunk-QRS4DGP3.mjs";import{b}from"./chunk-BCUSI3N6.mjs";import{b as H}from"./chunk-4AVC2RCH.mjs";import{a as V}from"./chunk-AH44UPM4.mjs";import{a as O}from"./chunk-FNLRLSGJ.mjs";import{e as P}from"./chunk-C67BKZND.mjs";import{b as W,c as U,f as C,g as S}from"./chunk-CYNQRMO5.mjs";import{sha3_256 as an}from"@noble/hashes/sha3";async function On(n){if(nn(n))return fn(n);let{moduleAddress:e,moduleName:t,functionName:o}=T(n.function),a=await cn({key:"entry-function",moduleAddress:e,moduleName:t,functionName:o,aptosConfig:n.aptosConfig,abi:n.abi,fetch:tn});return mn({abi:a,...n})}function mn(n){let e=n.abi,{moduleAddress:t,moduleName:o,functionName:a}=T(n.function),r=$(n.typeArguments);if(r.length!==e.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${e.typeParameters.length}, received ${r.length}`);let i=n.functionArguments.map((s,d)=>M(n.function,e,s,d,r));if(i.length!==e.parameters.length)throw new Error(`Too few arguments for '${t}::${o}::${a}', expected ${e.parameters.length} but got ${i.length}`);let c=N.build(`${t}::${o}`,a,r,i);if("multisigAddress"in n){let s=u.from(n.multisigAddress);return new Z(new J(s,new Q(c)))}return new z(c)}async function Vn(n){let{moduleAddress:e,moduleName:t,functionName:o}=T(n.function),a=await cn({key:"view-function",moduleAddress:e,moduleName:t,functionName:o,aptosConfig:n.aptosConfig,abi:n.abi,fetch:en});return yn({abi:a,...n})}function yn(n){let e=n.abi,{moduleAddress:t,moduleName:o,functionName:a}=T(n.function),r=$(n.typeArguments);if(r.length!==e.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${e.typeParameters.length}, received ${r.length}`);let i=n?.functionArguments?.map((c,s)=>M(n.function,e,c,s,r))??[];if(i.length!==e.parameters.length)throw new Error(`Too few arguments for '${t}::${o}::${a}', expected ${e.parameters.length} but got ${i.length}`);return N.build(`${t}::${o}`,a,r,i)}function fn(n){return new X(new j(b.fromHexInput(n.bytecode).toUint8Array(),n.typeArguments??[],n.functionArguments))}async function gn(n){let{aptosConfig:e,sender:t,payload:o,options:a,feePayerAddress:r}=n,i=P[e.network]?Promise.resolve({chain_id:P[e.network]}):O({aptosConfig:e}),c=a?.gasUnitPrice?Promise.resolve({gas_estimate:a.gasUnitPrice}):H({aptosConfig:e}),[{chain_id:s},{gas_estimate:d}]=await Promise.all([i,c]),m=a?.accountSequenceNumber!==void 0?Promise.resolve({sequence_number:a.accountSequenceNumber}):K({aptosConfig:e,accountAddress:t}),y;if(r&&u.from(r).equals(u.ZERO))try{let{sequence_number:w}=await m;y=w}catch{y="0"}else{let{sequence_number:w}=await m;y=w}let{maxGasAmount:un,gasUnitPrice:An,expireTimestamp:dn}={maxGasAmount:a?.maxGasAmount?BigInt(a.maxGasAmount):BigInt(2e5),gasUnitPrice:BigInt(d),expireTimestamp:BigInt(Math.floor(Date.now()/1e3)+20),...a};return new l(u.from(t),BigInt(y),o,BigInt(un),BigInt(An),BigInt(dn),new L(s))}async function Kn(n){let{aptosConfig:e,sender:t,payload:o,options:a,feePayerAddress:r}=n,i=await gn({aptosConfig:e,sender:t,payload:o,options:a,feePayerAddress:r});if("secondarySignerAddresses"in n){let c=n.secondarySignerAddresses?.map(s=>u.from(s))??[];return new rn(i,c,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}return new Y(i,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}function Hn(n){let{signerPublicKey:e,transaction:t,secondarySignersPublicKeys:o,feePayerPublicKey:a}=n,r=I(e);if(t.feePayerAddress){let c=new g(t.rawTransaction,t.secondarySignerAddresses??[],t.feePayerAddress),s=[];o&&(s=o.map(y=>I(y)));let d=I(a),m=new _(r,t.secondarySignerAddresses??[],s,{address:t.feePayerAddress,authenticator:d});return new A(c.raw_txn,m).bcsToBytes()}if(t.secondarySignerAddresses){let c=new f(t.rawTransaction,t.secondarySignerAddresses),s=[];s=o.map(m=>I(m));let d=new F(r,t.secondarySignerAddresses,s);return new A(c.raw_txn,d).bcsToBytes()}let i;if(r instanceof h)i=new R(r.public_key,r.signature);else if(r instanceof p)i=new D(r);else throw new Error("Invalid public key");return new A(t.rawTransaction,i).bcsToBytes()}function I(n){if(n instanceof v){if(n.publicKey instanceof x)return new p(n,new E(new B(new Uint8Array(64))));if(n.publicKey instanceof G)return new p(n,new E(new k(new Uint8Array(64))))}return new h(new x(n.toUint8Array()),new B(new Uint8Array(64)))}function Ln(n){let{signer:e,transaction:t}=n,o=wn(t);return e.signWithAuthenticator(o)}function pn(n){let{transaction:e,senderAuthenticator:t,feePayerAuthenticator:o,additionalSignersAuthenticators:a}=n,r=sn(e);if((o||a)&&(r instanceof f||r instanceof g))return Tn(r,t,o,a);if(t instanceof h&&r instanceof l){let i=new R(t.public_key,t.signature);return new A(r,i).bcsToBytes()}if((t instanceof p||t instanceof q)&&r instanceof l){let i=new D(t);return new A(r,i).bcsToBytes()}throw new Error(`Cannot generate a signed transaction, ${t} is not a supported account authentication scheme`)}function on(n){let e=an.create();for(let t of n)e.update(t);return e.digest()}var ln=on(["APTOS::Transaction"]);function Xn(n){let e=pn(n);return new b(on([ln,new Uint8Array([0]),e])).toString()}function sn(n){return n.feePayerAddress?new g(n.rawTransaction,n.secondarySignerAddresses??[],n.feePayerAddress):n.secondarySignerAddresses?new f(n.rawTransaction,n.secondarySignerAddresses):n.rawTransaction}function Tn(n,e,t,o){if(n instanceof g){if(!t)throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");let a=new _(e,n.secondary_signer_addresses,o??[],{address:n.fee_payer_address,authenticator:t});return new A(n.raw_txn,a).bcsToBytes()}if(n instanceof f){if(!o)throw new Error("Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction");let a=new F(e,n.secondary_signer_addresses,o??[]);return new A(n.raw_txn,a).bcsToBytes()}throw new Error(`Cannot prepare multi signers transaction to submission, ${typeof n} transaction is not supported`)}function wn(n){let e=sn(n),t=an.create();if(e instanceof l)t.update(C);else if(e instanceof f)t.update(S);else if(e instanceof g)t.update(S);else throw new Error(`Unknown transaction type to sign on: ${e}`);let o=t.digest(),a=e.bcsToBytes(),r=new Uint8Array(o.length+a.length);return r.set(o),r.set(a,o.length),r}async function cn({key:n,moduleAddress:e,moduleName:t,functionName:o,aptosConfig:a,abi:r,fetch:i}){return r||V(async()=>i(e,t,o,a),`${n}-${a.network}-${e}-${t}-${o}`,1e3*60*5)()}export{On as a,mn as b,Vn as c,yn as d,gn as e,Kn as f,Hn as g,I as h,Ln as i,pn as j,on as k,Xn as l,sn as m,Tn as n,wn as o};
2
- //# sourceMappingURL=chunk-GJDGR3KQ.mjs.map
1
+ import{a as $,c as tn,d as en,e as M}from"./chunk-VBTJVPAM.mjs";import{q as nn,t as T}from"./chunk-KOAUBVO6.mjs";import{a as A}from"./chunk-3CLYWZYZ.mjs";import{a as Y}from"./chunk-ONDQ4MK7.mjs";import{a as rn}from"./chunk-KUOIRTNL.mjs";import{a as l,c as f,d as g}from"./chunk-L4Q2XTHT.mjs";import{c as X,d as z,e as Z,f as N,g as j,h as J,i as Q}from"./chunk-TGLSJGFO.mjs";import{a as L}from"./chunk-BWFJHFBQ.mjs";import{b as R,d as F,e as _,f as D}from"./chunk-KVIVMWN5.mjs";import{b as H}from"./chunk-7CAEMK4R.mjs";import{a as K}from"./chunk-MIEV7J74.mjs";import{a as V}from"./chunk-AH44UPM4.mjs";import{a as O}from"./chunk-Y5M5DD64.mjs";import{e as P}from"./chunk-C67BKZND.mjs";import{b as W,c as U,f as C,g as S}from"./chunk-CYNQRMO5.mjs";import{b as h,d as p,e as q}from"./chunk-ZEXZ4CX5.mjs";import{a as v,b as E}from"./chunk-RAYJRFIG.mjs";import{a as G,c as k}from"./chunk-OKCU4GHN.mjs";import{a as x,c as B}from"./chunk-Y2VA7F5D.mjs";import{b as u}from"./chunk-IOSQVDZI.mjs";import{b}from"./chunk-AOCNYMMX.mjs";import{sha3_256 as an}from"@noble/hashes/sha3";async function On(n){if(nn(n))return fn(n);let{moduleAddress:e,moduleName:t,functionName:o}=T(n.function),a=await cn({key:"entry-function",moduleAddress:e,moduleName:t,functionName:o,aptosConfig:n.aptosConfig,abi:n.abi,fetch:tn});return mn({abi:a,...n})}function mn(n){let e=n.abi,{moduleAddress:t,moduleName:o,functionName:a}=T(n.function),r=$(n.typeArguments);if(r.length!==e.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${e.typeParameters.length}, received ${r.length}`);let i=n.functionArguments.map((s,d)=>M(n.function,e,s,d,r));if(i.length!==e.parameters.length)throw new Error(`Too few arguments for '${t}::${o}::${a}', expected ${e.parameters.length} but got ${i.length}`);let c=N.build(`${t}::${o}`,a,r,i);if("multisigAddress"in n){let s=u.from(n.multisigAddress);return new Z(new J(s,new Q(c)))}return new z(c)}async function Vn(n){let{moduleAddress:e,moduleName:t,functionName:o}=T(n.function),a=await cn({key:"view-function",moduleAddress:e,moduleName:t,functionName:o,aptosConfig:n.aptosConfig,abi:n.abi,fetch:en});return yn({abi:a,...n})}function yn(n){let e=n.abi,{moduleAddress:t,moduleName:o,functionName:a}=T(n.function),r=$(n.typeArguments);if(r.length!==e.typeParameters.length)throw new Error(`Type argument count mismatch, expected ${e.typeParameters.length}, received ${r.length}`);let i=n?.functionArguments?.map((c,s)=>M(n.function,e,c,s,r))??[];if(i.length!==e.parameters.length)throw new Error(`Too few arguments for '${t}::${o}::${a}', expected ${e.parameters.length} but got ${i.length}`);return N.build(`${t}::${o}`,a,r,i)}function fn(n){return new X(new j(b.fromHexInput(n.bytecode).toUint8Array(),n.typeArguments??[],n.functionArguments))}async function gn(n){let{aptosConfig:e,sender:t,payload:o,options:a,feePayerAddress:r}=n,i=P[e.network]?Promise.resolve({chain_id:P[e.network]}):O({aptosConfig:e}),c=a?.gasUnitPrice?Promise.resolve({gas_estimate:a.gasUnitPrice}):H({aptosConfig:e}),[{chain_id:s},{gas_estimate:d}]=await Promise.all([i,c]),m=a?.accountSequenceNumber!==void 0?Promise.resolve({sequence_number:a.accountSequenceNumber}):K({aptosConfig:e,accountAddress:t}),y;if(r&&u.from(r).equals(u.ZERO))try{let{sequence_number:w}=await m;y=w}catch{y="0"}else{let{sequence_number:w}=await m;y=w}let{maxGasAmount:un,gasUnitPrice:An,expireTimestamp:dn}={maxGasAmount:a?.maxGasAmount?BigInt(a.maxGasAmount):BigInt(2e5),gasUnitPrice:BigInt(d),expireTimestamp:BigInt(Math.floor(Date.now()/1e3)+20),...a};return new l(u.from(t),BigInt(y),o,BigInt(un),BigInt(An),BigInt(dn),new L(s))}async function Kn(n){let{aptosConfig:e,sender:t,payload:o,options:a,feePayerAddress:r}=n,i=await gn({aptosConfig:e,sender:t,payload:o,options:a,feePayerAddress:r});if("secondarySignerAddresses"in n){let c=n.secondarySignerAddresses?.map(s=>u.from(s))??[];return new rn(i,c,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}return new Y(i,n.feePayerAddress?u.from(n.feePayerAddress):void 0)}function Hn(n){let{signerPublicKey:e,transaction:t,secondarySignersPublicKeys:o,feePayerPublicKey:a}=n,r=I(e);if(t.feePayerAddress){let c=new g(t.rawTransaction,t.secondarySignerAddresses??[],t.feePayerAddress),s=[];o&&(s=o.map(y=>I(y)));let d=I(a),m=new _(r,t.secondarySignerAddresses??[],s,{address:t.feePayerAddress,authenticator:d});return new A(c.raw_txn,m).bcsToBytes()}if(t.secondarySignerAddresses){let c=new f(t.rawTransaction,t.secondarySignerAddresses),s=[];s=o.map(m=>I(m));let d=new F(r,t.secondarySignerAddresses,s);return new A(c.raw_txn,d).bcsToBytes()}let i;if(r instanceof h)i=new R(r.public_key,r.signature);else if(r instanceof p)i=new D(r);else throw new Error("Invalid public key");return new A(t.rawTransaction,i).bcsToBytes()}function I(n){if(n instanceof v){if(n.publicKey instanceof x)return new p(n,new E(new B(new Uint8Array(64))));if(n.publicKey instanceof G)return new p(n,new E(new k(new Uint8Array(64))))}return new h(new x(n.toUint8Array()),new B(new Uint8Array(64)))}function Ln(n){let{signer:e,transaction:t}=n,o=wn(t);return e.signWithAuthenticator(o)}function pn(n){let{transaction:e,senderAuthenticator:t,feePayerAuthenticator:o,additionalSignersAuthenticators:a}=n,r=sn(e);if((o||a)&&(r instanceof f||r instanceof g))return Tn(r,t,o,a);if(t instanceof h&&r instanceof l){let i=new R(t.public_key,t.signature);return new A(r,i).bcsToBytes()}if((t instanceof p||t instanceof q)&&r instanceof l){let i=new D(t);return new A(r,i).bcsToBytes()}throw new Error(`Cannot generate a signed transaction, ${t} is not a supported account authentication scheme`)}function on(n){let e=an.create();for(let t of n)e.update(t);return e.digest()}var ln=on(["APTOS::Transaction"]);function Xn(n){let e=pn(n);return new b(on([ln,new Uint8Array([0]),e])).toString()}function sn(n){return n.feePayerAddress?new g(n.rawTransaction,n.secondarySignerAddresses??[],n.feePayerAddress):n.secondarySignerAddresses?new f(n.rawTransaction,n.secondarySignerAddresses):n.rawTransaction}function Tn(n,e,t,o){if(n instanceof g){if(!t)throw new Error("Must provide a feePayerAuthenticator argument to generate a signed fee payer transaction");let a=new _(e,n.secondary_signer_addresses,o??[],{address:n.fee_payer_address,authenticator:t});return new A(n.raw_txn,a).bcsToBytes()}if(n instanceof f){if(!o)throw new Error("Must provide a additionalSignersAuthenticators argument to generate a signed multi agent transaction");let a=new F(e,n.secondary_signer_addresses,o??[]);return new A(n.raw_txn,a).bcsToBytes()}throw new Error(`Cannot prepare multi signers transaction to submission, ${typeof n} transaction is not supported`)}function wn(n){let e=sn(n),t=an.create();if(e instanceof l)t.update(C);else if(e instanceof f)t.update(S);else if(e instanceof g)t.update(S);else throw new Error(`Unknown transaction type to sign on: ${e}`);let o=t.digest(),a=e.bcsToBytes(),r=new Uint8Array(o.length+a.length);return r.set(o),r.set(a,o.length),r}async function cn({key:n,moduleAddress:e,moduleName:t,functionName:o,aptosConfig:a,abi:r,fetch:i}){return r||V(async()=>i(e,t,o,a),`${n}-${a.network}-${e}-${t}-${o}`,1e3*60*5)()}export{On as a,mn as b,Vn as c,yn as d,gn as e,Kn as f,Hn as g,I as h,Ln as i,pn as j,on as k,Xn as l,sn as m,Tn as n,wn as o};
2
+ //# sourceMappingURL=chunk-54BANKLA.mjs.map
@@ -1,2 +1,2 @@
1
1
  import{a as o,b as r,c as n}from"./chunk-C67BKZND.mjs";import i from"@aptos-labs/aptos-client";var t=class{constructor(e){this.network=e?.network??"devnet",this.fullnode=e?.fullnode,this.faucet=e?.faucet,this.indexer=e?.indexer,this.client=e?.client??{provider:i},this.clientConfig=e?.clientConfig??{},this.fullnodeConfig=e?.fullnodeConfig??{},this.indexerConfig=e?.indexerConfig??{},this.faucetConfig=e?.faucetConfig??{}}getRequestUrl(e){switch(e){case"Fullnode":if(this.fullnode!==void 0)return this.fullnode;if(this.network==="custom")throw new Error("Please provide a custom full node url");return r[this.network];case"Faucet":if(this.faucet!==void 0)return this.faucet;if(this.network==="custom")throw new Error("Please provide a custom faucet url");return n[this.network];case"Indexer":if(this.indexer!==void 0)return this.indexer;if(this.network==="custom")throw new Error("Please provide a custom indexer url");return o[this.network];default:throw Error(`apiType ${e} is not supported`)}}};export{t as a};
2
- //# sourceMappingURL=chunk-CQS6ZCJ7.mjs.map
2
+ //# sourceMappingURL=chunk-5AQEETAC.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/api/aptosConfig.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport aptosClient from \"@aptos-labs/aptos-client\";\nimport { AptosSettings, ClientConfig, Client, FullNodeConfig, IndexerConfig, FaucetConfig } from \"../types\";\nimport { NetworkToNodeAPI, NetworkToFaucetAPI, NetworkToIndexerAPI, Network } from \"../utils/apiEndpoints\";\nimport { AptosApiType } from \"../utils/const\";\n\n/**\n * This class holds the config information for the SDK client instance.\n *\n * @example\n *\n * const aptosConfig = new AptosConfig({network:Network.TESTNET})\n */\nexport class AptosConfig {\n /**\n * The Network that this SDK is associated with. Defaults to DEVNET\n */\n readonly network: Network;\n\n /**\n * The client instance the SDK uses. Defaults to `@aptos-labs/aptos-client\n */\n readonly client: Client;\n\n /**\n * The optional hardcoded fullnode URL to send requests to instead of using the network\n */\n readonly fullnode?: string;\n\n /**\n * The optional hardcoded faucet URL to send requests to instead of using the network\n */\n readonly faucet?: string;\n\n /**\n * The optional hardcoded indexer URL to send requests to instead of using the network\n */\n readonly indexer?: string;\n\n /**\n * Optional client configurations\n */\n readonly clientConfig?: ClientConfig;\n\n /**\n * Optional specific Fullnode configurations\n */\n readonly fullnodeConfig?: FullNodeConfig;\n\n /**\n * Optional specific Indexer configurations\n */\n readonly indexerConfig?: IndexerConfig;\n\n /**\n * Optional specific Faucet configurations\n */\n readonly faucetConfig?: FaucetConfig;\n\n constructor(settings?: AptosSettings) {\n this.network = settings?.network ?? Network.DEVNET;\n this.fullnode = settings?.fullnode;\n this.faucet = settings?.faucet;\n this.indexer = settings?.indexer;\n this.client = settings?.client ?? { provider: aptosClient };\n this.clientConfig = settings?.clientConfig ?? {};\n this.fullnodeConfig = settings?.fullnodeConfig ?? {};\n this.indexerConfig = settings?.indexerConfig ?? {};\n this.faucetConfig = settings?.faucetConfig ?? {};\n }\n\n /**\n * Returns the URL endpoint to send the request to.\n * If a custom URL was provided in the config, that URL is returned.\n * If a custom URL was provided but not URL endpoints, an error is thrown.\n * Otherwise, the URL endpoint is derived from the network.\n *\n * @param apiType - The type of Aptos API to get the URL for.\n *\n * @internal\n */\n getRequestUrl(apiType: AptosApiType): string {\n switch (apiType) {\n case AptosApiType.FULLNODE:\n if (this.fullnode !== undefined) return this.fullnode;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom full node url\");\n return NetworkToNodeAPI[this.network];\n case AptosApiType.FAUCET:\n if (this.faucet !== undefined) return this.faucet;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom faucet url\");\n return NetworkToFaucetAPI[this.network];\n case AptosApiType.INDEXER:\n if (this.indexer !== undefined) return this.indexer;\n if (this.network === Network.CUSTOM) throw new Error(\"Please provide a custom indexer url\");\n return NetworkToIndexerAPI[this.network];\n default:\n throw Error(`apiType ${apiType} is not supported`);\n }\n }\n}\n"],"mappings":"uDAGA,OAAOA,MAAiB,2BAYjB,IAAMC,EAAN,KAAkB,CA8CvB,YAAYC,EAA0B,CACpC,KAAK,QAAUA,GAAU,kBACzB,KAAK,SAAWA,GAAU,SAC1B,KAAK,OAASA,GAAU,OACxB,KAAK,QAAUA,GAAU,QACzB,KAAK,OAASA,GAAU,QAAU,CAAE,SAAUC,CAAY,EAC1D,KAAK,aAAeD,GAAU,cAAgB,CAAC,EAC/C,KAAK,eAAiBA,GAAU,gBAAkB,CAAC,EACnD,KAAK,cAAgBA,GAAU,eAAiB,CAAC,EACjD,KAAK,aAAeA,GAAU,cAAgB,CAAC,CACjD,CAYA,cAAcE,EAA+B,CAC3C,OAAQA,EAAS,CACf,eACE,GAAI,KAAK,WAAa,OAAW,OAAO,KAAK,SAC7C,GAAI,KAAK,mBAA4B,MAAM,IAAI,MAAM,uCAAuC,EAC5F,OAAOC,EAAiB,KAAK,OAAO,EACtC,aACE,GAAI,KAAK,SAAW,OAAW,OAAO,KAAK,OAC3C,GAAI,KAAK,mBAA4B,MAAM,IAAI,MAAM,oCAAoC,EACzF,OAAOC,EAAmB,KAAK,OAAO,EACxC,cACE,GAAI,KAAK,UAAY,OAAW,OAAO,KAAK,QAC5C,GAAI,KAAK,mBAA4B,MAAM,IAAI,MAAM,qCAAqC,EAC1F,OAAOC,EAAoB,KAAK,OAAO,EACzC,QACE,MAAM,MAAM,WAAWH,CAAO,mBAAmB,CACrD,CACF,CACF","names":["aptosClient","AptosConfig","settings","aptosClient","apiType","NetworkToNodeAPI","NetworkToFaucetAPI","NetworkToIndexerAPI"]}
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-QRS4DGP3.mjs";import{f as e}from"./chunk-4AVC2RCH.mjs";import{d as r}from"./chunk-CAGDOGXS.mjs";import{d as s}from"./chunk-CYNQRMO5.mjs";async function x(a){let{aptosConfig:t,accountAddress:i,amount:p,options:n}=a,u=n?.timeoutSecs||20,{data:d}=await r({aptosConfig:t,path:"fund",body:{address:c.from(i).toString(),amount:p},originMethod:"fundAccount"}),m=d.txn_hashes[0],o=await e({aptosConfig:t,transactionHash:m,options:{timeoutSecs:u,checkSuccess:n?.checkSuccess}});if(o.type==="user_transaction")return o;throw new Error(`Unexpected transaction received for fund account: ${o.type}`)}export{x as a};
2
- //# sourceMappingURL=chunk-3RQ5V3F3.mjs.map
1
+ import{g as e}from"./chunk-7CAEMK4R.mjs";import{d as r}from"./chunk-YWQLLV2R.mjs";import{d as s}from"./chunk-CYNQRMO5.mjs";import{b as c}from"./chunk-IOSQVDZI.mjs";async function x(a){let{aptosConfig:t,accountAddress:i,amount:p,options:n}=a,u=n?.timeoutSecs||20,{data:d}=await r({aptosConfig:t,path:"fund",body:{address:c.from(i).toString(),amount:p},originMethod:"fundAccount"}),m=d.txn_hashes[0],o=await e({aptosConfig:t,transactionHash:m,options:{timeoutSecs:u,checkSuccess:n?.checkSuccess}});if(o.type==="user_transaction")return o;throw new Error(`Unexpected transaction received for fund account: ${o.type}`)}export{x as a};
2
+ //# sourceMappingURL=chunk-63AIRYJX.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-DGLW7OBS.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
- //# sourceMappingURL=chunk-HJYT6LDB.mjs.map
1
+ import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-KL6VJ3UK.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
+ //# sourceMappingURL=chunk-647IOEXV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r,b as i,c as s}from"./chunk-KXFMI7RM.mjs";import{a as o}from"./chunk-O3YFCZJ5.mjs";var t=class{constructor(e){this.config=e}async getNumberOfDelegators(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),r({aptosConfig:this.config,...e})}async getNumberOfDelegatorsForAllPools(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),i({aptosConfig:this.config,...e})}async getDelegatedStakingActivities(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),s({aptosConfig:this.config,...e})}};export{t as a};
2
- //# sourceMappingURL=chunk-M4SQNMCW.mjs.map
1
+ import{a as o}from"./chunk-QW3VNZJ7.mjs";import{a as r,b as i,c as s}from"./chunk-HB6T27S2.mjs";var t=class{constructor(e){this.config=e}async getNumberOfDelegators(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),r({aptosConfig:this.config,...e})}async getNumberOfDelegatorsForAllPools(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),i({aptosConfig:this.config,...e})}async getDelegatedStakingActivities(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),s({aptosConfig:this.config,...e})}};export{t as a};
2
+ //# sourceMappingURL=chunk-6CBPMYW5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/api/staking.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n getDelegatedStakingActivities,\n getNumberOfDelegators,\n getNumberOfDelegatorsForAllPools,\n} from \"../internal/staking\";\nimport { AnyNumber, GetDelegatedStakingActivitiesResponse, GetNumberOfDelegatorsResponse, OrderByArg } from \"../types\";\nimport { AccountAddressInput } from \"../core\";\nimport { ProcessorType } from \"../utils/const\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\n\n/**\n * A class to query all `Staking` related queries on Aptos.\n */\nexport class Staking {\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Queries current number of delegators in a pool. Throws an error if the pool is not found.\n *\n * @example\n * const delegators = await aptos.getNumberOfDelegators({poolAddress:\"0x123\"})\n *\n * @param args.poolAddress Pool address\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @returns The number of delegators for the given pool\n */\n async getNumberOfDelegators(args: {\n poolAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.STAKE_PROCESSOR,\n });\n return getNumberOfDelegators({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries current number of delegators in a pool. Throws an error if the pool is not found.\n *\n * @example\n * const delegators = await aptos.getNumberOfDelegatorsForAllPools()\n *\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @returns GetNumberOfDelegatorsForAllPoolsResponse response type\n */\n async getNumberOfDelegatorsForAllPools(args?: {\n minimumLedgerVersion?: AnyNumber;\n options?: OrderByArg<GetNumberOfDelegatorsResponse[0]>;\n }): Promise<GetNumberOfDelegatorsResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.STAKE_PROCESSOR,\n });\n return getNumberOfDelegatorsForAllPools({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries delegated staking activities\n *\n * @example\n * const delegators = await aptos.getDelegatedStakingActivities({delegatorAddress:\"0x123\",poolAddress:\"0x456\"})\n *\n * @param args.delegatorAddress Delegator address\n * @param args.poolAddress Pool address\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @returns GetDelegatedStakingActivitiesResponse response type\n */\n async getDelegatedStakingActivities(args: {\n delegatorAddress: AccountAddressInput;\n poolAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<GetDelegatedStakingActivitiesResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.STAKE_PROCESSOR,\n });\n return getDelegatedStakingActivities({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"gGAiBO,IAAMA,EAAN,KAAc,CACnB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAY3C,MAAM,sBAAsBC,EAGR,CAClB,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,GAAM,qBAC5B,+BACF,CAAC,EACME,EAAsB,CAAE,YAAa,KAAK,OAAQ,GAAGF,CAAK,CAAC,CACpE,CAWA,MAAM,iCAAiCA,EAGI,CACzC,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,GAAM,qBAC5B,+BACF,CAAC,EACMG,EAAiC,CAAE,YAAa,KAAK,OAAQ,GAAGH,CAAK,CAAC,CAC/E,CAaA,MAAM,8BAA8BA,EAIe,CACjD,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,GAAM,qBAC5B,+BACF,CAAC,EACMI,EAA8B,CAAE,YAAa,KAAK,OAAQ,GAAGJ,CAAK,CAAC,CAC5E,CACF","names":["Staking","config","args","waitForIndexerOnVersion","getNumberOfDelegators","getNumberOfDelegatorsForAllPools","getDelegatedStakingActivities"]}
@@ -1,2 +1,2 @@
1
- var s=class extends Error{constructor(e,t,a){super(a),this.name="AptosApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.data=t.data,this.request=e}};export{s as a};
2
- //# sourceMappingURL=chunk-GHYE26Q5.mjs.map
1
+ var s=class extends Error{constructor(e,t,a){super(a);this.name="AptosApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.data=t.data,this.request=e}};export{s as a};
2
+ //# sourceMappingURL=chunk-6FBKUTGF.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as h}from"./chunk-3JPVQHOR.mjs";import{a as R}from"./chunk-AH44UPM4.mjs";import{h as x,i as P}from"./chunk-Y5M5DD64.mjs";import{b as c,c as A}from"./chunk-GXVUN32G.mjs";import{a as w}from"./chunk-6FBKUTGF.mjs";import{d as C}from"./chunk-CYNQRMO5.mjs";async function v(s){let{aptosConfig:n,options:t}=s;return A({aptosConfig:n,originMethod:"getTransactions",path:"transactions",params:{start:t?.offset,limit:t?.limit}})}async function D(s){let{aptosConfig:n}=s;return R(async()=>{let{data:t}=await c({aptosConfig:n,originMethod:"getGasPriceEstimation",path:"estimate_gas_price"});return t},`gas-price-${n.network}`,1e3*60*5)()}async function N(s){let{aptosConfig:n,ledgerVersion:t}=s,{data:o}=await c({aptosConfig:n,originMethod:"getTransactionByVersion",path:`transactions/by_version/${t}`});return o}async function T(s){let{aptosConfig:n,transactionHash:t}=s,{data:o}=await c({aptosConfig:n,path:`transactions/by_hash/${t}`,originMethod:"getTransactionByHash"});return o}async function G(s){let{aptosConfig:n,transactionHash:t}=s;try{return(await T({aptosConfig:n,transactionHash:t})).type==="pending_transaction"}catch(o){if(o?.status===404)return!0;throw o}}async function b(s){let{aptosConfig:n,transactionHash:t}=s,{data:o}=await c({aptosConfig:n,path:`transactions/wait_by_hash/${t}`,originMethod:"longWaitForTransaction"});return o}async function W(s){let{aptosConfig:n,transactionHash:t,options:o}=s,r=o?.timeoutSecs??20,u=o?.checkSuccess??!0,a=!0,p=0,e,g,m=200,E=1.5;function d(i){if(!(i instanceof w)||(g=i,i.status!==404&&i.status>=400&&i.status<500))throw i}try{e=await T({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction"}catch(i){d(i)}if(a){let i=Date.now();try{e=await b({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction"}catch(l){d(l)}p=(Date.now()-i)/1e3}for(;a&&!(p>=r);){try{if(e=await T({aptosConfig:n,transactionHash:t}),a=e.type==="pending_transaction",!a)break}catch(i){d(i)}await h(m),p+=m/1e3,m*=E}if(e===void 0)throw g||new f(`Fetching transaction ${t} failed and timed out after ${r} seconds`,e);if(e.type==="pending_transaction")throw new f(`Transaction ${t} timed out in pending state after ${r} seconds`,e);if(!u)return e;if(!e.success)throw new y(`Transaction ${t} failed with an error: ${e.vm_status}`,e);return e}async function O(s){let{aptosConfig:n,processorType:t}=s,o=BigInt(s.minimumLedgerVersion),r=3e3,u=new Date().getTime(),a=BigInt(-1);for(;a<o;){if(new Date().getTime()-u>r)throw new Error("waitForLastSuccessIndexerVersionSync timeout");if(t===void 0?a=await x({aptosConfig:n}):a=(await P({aptosConfig:n,processorType:t})).last_success_version,a>=o)break;await h(200)}}var f=class extends Error{constructor(t,o){super(t);this.lastSubmittedTransaction=o}},y=class extends Error{constructor(t,o){super(t);this.transaction=o}};export{v as a,D as b,N as c,T as d,G as e,b as f,W as g,O as h,f as i,y as j};
2
+ //# sourceMappingURL=chunk-7CAEMK4R.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/internal/transaction.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file contains the underlying implementations for exposed API surface in\n * the {@link api/transaction}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * transaction namespace and without having a dependency cycle error.\n */\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { AptosApiError, getAptosFullNode, paginateWithCursor } from \"../client\";\nimport {\n TransactionResponseType,\n type AnyNumber,\n type GasEstimation,\n type HexInput,\n type PaginationArgs,\n type TransactionResponse,\n WaitForTransactionOptions,\n CommittedTransactionResponse,\n} from \"../types\";\nimport { DEFAULT_TXN_TIMEOUT_SEC, ProcessorType } from \"../utils/const\";\nimport { sleep } from \"../utils/helpers\";\nimport { memoizeAsync } from \"../utils/memoize\";\nimport { getIndexerLastSuccessVersion, getProcessorStatus } from \"./general\";\n\nexport async function getTransactions(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs;\n}): Promise<TransactionResponse[]> {\n const { aptosConfig, options } = args;\n return paginateWithCursor<{}, TransactionResponse[]>({\n aptosConfig,\n originMethod: \"getTransactions\",\n path: \"transactions\",\n params: { start: options?.offset, limit: options?.limit },\n });\n}\n\nexport async function getGasPriceEstimation(args: { aptosConfig: AptosConfig }) {\n const { aptosConfig } = args;\n\n return memoizeAsync(\n async () => {\n const { data } = await getAptosFullNode<{}, GasEstimation>({\n aptosConfig,\n originMethod: \"getGasPriceEstimation\",\n path: \"estimate_gas_price\",\n });\n return data;\n },\n `gas-price-${aptosConfig.network}`,\n 1000 * 60 * 5, // 5 minutes\n )();\n}\n\nexport async function getTransactionByVersion(args: {\n aptosConfig: AptosConfig;\n ledgerVersion: AnyNumber;\n}): Promise<TransactionResponse> {\n const { aptosConfig, ledgerVersion } = args;\n const { data } = await getAptosFullNode<{}, TransactionResponse>({\n aptosConfig,\n originMethod: \"getTransactionByVersion\",\n path: `transactions/by_version/${ledgerVersion}`,\n });\n return data;\n}\n\nexport async function getTransactionByHash(args: {\n aptosConfig: AptosConfig;\n transactionHash: HexInput;\n}): Promise<TransactionResponse> {\n const { aptosConfig, transactionHash } = args;\n const { data } = await getAptosFullNode<{}, TransactionResponse>({\n aptosConfig,\n path: `transactions/by_hash/${transactionHash}`,\n originMethod: \"getTransactionByHash\",\n });\n return data;\n}\n\nexport async function isTransactionPending(args: {\n aptosConfig: AptosConfig;\n transactionHash: HexInput;\n}): Promise<boolean> {\n const { aptosConfig, transactionHash } = args;\n try {\n const transaction = await getTransactionByHash({ aptosConfig, transactionHash });\n return transaction.type === TransactionResponseType.Pending;\n } catch (e: any) {\n if (e?.status === 404) {\n return true;\n }\n throw e;\n }\n}\n\nexport async function longWaitForTransaction(args: {\n aptosConfig: AptosConfig;\n transactionHash: HexInput;\n}): Promise<TransactionResponse> {\n const { aptosConfig, transactionHash } = args;\n const { data } = await getAptosFullNode<{}, TransactionResponse>({\n aptosConfig,\n path: `transactions/wait_by_hash/${transactionHash}`,\n originMethod: \"longWaitForTransaction\",\n });\n return data;\n}\n\nexport async function waitForTransaction(args: {\n aptosConfig: AptosConfig;\n transactionHash: HexInput;\n options?: WaitForTransactionOptions;\n}): Promise<CommittedTransactionResponse> {\n const { aptosConfig, transactionHash, options } = args;\n const timeoutSecs = options?.timeoutSecs ?? DEFAULT_TXN_TIMEOUT_SEC;\n const checkSuccess = options?.checkSuccess ?? true;\n\n let isPending = true;\n let timeElapsed = 0;\n let lastTxn: TransactionResponse | undefined;\n let lastError: AptosApiError | undefined;\n let backoffIntervalMs = 200;\n const backoffMultiplier = 1.5;\n\n function handleAPIError(e: any) {\n // In short, this means we will retry if it was an AptosApiError and the code was 404 or 5xx.\n const isAptosApiError = e instanceof AptosApiError;\n if (!isAptosApiError) {\n throw e; // This would be unexpected\n }\n lastError = e;\n const isRequestError = e.status !== 404 && e.status >= 400 && e.status < 500;\n if (isRequestError) {\n throw e;\n }\n }\n\n // check to see if the txn is already on the blockchain\n try {\n lastTxn = await getTransactionByHash({ aptosConfig, transactionHash });\n isPending = lastTxn.type === TransactionResponseType.Pending;\n } catch (e) {\n handleAPIError(e);\n }\n\n // If the transaction is pending, we do a long wait once to avoid polling\n if (isPending) {\n const startTime = Date.now();\n try {\n lastTxn = await longWaitForTransaction({ aptosConfig, transactionHash });\n isPending = lastTxn.type === TransactionResponseType.Pending;\n } catch (e) {\n handleAPIError(e);\n }\n timeElapsed = (Date.now() - startTime) / 1000;\n }\n\n // Now we do polling to see if the transaction is still pending\n while (isPending) {\n if (timeElapsed >= timeoutSecs) {\n break;\n }\n try {\n // eslint-disable-next-line no-await-in-loop\n lastTxn = await getTransactionByHash({ aptosConfig, transactionHash });\n\n isPending = lastTxn.type === TransactionResponseType.Pending;\n\n if (!isPending) {\n break;\n }\n } catch (e) {\n handleAPIError(e);\n }\n // eslint-disable-next-line no-await-in-loop\n await sleep(backoffIntervalMs);\n timeElapsed += backoffIntervalMs / 1000; // Convert to seconds\n backoffIntervalMs *= backoffMultiplier;\n }\n\n // There is a chance that lastTxn is still undefined. Let's throw the last error otherwise a WaitForTransactionError\n if (lastTxn === undefined) {\n if (lastError) {\n throw lastError;\n } else {\n throw new WaitForTransactionError(\n `Fetching transaction ${transactionHash} failed and timed out after ${timeoutSecs} seconds`,\n lastTxn,\n );\n }\n }\n\n if (lastTxn.type === TransactionResponseType.Pending) {\n throw new WaitForTransactionError(\n `Transaction ${transactionHash} timed out in pending state after ${timeoutSecs} seconds`,\n lastTxn,\n );\n }\n if (!checkSuccess) {\n return lastTxn;\n }\n if (!lastTxn.success) {\n throw new FailedTransactionError(\n `Transaction ${transactionHash} failed with an error: ${lastTxn.vm_status}`,\n lastTxn,\n );\n }\n\n return lastTxn;\n}\n\n/**\n * Waits for the indexer to sync up to the ledgerVersion. Timeout is 3 seconds.\n */\nexport async function waitForIndexer(args: {\n aptosConfig: AptosConfig;\n minimumLedgerVersion: AnyNumber;\n processorType?: ProcessorType;\n}): Promise<void> {\n const { aptosConfig, processorType } = args;\n const minimumLedgerVersion = BigInt(args.minimumLedgerVersion);\n const timeoutMilliseconds = 3000; // 3 seconds\n const startTime = new Date().getTime();\n let indexerVersion = BigInt(-1);\n\n while (indexerVersion < minimumLedgerVersion) {\n // check for timeout\n if (new Date().getTime() - startTime > timeoutMilliseconds) {\n throw new Error(\"waitForLastSuccessIndexerVersionSync timeout\");\n }\n\n if (processorType === undefined) {\n // Get the last success version from all processor\n // eslint-disable-next-line no-await-in-loop\n indexerVersion = await getIndexerLastSuccessVersion({ aptosConfig });\n } else {\n // Get the last success version from the specific processor\n // eslint-disable-next-line no-await-in-loop\n const processor = await getProcessorStatus({ aptosConfig, processorType });\n indexerVersion = processor.last_success_version;\n }\n\n if (indexerVersion >= minimumLedgerVersion) {\n // break out immediately if we are synced\n break;\n }\n\n // eslint-disable-next-line no-await-in-loop\n await sleep(200);\n }\n}\n\n/**\n * This error is used by `waitForTransaction` when waiting for a\n * transaction to time out or when the transaction response is undefined\n */\nexport class WaitForTransactionError extends Error {\n public readonly lastSubmittedTransaction: TransactionResponse | undefined;\n\n constructor(message: string, lastSubmittedTransaction: TransactionResponse | undefined) {\n super(message);\n this.lastSubmittedTransaction = lastSubmittedTransaction;\n }\n}\n\n/**\n * This error is used by `waitForTransaction` if `checkSuccess` is true.\n * See that function for more information.\n */\nexport class FailedTransactionError extends Error {\n public readonly transaction: TransactionResponse;\n\n constructor(message: string, transaction: TransactionResponse) {\n super(message);\n this.transaction = transaction;\n }\n}\n"],"mappings":"oQA2BA,eAAsBA,EAAgBC,EAGH,CACjC,GAAM,CAAE,YAAAC,EAAa,QAAAC,CAAQ,EAAIF,EACjC,OAAOG,EAA8C,CACnD,YAAAF,EACA,aAAc,kBACd,KAAM,eACN,OAAQ,CAAE,MAAOC,GAAS,OAAQ,MAAOA,GAAS,KAAM,CAC1D,CAAC,CACH,CAEA,eAAsBE,EAAsBJ,EAAoC,CAC9E,GAAM,CAAE,YAAAC,CAAY,EAAID,EAExB,OAAOK,EACL,SAAY,CACV,GAAM,CAAE,KAAAC,CAAK,EAAI,MAAMC,EAAoC,CACzD,YAAAN,EACA,aAAc,wBACd,KAAM,oBACR,CAAC,EACD,OAAOK,CACT,EACA,aAAaL,EAAY,OAAO,GAChC,IAAO,GAAK,CACd,EAAE,CACJ,CAEA,eAAsBO,EAAwBR,EAGb,CAC/B,GAAM,CAAE,YAAAC,EAAa,cAAAQ,CAAc,EAAIT,EACjC,CAAE,KAAAM,CAAK,EAAI,MAAMC,EAA0C,CAC/D,YAAAN,EACA,aAAc,0BACd,KAAM,2BAA2BQ,CAAa,EAChD,CAAC,EACD,OAAOH,CACT,CAEA,eAAsBI,EAAqBV,EAGV,CAC/B,GAAM,CAAE,YAAAC,EAAa,gBAAAU,CAAgB,EAAIX,EACnC,CAAE,KAAAM,CAAK,EAAI,MAAMC,EAA0C,CAC/D,YAAAN,EACA,KAAM,wBAAwBU,CAAe,GAC7C,aAAc,sBAChB,CAAC,EACD,OAAOL,CACT,CAEA,eAAsBM,EAAqBZ,EAGtB,CACnB,GAAM,CAAE,YAAAC,EAAa,gBAAAU,CAAgB,EAAIX,EACzC,GAAI,CAEF,OADoB,MAAMU,EAAqB,CAAE,YAAAT,EAAa,gBAAAU,CAAgB,CAAC,GAC5D,4BACrB,OAASE,EAAQ,CACf,GAAIA,GAAG,SAAW,IAChB,MAAO,GAET,MAAMA,CACR,CACF,CAEA,eAAsBC,EAAuBd,EAGZ,CAC/B,GAAM,CAAE,YAAAC,EAAa,gBAAAU,CAAgB,EAAIX,EACnC,CAAE,KAAAM,CAAK,EAAI,MAAMC,EAA0C,CAC/D,YAAAN,EACA,KAAM,6BAA6BU,CAAe,GAClD,aAAc,wBAChB,CAAC,EACD,OAAOL,CACT,CAEA,eAAsBS,EAAmBf,EAIC,CACxC,GAAM,CAAE,YAAAC,EAAa,gBAAAU,EAAiB,QAAAT,CAAQ,EAAIF,EAC5CgB,EAAcd,GAAS,aAAe,GACtCe,EAAef,GAAS,cAAgB,GAE1CgB,EAAY,GACZC,EAAc,EACdC,EACAC,EACAC,EAAoB,IAClBC,EAAoB,IAE1B,SAASC,EAAeX,EAAQ,CAQ9B,GALI,EADoBA,aAAaY,KAIrCJ,EAAYR,EACWA,EAAE,SAAW,KAAOA,EAAE,QAAU,KAAOA,EAAE,OAAS,KAEvE,MAAMA,CAEV,CAGA,GAAI,CACFO,EAAU,MAAMV,EAAqB,CAAE,YAAAT,EAAa,gBAAAU,CAAgB,CAAC,EACrEO,EAAYE,EAAQ,4BACtB,OAASP,EAAG,CACVW,EAAeX,CAAC,CAClB,CAGA,GAAIK,EAAW,CACb,IAAMQ,EAAY,KAAK,IAAI,EAC3B,GAAI,CACFN,EAAU,MAAMN,EAAuB,CAAE,YAAAb,EAAa,gBAAAU,CAAgB,CAAC,EACvEO,EAAYE,EAAQ,4BACtB,OAASP,EAAG,CACVW,EAAeX,CAAC,CAClB,CACAM,GAAe,KAAK,IAAI,EAAIO,GAAa,GAC3C,CAGA,KAAOR,GACD,EAAAC,GAAeH,IADH,CAIhB,GAAI,CAMF,GAJAI,EAAU,MAAMV,EAAqB,CAAE,YAAAT,EAAa,gBAAAU,CAAgB,CAAC,EAErEO,EAAYE,EAAQ,6BAEhB,CAACF,EACH,KAEJ,OAASL,EAAG,CACVW,EAAeX,CAAC,CAClB,CAEA,MAAMc,EAAML,CAAiB,EAC7BH,GAAeG,EAAoB,IACnCA,GAAqBC,CACvB,CAGA,GAAIH,IAAY,OACd,MAAIC,GAGI,IAAIO,EACR,wBAAwBjB,CAAe,+BAA+BK,CAAW,WACjFI,CACF,EAIJ,GAAIA,EAAQ,6BACV,MAAM,IAAIQ,EACR,eAAejB,CAAe,qCAAqCK,CAAW,WAC9EI,CACF,EAEF,GAAI,CAACH,EACH,OAAOG,EAET,GAAI,CAACA,EAAQ,QACX,MAAM,IAAIS,EACR,eAAelB,CAAe,0BAA0BS,EAAQ,SAAS,GACzEA,CACF,EAGF,OAAOA,CACT,CAKA,eAAsBU,EAAe9B,EAInB,CAChB,GAAM,CAAE,YAAAC,EAAa,cAAA8B,CAAc,EAAI/B,EACjCgC,EAAuB,OAAOhC,EAAK,oBAAoB,EACvDiC,EAAsB,IACtBP,EAAY,IAAI,KAAK,EAAE,QAAQ,EACjCQ,EAAiB,OAAO,EAAE,EAE9B,KAAOA,EAAiBF,GAAsB,CAE5C,GAAI,IAAI,KAAK,EAAE,QAAQ,EAAIN,EAAYO,EACrC,MAAM,IAAI,MAAM,8CAA8C,EAchE,GAXIF,IAAkB,OAGpBG,EAAiB,MAAMC,EAA6B,CAAE,YAAAlC,CAAY,CAAC,EAKnEiC,GADkB,MAAME,EAAmB,CAAE,YAAAnC,EAAa,cAAA8B,CAAc,CAAC,GAC9C,qBAGzBG,GAAkBF,EAEpB,MAIF,MAAML,EAAM,GAAG,CACjB,CACF,CAMO,IAAMC,EAAN,cAAsC,KAAM,CAGjD,YAAYS,EAAiBC,EAA2D,CACtF,MAAMD,CAAO,EACb,KAAK,yBAA2BC,CAClC,CACF,EAMaT,EAAN,cAAqC,KAAM,CAGhD,YAAYQ,EAAiBE,EAAkC,CAC7D,MAAMF,CAAO,EACb,KAAK,YAAcE,CACrB,CACF","names":["getTransactions","args","aptosConfig","options","paginateWithCursor","getGasPriceEstimation","memoizeAsync","data","getAptosFullNode","getTransactionByVersion","ledgerVersion","getTransactionByHash","transactionHash","isTransactionPending","e","longWaitForTransaction","waitForTransaction","timeoutSecs","checkSuccess","isPending","timeElapsed","lastTxn","lastError","backoffIntervalMs","backoffMultiplier","handleAPIError","AptosApiError","startTime","sleep","WaitForTransactionError","FailedTransactionError","waitForIndexer","processorType","minimumLedgerVersion","timeoutMilliseconds","indexerVersion","getIndexerLastSuccessVersion","getProcessorStatus","message","lastSubmittedTransaction","transaction"]}
@@ -1,2 +1,2 @@
1
- import{a as i,b as t,c as n,d as o}from"./chunk-YIGDWPGM.mjs";import{a as s}from"./chunk-O3YFCZJ5.mjs";var r=class{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),i({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),(await i({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetActivities(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),t({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),n({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return o({aptosConfig:this.config,...e})}};export{r as a};
2
- //# sourceMappingURL=chunk-AIPKOP3K.mjs.map
1
+ import{a as s}from"./chunk-QW3VNZJ7.mjs";import{a as i,b as t,c as n,d as o}from"./chunk-VX6LTXGB.mjs";var r=class{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),i({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),(await i({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetActivities(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),t({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),n({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return o({aptosConfig:this.config,...e})}};export{r as a};
2
+ //# sourceMappingURL=chunk-7PYFGGHM.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/api/fungibleAsset.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n AnyNumber,\n GetCurrentFungibleAssetBalancesResponse,\n GetFungibleAssetActivitiesResponse,\n GetFungibleAssetMetadataResponse,\n PaginationArgs,\n WhereArg,\n} from \"../types\";\nimport {\n getCurrentFungibleAssetBalances,\n getFungibleAssetActivities,\n getFungibleAssetMetadata,\n transferFungibleAsset,\n} from \"../internal/fungibleAsset\";\nimport {\n CurrentFungibleAssetBalancesBoolExp,\n FungibleAssetActivitiesBoolExp,\n FungibleAssetMetadataBoolExp,\n} from \"../types/generated/types\";\nimport { ProcessorType } from \"../utils/const\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\nimport { Account, AccountAddressInput } from \"../core\";\nimport { InputGenerateTransactionOptions } from \"../transactions\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\n\n/**\n * A class to query all `FungibleAsset` related queries on Aptos.\n */\nexport class FungibleAsset {\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Queries all fungible asset metadata.\n *\n * @example\n * const fungibleAsset = await aptos.getFungibleAssetMetadata()\n *\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.options Optional configuration for pagination and filtering\n *\n * @returns A list of fungible asset metadata\n */\n async getFungibleAssetMetadata(args?: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<FungibleAssetMetadataBoolExp>;\n }): Promise<GetFungibleAssetMetadataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getFungibleAssetMetadata({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries a fungible asset metadata\n *\n * This query returns the fungible asset metadata for a specific fungible asset.\n *\n * @example\n * const fungibleAsset = await aptos.getFungibleAssetMetadataByAssetType({assetType:\"0x123::test_coin::TestCoin\"})\n *\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.assetType The asset type of the fungible asset.\n * e.g\n * \"0x1::aptos_coin::AptosCoin\" for Aptos Coin\n * \"0xc2948283c2ce03aafbb294821de7ee684b06116bb378ab614fa2de07a99355a8\" - address format if this is fungible asset\n *\n * @returns A fungible asset metadata item\n */\n async getFungibleAssetMetadataByAssetType(args: {\n assetType: string;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<GetFungibleAssetMetadataResponse[0]> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n const data = await getFungibleAssetMetadata({\n aptosConfig: this.config,\n options: {\n where: {\n asset_type: { _eq: args.assetType },\n },\n },\n });\n\n return data[0];\n }\n\n /**\n * Queries all fungible asset activities\n *\n * @example\n * const fungibleAssetActivities = await aptos.getFungibleAssetActivities()\n *\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.options Optional configuration for pagination and filtering\n *\n * @returns A list of fungible asset metadata\n */\n async getFungibleAssetActivities(args?: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<FungibleAssetActivitiesBoolExp>;\n }): Promise<GetFungibleAssetActivitiesResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getFungibleAssetActivities({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries all fungible asset balances\n *\n * @example\n * const fungibleAssetBalances = await aptos.getCurrentFungibleAssetBalances()\n *\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.options Optional configuration for pagination and filtering\n *\n * @returns A list of fungible asset metadata\n */\n async getCurrentFungibleAssetBalances(args?: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<CurrentFungibleAssetBalancesBoolExp>;\n }): Promise<GetCurrentFungibleAssetBalancesResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getCurrentFungibleAssetBalances({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Transfer `amount` of fungible asset from sender's primary store to recipient's primary store.\n *\n * Use this method to transfer any fungible asset including fungible token.\n *\n * @example\n * const transaction = await aptos.transferFungibleAsset({\n * sender: alice,\n * fungibleAssetMetadataAddress: \"0x123\",\n * recipient: \"0x456\",\n * amount: 5\n * })\n *\n * @param sender The sender account\n * @param fungibleAssetMetadataAddress The fungible asset account address.\n * For example if you’re transferring USDT this would be the USDT address\n * @param recipient The recipient account address\n * @param amount Number of assets to transfer\n *\n * @returns A SimpleTransaction that can be simulated or submitted to chain.\n */\n async transferFungibleAsset(args: {\n sender: Account;\n fungibleAssetMetadataAddress: AccountAddressInput;\n recipient: AccountAddressInput;\n amount: AnyNumber;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return transferFungibleAsset({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"uGAgCO,IAAMA,EAAN,KAAoB,CACzB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAa3C,MAAM,yBAAyBC,EAGe,CAC5C,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,GAAM,qBAC5B,wCACF,CAAC,EACME,EAAyB,CAAE,YAAa,KAAK,OAAQ,GAAGF,CAAK,CAAC,CACvE,CAkBA,MAAM,oCAAoCA,EAGO,CAC/C,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,GAAM,qBAC5B,wCACF,CAAC,GACY,MAAME,EAAyB,CAC1C,YAAa,KAAK,OAClB,QAAS,CACP,MAAO,CACL,WAAY,CAAE,IAAKF,EAAK,SAAU,CACpC,CACF,CACF,CAAC,GAEW,CAAC,CACf,CAaA,MAAM,2BAA2BA,EAGe,CAC9C,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,GAAM,qBAC5B,wCACF,CAAC,EACMG,EAA2B,CAAE,YAAa,KAAK,OAAQ,GAAGH,CAAK,CAAC,CACzE,CAaA,MAAM,gCAAgCA,EAGe,CACnD,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,GAAM,qBAC5B,wCACF,CAAC,EACMI,EAAgC,CAAE,YAAa,KAAK,OAAQ,GAAGJ,CAAK,CAAC,CAC9E,CAuBA,MAAM,sBAAsBA,EAMG,CAC7B,OAAOK,EAAsB,CAAE,YAAa,KAAK,OAAQ,GAAGL,CAAK,CAAC,CACpE,CACF","names":["FungibleAsset","config","args","waitForIndexerOnVersion","getFungibleAssetMetadata","getFungibleAssetActivities","getCurrentFungibleAssetBalances","transferFungibleAsset"]}
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-DGLW7OBS.mjs";import{f as t,i as o}from"./chunk-U3YYSIIT.mjs";import{e as n}from"./chunk-CYNQRMO5.mjs";var u={typeParameters:[{constraints:[]}],parameters:[new o,new t]};async function y(e){let{aptosConfig:i,sender:s,recipient:c,amount:p,coinType:a,options:m}=e;return r({aptosConfig:i,sender:s,data:{function:"0x1::aptos_account::transfer_coins",typeArguments:[a??n],functionArguments:[c,p],abi:u},options:m})}export{y as a};
2
- //# sourceMappingURL=chunk-5ID6W7XL.mjs.map
1
+ import{a as r}from"./chunk-KL6VJ3UK.mjs";import{f as t,i as o}from"./chunk-DMKUAQB7.mjs";import{e as n}from"./chunk-CYNQRMO5.mjs";var u={typeParameters:[{constraints:[]}],parameters:[new o,new t]};async function y(e){let{aptosConfig:i,sender:s,recipient:c,amount:p,coinType:a,options:m}=e;return r({aptosConfig:i,sender:s,data:{function:"0x1::aptos_account::transfer_coins",typeArguments:[a??n],functionArguments:[c,p],abi:u},options:m})}export{y as a};
2
+ //# sourceMappingURL=chunk-A7MSW6OL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-LG7RJQ57.mjs";import{bytesToHex as s,hexToBytes as o}from"@noble/hashes/utils";var l=(e=>(e.TOO_SHORT="too_short",e.INVALID_LENGTH="invalid_length",e.INVALID_HEX_CHARS="invalid_hex_chars",e))(l||{}),i=class n{constructor(t){this.data=t}toUint8Array(){return this.data}toStringWithoutPrefix(){return s(this.data)}toString(){return`0x${this.toStringWithoutPrefix()}`}static fromHexString(t){let r=t;if(r.startsWith("0x")&&(r=r.slice(2)),r.length===0)throw new a("Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.","too_short");if(r.length%2!==0)throw new a("Hex string must be an even number of hex characters.","invalid_length");try{return new n(o(r))}catch(e){throw new a(`Hex string contains invalid hex characters: ${e?.message}`,"invalid_hex_chars")}}static fromHexInput(t){return t instanceof Uint8Array?new n(t):n.fromHexString(t)}static isValid(t){try{return n.fromHexString(t),{valid:!0}}catch(r){return{valid:!1,invalidReason:r?.invalidReason,invalidReasonMessage:r?.message}}}equals(t){return this.data.length!==t.data.length?!1:this.data.every((r,e)=>r===t.data[e])}};export{l as a,i as b};
2
- //# sourceMappingURL=chunk-BCUSI3N6.mjs.map
1
+ import{a}from"./chunk-FBPNHF54.mjs";import{bytesToHex as s,hexToBytes as o}from"@noble/hashes/utils";var l=(e=>(e.TOO_SHORT="too_short",e.INVALID_LENGTH="invalid_length",e.INVALID_HEX_CHARS="invalid_hex_chars",e))(l||{}),i=class n{constructor(t){this.data=t}toUint8Array(){return this.data}toStringWithoutPrefix(){return s(this.data)}toString(){return`0x${this.toStringWithoutPrefix()}`}static fromHexString(t){let r=t;if(r.startsWith("0x")&&(r=r.slice(2)),r.length===0)throw new a("Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.","too_short");if(r.length%2!==0)throw new a("Hex string must be an even number of hex characters.","invalid_length");try{return new n(o(r))}catch(e){throw new a(`Hex string contains invalid hex characters: ${e?.message}`,"invalid_hex_chars")}}static fromHexInput(t){return t instanceof Uint8Array?new n(t):n.fromHexString(t)}static isValid(t){try{return n.fromHexString(t),{valid:!0}}catch(r){return{valid:!1,invalidReason:r?.invalidReason,invalidReasonMessage:r?.message}}}equals(t){return this.data.length!==t.data.length?!1:this.data.every((r,e)=>r===t.data[e])}};export{l as a,i as b};
2
+ //# sourceMappingURL=chunk-AOCNYMMX.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as y}from"./chunk-XX5J7KKC.mjs";import{a as g,b as u}from"./chunk-JOLLCFQL.mjs";import{b as s}from"./chunk-ARGODLTZ.mjs";import{b as i}from"./chunk-ASXXZH2D.mjs";import{b as o}from"./chunk-QRS4DGP3.mjs";var p=class a{constructor(e){this.signingScheme=2;let{privateKey:t,address:r}=e;this.privateKey=t,this.publicKey=new g(t.publicKey()),this.accountAddress=r?o.from(r):this.publicKey.authKey().derivedAddress()}static generate(e={}){let{scheme:t=0}=e,r;switch(t){case 0:r=i.generate();break;case 2:r=s.generate();break;default:throw new Error(`Unsupported signature scheme ${t}`)}return new a({privateKey:r})}static fromDerivationPath(e){let{scheme:t=0,path:r,mnemonic:c}=e,n;switch(t){case 0:n=i.fromDerivationPath(r,c);break;case 2:n=s.fromDerivationPath(r,c);break;default:throw new Error(`Unsupported signature scheme ${t}`)}return new a({privateKey:n})}verifySignature(e){return this.publicKey.verifySignature(e)}signWithAuthenticator(e){let t=this.privateKey.sign(e),r=new u(t);return new y(this.publicKey,r)}sign(e){return this.signWithAuthenticator(e).signature}};export{p as a};
2
- //# sourceMappingURL=chunk-RIUFW2OG.mjs.map
1
+ import{d as y}from"./chunk-ZEXZ4CX5.mjs";import{a as g,b as u}from"./chunk-RAYJRFIG.mjs";import{b as s}from"./chunk-OKCU4GHN.mjs";import{b as i}from"./chunk-Y2VA7F5D.mjs";import{b as o}from"./chunk-IOSQVDZI.mjs";var p=class a{constructor(e){this.signingScheme=2;let{privateKey:t,address:r}=e;this.privateKey=t,this.publicKey=new g(t.publicKey()),this.accountAddress=r?o.from(r):this.publicKey.authKey().derivedAddress()}static generate(e={}){let{scheme:t=0}=e,r;switch(t){case 0:r=i.generate();break;case 2:r=s.generate();break;default:throw new Error(`Unsupported signature scheme ${t}`)}return new a({privateKey:r})}static fromDerivationPath(e){let{scheme:t=0,path:r,mnemonic:c}=e,n;switch(t){case 0:n=i.fromDerivationPath(r,c);break;case 2:n=s.fromDerivationPath(r,c);break;default:throw new Error(`Unsupported signature scheme ${t}`)}return new a({privateKey:n})}verifySignature(e){return this.publicKey.verifySignature(e)}signWithAuthenticator(e){let t=this.privateKey.sign(e),r=new u(t);return new y(this.publicKey,r)}sign(e){return this.signWithAuthenticator(e).signature}};export{p as a};
2
+ //# sourceMappingURL=chunk-AP7UZTPZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{f as e,g as s,h as t,i as o,j as r,k as i,l as a,m as c,n as m,o as g,p as u,q as d,r as p}from"./chunk-VNIABDOT.mjs";var A=class{constructor(n){this.config=n}async getOwnerAddress(n){return e({aptosConfig:this.config,...n})}async getExpiration(n){return t({aptosConfig:this.config,...n})}async getTargetAddress(n){return i({aptosConfig:this.config,...n})}async setTargetAddress(n){return a({aptosConfig:this.config,...n})}async getPrimaryName(n){return o({aptosConfig:this.config,...n})}async setPrimaryName(n){return r({aptosConfig:this.config,...n})}async registerName(n){return s({aptosConfig:this.config,...n})}async renewDomain(n){return p({aptosConfig:this.config,...n})}async getName(n){return c({aptosConfig:this.config,...n})}async getAccountNames(n){return m({aptosConfig:this.config,...n})}async getAccountDomains(n){return g({aptosConfig:this.config,...n})}async getAccountSubdomains(n){return u({aptosConfig:this.config,...n})}async getDomainSubdomains(n){return d({aptosConfig:this.config,...n})}};export{A as a};
2
- //# sourceMappingURL=chunk-FXHXOVL4.mjs.map
1
+ import{f as e,g as s,h as t,i as o,j as r,k as i,l as a,m as c,n as m,o as g,p as u,q as d,r as p}from"./chunk-H4UVHJ3M.mjs";var A=class{constructor(n){this.config=n}async getOwnerAddress(n){return e({aptosConfig:this.config,...n})}async getExpiration(n){return t({aptosConfig:this.config,...n})}async getTargetAddress(n){return i({aptosConfig:this.config,...n})}async setTargetAddress(n){return a({aptosConfig:this.config,...n})}async getPrimaryName(n){return o({aptosConfig:this.config,...n})}async setPrimaryName(n){return r({aptosConfig:this.config,...n})}async registerName(n){return s({aptosConfig:this.config,...n})}async renewDomain(n){return p({aptosConfig:this.config,...n})}async getName(n){return c({aptosConfig:this.config,...n})}async getAccountNames(n){return m({aptosConfig:this.config,...n})}async getAccountDomains(n){return g({aptosConfig:this.config,...n})}async getAccountSubdomains(n){return u({aptosConfig:this.config,...n})}async getDomainSubdomains(n){return d({aptosConfig:this.config,...n})}};export{A as a};
2
+ //# sourceMappingURL=chunk-BMKDEIRL.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/api/ans.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account, AccountAddress, AccountAddressInput } from \"../core\";\nimport {\n RegisterNameParameters,\n getExpiration,\n getOwnerAddress,\n registerName,\n getPrimaryName,\n setPrimaryName,\n getTargetAddress,\n setTargetAddress,\n renewDomain,\n getName,\n getAccountDomains,\n GetAccountDomainsArgs,\n GetAccountSubdomainsArgs,\n getAccountSubdomains,\n getAccountNames,\n GetAccountNamesArgs,\n getDomainSubdomains,\n GetDomainSubdomainsArgs,\n} from \"../internal/ans\";\nimport { GetANSNameResponse } from \"../types\";\nimport { InputGenerateTransactionOptions } from \"../transactions/types\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\n\n/**\n * A class to handle all `ANS` operations\n */\nexport class ANS {\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Retrieve the owner address of a domain name or subdomain name from the contract.\n *\n * @example\n * // Will return the owner address of \"test.aptos.apt\" or undefined\n * const owner = await aptos.getOwnerAddress({name: \"test.aptos\"})\n * // owner = 0x123...\n *\n * @param args.name - A string of the name to retrieve\n *\n * @returns AccountAddress if the name is owned, undefined otherwise\n */\n async getOwnerAddress(args: { name: string }): Promise<AccountAddress | undefined> {\n return getOwnerAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieve the expiration time of a domain name or subdomain name from the contract.\n *\n * @example\n * // Will return the expiration of \"test.aptos.apt\" or undefined\n * const exp = await aptos.getExpiration({name: \"test.aptos\"})\n * // new Date(exp) would give you the date in question: 2021-01-01T00:00:00.000Z\n *\n * @param args.name - A string of the name to retrieve\n *\n * @returns number as a unix timestamp in milliseconds.\n */\n async getExpiration(args: { name: string }): Promise<number | undefined> {\n return getExpiration({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieve the target address of a domain or subdomain name. This is the\n * address the name points to for use on chain. Note, the target address can\n * point to addresses that are not the owner of the name\n *\n * @example\n * const targetAddr = await aptos.getTargetAddress({name: \"test.aptos\"})\n * // targetAddr = 0x123...\n *\n * @param args.name - A string of the name: primary, primary.apt, secondary.primary, secondary.primary.apt, etc.\n *\n * @returns AccountAddress if the name has a target, undefined otherwise\n */\n async getTargetAddress(args: { name: string }): Promise<AccountAddress | undefined> {\n return getTargetAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Sets the target address of a domain or subdomain name. This is the\n * address the name points to for use on chain. Note, the target address can\n * point to addresses that are not the owner of the name\n *\n * @example\n * await aptos.setTargetAddress({sender: alice, name: \"test.aptos\", address: bob.accountAddress})\n * const address = await aptos.getTargetAddress({name: \"test.aptos\"})\n * // address = bob.accountAddress\n *\n * @param args.name - A string of the name: test.aptos.apt, test.apt, test, test.aptos, etc.\n * @param args.address - A AccountAddressInput of the address to set the domain or subdomain to\n *\n * @returns SimpleTransaction\n */\n async setTargetAddress(args: {\n sender: Account;\n name: string;\n address: AccountAddressInput;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return setTargetAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieve the primary name for an account. An account can have\n * multiple names that target it, but only a single name that is primary. An\n * account also may not have a primary name.\n *\n * @example\n * const name = await aptos.getPrimaryName({address: alice.accountAddress})\n * // name = test.aptos\n *\n * @param args.address - A AccountAddressInput (address) of the account\n *\n * @returns a string if the account has a primary name, undefined otherwise\n */\n async getPrimaryName(args: { address: AccountAddressInput }): Promise<string | undefined> {\n return getPrimaryName({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Sets the primary name for the sender. An account can have\n * multiple names that target it, but only a single name that is primary. An\n * account also may not have a primary name.\n *\n * @example\n * await aptos.setPrimaryName({sender: alice, name: \"test.aptos\"})\n * const primaryName = await aptos.getPrimaryName({address: alice.accountAddress})\n * // primaryName = test.aptos\n *\n * @param args.sender - The sender account\n * @param args.name - A string of the name: test, test.apt, test.aptos, test.aptos.apt, etc.\n *\n * @returns SimpleTransaction\n */\n async setPrimaryName(args: {\n sender: Account;\n name?: string;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return setPrimaryName({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Registers a new name\n *\n * @example\n * // An example of registering a subdomain name assuming def.apt is already registered\n * // and belongs to the sender alice.\n * const txn = aptos.registerName({\n * sender: alice,\n * name: \"test.aptos.apt\",\n * expiration: {\n * policy: \"subdomain:independent\",\n * expirationDate: Date.now() + 30 * 24 * 60 * 60 * 1000,\n * },\n * });\n *\n * @param args.sender - The sender account\n * @param args.name - A string of the name to register. This can be inclusive or exclusive of the .apt suffix.\n * Examples include: \"test\", \"test.apt\", \"test.aptos.apt\", etc.\n * @param args.expiration - An object with the expiration policy of the name.\n * @param args.expiration.policy - 'domain' | 'subdomain:follow-domain' | 'subdomain:independent'\n * - domain: Years is required and the name will expire after the given number of years.\n * - subdomain:follow-domain: The name will expire at the same time as the domain name.\n * - subdomain:independent: The name will expire at the given date.\n * @param args.expiration.expirationDate - An epoch number in milliseconds of\n * the date when the subdomain will expire. Only applicable when the policy is\n * set to 'subdomain:independent'.\n * @param args.transferable - Determines if the subdomain being minted is soul-bound. Applicable only to subdomains.\n * @param args.targetAddress optional - The address the domain name will resolve to. If not provided,\n * the sender's address will be used.\n * @param args.toAddress optional - The address to send the domain name to. If not provided,\n * the transaction will be sent to the router.\n *\n * @returns SimpleTransaction\n */\n async registerName(args: Omit<RegisterNameParameters, \"aptosConfig\">): Promise<SimpleTransaction> {\n return registerName({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Renews a domain name\n *\n * Note: If a domain name was minted with V1 of the contract, it will automatically be upgraded to V2 via this transaction.\n *\n * @example\n * await aptos.renewDomain({sender: alice, name: \"test\"})\n * // test.apt will be renewed for one year\n *\n * @param args.sender - The sender account\n * @param args.name - A string of the domain the subdomain will be under. The signer must be the domain owner.\n * Subdomains cannot be renewed.\n * @param args.years - The number of years to renew the name. Currently only one year is permitted.\n *\n * @returns SimpleTransaction\n */\n async renewDomain(args: {\n sender: Account;\n name: string;\n years?: 1;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return renewDomain({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches a single name from the indexer\n * @param args.name - A string of the name to retrieve, e.g. \"test.aptos.apt\"\n * or \"test.apt\" or \"test\". Can be inclusive or exclusive of the .apt suffix.\n * Can be a subdomain.\n *\n * @returns A promise of an ANSName or undefined\n */\n async getName(args: { name: string }): Promise<GetANSNameResponse[0] | undefined> {\n return getName({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches all names for an account (both top level domains and subdomains)\n *\n * @param args\n * @param args.accountAddress - A AccountAddressInput of the address to retrieve names for.\n * @param args.options.offset - Optional, the offset to start from when fetching names\n * @param args.options.limit - Optional, A number of the names to fetch per request\n * @param args.options.orderBy - The order to sort the names by\n * @param args.options.where - Additional filters to apply to the query\n *\n * @returns a promise of an array of ANSName\n */\n async getAccountNames(args: GetAccountNamesArgs): Promise<GetANSNameResponse> {\n return getAccountNames({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches all top level domain names for an account\n *\n * @param args\n * @param args.accountAddress - A AccountAddressInput of the address to retrieve domain names for.\n * @param args.options.offset - Optional, the offset to start from when fetching names\n * @param args.options.limit - Optional, A number of the names to fetch per request\n * @param args.options.orderBy - The order to sort the names by\n * @param args.options.where - Additional filters to apply to the query\n *\n * @returns a promise of an array of ANSName\n */\n async getAccountDomains(args: GetAccountDomainsArgs): Promise<GetANSNameResponse> {\n return getAccountDomains({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches all subdomains names for an account\n *\n * @param args\n * @param args.accountAddress - A AccountAddressInput of the address to retrieve subdomains names for.\n * @param args.options.offset - Optional, the offset to start from when fetching names\n * @param args.options.limit - Optional, A number of the names to fetch per request\n * @param args.options.orderBy - The order to sort the names by\n * @param args.options.where - Additional filters to apply to the query\n *\n * @returns a promise of an array of ANSName\n */\n async getAccountSubdomains(args: GetAccountSubdomainsArgs): Promise<GetANSNameResponse> {\n return getAccountSubdomains({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Fetches all subdomains names for a given domain. Note, this will not return the domain itself.\n *\n * @param args\n * @param args.domain - A string of the domain name: eg. \"test.apt\" or \"test\" (without the suffix of .apt)\n * @param args.options.offset - Optional, the offset to start from when fetching names\n * @param args.options.limit - Optional, A number of the names to fetch per request\n * @param args.options.orderBy - The order to sort the names by\n * @param args.options.where - Additional filters to apply to the query\n *\n * @returns a promise of an array of ANSName\n */\n async getDomainSubdomains(args: GetDomainSubdomainsArgs): Promise<GetANSNameResponse> {\n return getDomainSubdomains({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"6HAgCO,IAAMA,EAAN,KAAU,CACf,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAc3C,MAAM,gBAAgBC,EAA6D,CACjF,OAAOC,EAAgB,CAAE,YAAa,KAAK,OAAQ,GAAGD,CAAK,CAAC,CAC9D,CAcA,MAAM,cAAcA,EAAqD,CACvE,OAAOE,EAAc,CAAE,YAAa,KAAK,OAAQ,GAAGF,CAAK,CAAC,CAC5D,CAeA,MAAM,iBAAiBA,EAA6D,CAClF,OAAOG,EAAiB,CAAE,YAAa,KAAK,OAAQ,GAAGH,CAAK,CAAC,CAC/D,CAiBA,MAAM,iBAAiBA,EAKQ,CAC7B,OAAOI,EAAiB,CAAE,YAAa,KAAK,OAAQ,GAAGJ,CAAK,CAAC,CAC/D,CAeA,MAAM,eAAeA,EAAqE,CACxF,OAAOK,EAAe,CAAE,YAAa,KAAK,OAAQ,GAAGL,CAAK,CAAC,CAC7D,CAiBA,MAAM,eAAeA,EAIU,CAC7B,OAAOM,EAAe,CAAE,YAAa,KAAK,OAAQ,GAAGN,CAAK,CAAC,CAC7D,CAoCA,MAAM,aAAaA,EAA+E,CAChG,OAAOO,EAAa,CAAE,YAAa,KAAK,OAAQ,GAAGP,CAAK,CAAC,CAC3D,CAkBA,MAAM,YAAYA,EAKa,CAC7B,OAAOQ,EAAY,CAAE,YAAa,KAAK,OAAQ,GAAGR,CAAK,CAAC,CAC1D,CAUA,MAAM,QAAQA,EAAoE,CAChF,OAAOS,EAAQ,CAAE,YAAa,KAAK,OAAQ,GAAGT,CAAK,CAAC,CACtD,CAcA,MAAM,gBAAgBA,EAAwD,CAC5E,OAAOU,EAAgB,CAAE,YAAa,KAAK,OAAQ,GAAGV,CAAK,CAAC,CAC9D,CAcA,MAAM,kBAAkBA,EAA0D,CAChF,OAAOW,EAAkB,CAAE,YAAa,KAAK,OAAQ,GAAGX,CAAK,CAAC,CAChE,CAcA,MAAM,qBAAqBA,EAA6D,CACtF,OAAOY,EAAqB,CAAE,YAAa,KAAK,OAAQ,GAAGZ,CAAK,CAAC,CACnE,CAcA,MAAM,oBAAoBA,EAA4D,CACpF,OAAOa,EAAoB,CAAE,YAAa,KAAK,OAAQ,GAAGb,CAAK,CAAC,CAClE,CACF","names":["ANS","config","args","getOwnerAddress","getExpiration","getTargetAddress","setTargetAddress","getPrimaryName","setPrimaryName","registerName","renewDomain","getName","getAccountNames","getAccountDomains","getAccountSubdomains","getDomainSubdomains"]}
@@ -1,2 +1,2 @@
1
- import{a as c,b as h}from"./chunk-JOLLCFQL.mjs";import{b as m}from"./chunk-4NHWV5AI.mjs";import{a as g}from"./chunk-UGPALAPN.mjs";import{a as b}from"./chunk-5EN52MUT.mjs";function p(l){let e=l;return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}var f=class l extends m{constructor(e){super();let{publicKeys:s,signaturesRequired:t}=e;if(t<1)throw new Error("The number of required signatures needs to be greater than 0");if(s.length<t)throw new Error(`Provided ${s.length} public keys is smaller than the ${t} required signatures`);this.publicKeys=s.map(r=>r instanceof c?r:new c(r)),this.signaturesRequired=t}verifySignature(e){throw new Error("not implemented")}authKey(){return b.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let s=e.deserializeVector(c),t=e.deserializeU8();return new l({publicKeys:s,signaturesRequired:t})}createBitmap(e){let{bits:s}=e,t=128,r=new Uint8Array([0,0,0,0]),n=new Set;return s.forEach((i,o)=>{if(o+1>this.publicKeys.length)throw new Error(`Signature index ${o+1} is out of public keys range, ${this.publicKeys.length}.`);if(n.has(i))throw new Error(`Duplicate bit ${i} detected.`);n.add(i);let u=Math.floor(i/8),y=r[u];y|=t>>i%8,r[u]=y}),r}},a=class a extends g{constructor(e){super();let{signatures:s,bitmap:t}=e;if(s.length>a.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${a.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=s.map(n=>n instanceof h?n:new h(n)),!(t instanceof Uint8Array))this.bitmap=a.createBitmap({bits:t});else{if(t.length!==a.BITMAP_LEN)throw new Error(`"bitmap" length should be ${a.BITMAP_LEN}`);this.bitmap=t}let r=this.bitmap.reduce((n,i)=>n+p(i),0);if(r!==this.signatures.length)throw new Error(`Expecting ${r} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:s}=e,t=128,r=new Uint8Array([0,0,0,0]),n=new Set;return s.forEach(i=>{if(i>=a.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${a.MAX_SIGNATURES_SUPPORTED-1}.`);if(n.has(i))throw new Error("Duplicate bits detected.");n.add(i);let o=Math.floor(i/8),u=r[o];u|=t>>i%8,r[o]=u}),r}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let s=e.deserializeBytes(),t=s.reduce((n,i)=>n+p(i),0),r=[];for(let n=0;n<t;n+=1){let i=h.deserialize(e);r.push(i)}return new a({signatures:r,bitmap:s})}};a.BITMAP_LEN=4,a.MAX_SIGNATURES_SUPPORTED=a.BITMAP_LEN*8;var A=a;export{f as a,A as b};
2
- //# sourceMappingURL=chunk-EV75CYGN.mjs.map
1
+ import{a as h,b as l}from"./chunk-RAYJRFIG.mjs";import{b as g}from"./chunk-WFZDFFBM.mjs";import{a as p}from"./chunk-R5QUBEH6.mjs";import{a as m}from"./chunk-NPFNYP75.mjs";function f(y){let o=y;return o-=o>>1&1431655765,o=(o&858993459)+(o>>2&858993459),(o+(o>>4)&252645135)*16843009>>24}var A=class y extends g{constructor(e){super();let{publicKeys:s,signaturesRequired:t}=e;if(t<1)throw new Error("The number of required signatures needs to be greater than 0");if(s.length<t)throw new Error(`Provided ${s.length} public keys is smaller than the ${t} required signatures`);this.publicKeys=s.map(r=>r instanceof h?r:new h(r)),this.signaturesRequired=t}verifySignature(e){throw new Error("not implemented")}authKey(){return m.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let s=e.deserializeVector(h),t=e.deserializeU8();return new y({publicKeys:s,signaturesRequired:t})}createBitmap(e){let{bits:s}=e,t=128,r=new Uint8Array([0,0,0,0]),n=new Set;return s.forEach((i,u)=>{if(u+1>this.publicKeys.length)throw new Error(`Signature index ${u+1} is out of public keys range, ${this.publicKeys.length}.`);if(n.has(i))throw new Error(`Duplicate bit ${i} detected.`);n.add(i);let c=Math.floor(i/8),b=r[c];b|=t>>i%8,r[c]=b}),r}},a=class a extends p{constructor(e){super();let{signatures:s,bitmap:t}=e;if(s.length>a.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${a.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=s.map(n=>n instanceof l?n:new l(n)),!(t instanceof Uint8Array))this.bitmap=a.createBitmap({bits:t});else{if(t.length!==a.BITMAP_LEN)throw new Error(`"bitmap" length should be ${a.BITMAP_LEN}`);this.bitmap=t}let r=this.bitmap.reduce((n,i)=>n+f(i),0);if(r!==this.signatures.length)throw new Error(`Expecting ${r} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:s}=e,t=128,r=new Uint8Array([0,0,0,0]),n=new Set;return s.forEach(i=>{if(i>=a.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${a.MAX_SIGNATURES_SUPPORTED-1}.`);if(n.has(i))throw new Error("Duplicate bits detected.");n.add(i);let u=Math.floor(i/8),c=r[u];c|=t>>i%8,r[u]=c}),r}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let s=e.deserializeBytes(),t=s.reduce((n,i)=>n+f(i),0),r=[];for(let n=0;n<t;n+=1){let i=l.deserialize(e);r.push(i)}return new a({signatures:r,bitmap:s})}};a.BITMAP_LEN=4,a.MAX_SIGNATURES_SUPPORTED=a.BITMAP_LEN*8;var d=a;export{A as a,d as b};
2
+ //# sourceMappingURL=chunk-BSEQPVD6.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as i}from"./chunk-52C73T26.mjs";var r=class a extends i{constructor(e){super();this.chainId=e}serialize(e){e.serializeU8(this.chainId)}static deserialize(e){let s=e.deserializeU8();return new a(s)}};export{r as a};
2
+ //# sourceMappingURL=chunk-BWFJHFBQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-B7X6PSE7.mjs";import{b as a}from"./chunk-QRS4DGP3.mjs";import{a as v}from"./chunk-36QXVFR5.mjs";var t=class extends v{static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return c.load(e);case 1:return u.load(e);case 2:return p.load(e);case 3:return z.load(e);case 4:return S.load(e);case 5:return U.load(e);case 6:return y.load(e);case 7:return b.load(e);case 8:return d.load(e);case 9:return g.load(e);case 10:return T.load(e);case 255:return h.load(e);default:throw new Error(`Unknown variant index for TypeTag: ${r}`)}}isBool(){return this instanceof c}isAddress(){return this instanceof S}isGeneric(){return this instanceof h}isSigner(){return this instanceof U}isVector(){return this instanceof y}isStruct(){return this instanceof b}isU8(){return this instanceof u}isU16(){return this instanceof d}isU32(){return this instanceof g}isU64(){return this instanceof p}isU128(){return this instanceof z}isU256(){return this instanceof T}},c=class i extends t{toString(){return"bool"}serialize(e){e.serializeU32AsUleb128(0)}static load(e){return new i}},u=class i extends t{toString(){return"u8"}serialize(e){e.serializeU32AsUleb128(1)}static load(e){return new i}},d=class i extends t{toString(){return"u16"}serialize(e){e.serializeU32AsUleb128(8)}static load(e){return new i}},g=class i extends t{toString(){return"u32"}serialize(e){e.serializeU32AsUleb128(9)}static load(e){return new i}},p=class i extends t{toString(){return"u64"}serialize(e){e.serializeU32AsUleb128(2)}static load(e){return new i}},z=class i extends t{toString(){return"u128"}serialize(e){e.serializeU32AsUleb128(3)}static load(e){return new i}},T=class i extends t{toString(){return"u256"}serialize(e){e.serializeU32AsUleb128(10)}static load(e){return new i}},S=class i extends t{toString(){return"address"}serialize(e){e.serializeU32AsUleb128(4)}static load(e){return new i}},U=class i extends t{toString(){return"signer"}serialize(e){e.serializeU32AsUleb128(5)}static load(e){return new i}},x=class i extends t{constructor(r){super();this.value=r}toString(){return`&${this.value.toString()}`}serialize(r){r.serializeU32AsUleb128(254)}static load(r){let s=t.deserialize(r);return new i(s)}},h=class i extends t{constructor(r){super();this.value=r;if(r<0)throw new Error("Generic type parameter index cannot be negative")}toString(){return`T${this.value}`}serialize(r){r.serializeU32AsUleb128(255),r.serializeU32(this.value)}static load(r){let s=r.deserializeU32();return new i(s)}},y=class i extends t{constructor(r){super();this.value=r}toString(){return`vector<${this.value.toString()}>`}static u8(){return new i(new u)}serialize(r){r.serializeU32AsUleb128(6),this.value.serialize(r)}static load(r){let s=t.deserialize(r);return new i(s)}},b=class i extends t{constructor(r){super();this.value=r}toString(){let r="";return this.value.typeArgs.length>0&&(r=`<${this.value.typeArgs.map(s=>s.toString()).join(", ")}>`),`${this.value.address.toString()}::${this.value.moduleName.identifier}::${this.value.name.identifier}${r}`}serialize(r){r.serializeU32AsUleb128(7),this.value.serialize(r)}static load(r){let s=o.deserialize(r);return new i(s)}isTypeTag(r,s,l){return this.value.moduleName.identifier===s&&this.value.name.identifier===l&&this.value.address.equals(r)}isString(){return this.isTypeTag(a.ONE,"string","String")}isOption(){return this.isTypeTag(a.ONE,"option","Option")}isObject(){return this.isTypeTag(a.ONE,"object","Object")}},o=class i extends v{constructor(e,r,s,l){super(),this.address=e,this.moduleName=r,this.name=s,this.typeArgs=l}serialize(e){e.serialize(this.address),e.serialize(this.moduleName),e.serialize(this.name),e.serializeVector(this.typeArgs)}static deserialize(e){let r=a.deserialize(e),s=n.deserialize(e),l=n.deserialize(e),f=e.deserializeVector(t);return new i(r,s,l,f)}};function O(){return new o(a.ONE,new n("aptos_coin"),new n("AptosCoin"),[])}function E(){return new o(a.ONE,new n("string"),new n("String"),[])}function V(i){return new o(a.ONE,new n("option"),new n("Option"),[i])}function j(i){return new o(a.ONE,new n("object"),new n("Object"),[i])}export{t as a,c as b,u as c,d,g as e,p as f,z as g,T as h,S as i,U as j,x as k,h as l,y as m,b as n,o,O as p,E as q,V as r,j as s};
2
- //# sourceMappingURL=chunk-U3YYSIIT.mjs.map
1
+ import{a as n}from"./chunk-DSTKXJMA.mjs";import{b as a}from"./chunk-IOSQVDZI.mjs";import{a as x}from"./chunk-52C73T26.mjs";var t=class extends x{static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return c.load(e);case 1:return u.load(e);case 2:return p.load(e);case 3:return z.load(e);case 4:return S.load(e);case 5:return U.load(e);case 6:return y.load(e);case 7:return b.load(e);case 8:return d.load(e);case 9:return g.load(e);case 10:return T.load(e);case 255:return h.load(e);default:throw new Error(`Unknown variant index for TypeTag: ${r}`)}}isBool(){return this instanceof c}isAddress(){return this instanceof S}isGeneric(){return this instanceof h}isSigner(){return this instanceof U}isVector(){return this instanceof y}isStruct(){return this instanceof b}isU8(){return this instanceof u}isU16(){return this instanceof d}isU32(){return this instanceof g}isU64(){return this instanceof p}isU128(){return this instanceof z}isU256(){return this instanceof T}},c=class i extends t{toString(){return"bool"}serialize(e){e.serializeU32AsUleb128(0)}static load(e){return new i}},u=class i extends t{toString(){return"u8"}serialize(e){e.serializeU32AsUleb128(1)}static load(e){return new i}},d=class i extends t{toString(){return"u16"}serialize(e){e.serializeU32AsUleb128(8)}static load(e){return new i}},g=class i extends t{toString(){return"u32"}serialize(e){e.serializeU32AsUleb128(9)}static load(e){return new i}},p=class i extends t{toString(){return"u64"}serialize(e){e.serializeU32AsUleb128(2)}static load(e){return new i}},z=class i extends t{toString(){return"u128"}serialize(e){e.serializeU32AsUleb128(3)}static load(e){return new i}},T=class i extends t{toString(){return"u256"}serialize(e){e.serializeU32AsUleb128(10)}static load(e){return new i}},S=class i extends t{toString(){return"address"}serialize(e){e.serializeU32AsUleb128(4)}static load(e){return new i}},U=class i extends t{toString(){return"signer"}serialize(e){e.serializeU32AsUleb128(5)}static load(e){return new i}},f=class i extends t{constructor(r){super();this.value=r}toString(){return`&${this.value.toString()}`}serialize(r){r.serializeU32AsUleb128(254)}static load(r){let s=t.deserialize(r);return new i(s)}},h=class i extends t{constructor(r){super();this.value=r;if(r<0)throw new Error("Generic type parameter index cannot be negative")}toString(){return`T${this.value}`}serialize(r){r.serializeU32AsUleb128(255),r.serializeU32(this.value)}static load(r){let s=r.deserializeU32();return new i(s)}},y=class i extends t{constructor(r){super();this.value=r}toString(){return`vector<${this.value.toString()}>`}static u8(){return new i(new u)}serialize(r){r.serializeU32AsUleb128(6),this.value.serialize(r)}static load(r){let s=t.deserialize(r);return new i(s)}},b=class i extends t{constructor(r){super();this.value=r}toString(){let r="";return this.value.typeArgs.length>0&&(r=`<${this.value.typeArgs.map(s=>s.toString()).join(", ")}>`),`${this.value.address.toString()}::${this.value.moduleName.identifier}::${this.value.name.identifier}${r}`}serialize(r){r.serializeU32AsUleb128(7),this.value.serialize(r)}static load(r){let s=o.deserialize(r);return new i(s)}isTypeTag(r,s,l){return this.value.moduleName.identifier===s&&this.value.name.identifier===l&&this.value.address.equals(r)}isString(){return this.isTypeTag(a.ONE,"string","String")}isOption(){return this.isTypeTag(a.ONE,"option","Option")}isObject(){return this.isTypeTag(a.ONE,"object","Object")}},o=class i extends x{constructor(r,s,l,v){super();this.address=r,this.moduleName=s,this.name=l,this.typeArgs=v}serialize(r){r.serialize(this.address),r.serialize(this.moduleName),r.serialize(this.name),r.serializeVector(this.typeArgs)}static deserialize(r){let s=a.deserialize(r),l=n.deserialize(r),v=n.deserialize(r),A=r.deserializeVector(t);return new i(s,l,v,A)}};function E(){return new o(a.ONE,new n("aptos_coin"),new n("AptosCoin"),[])}function V(){return new o(a.ONE,new n("string"),new n("String"),[])}function j(i){return new o(a.ONE,new n("option"),new n("Option"),[i])}function G(i){return new o(a.ONE,new n("object"),new n("Object"),[i])}export{t as a,c as b,u as c,d,g as e,p as f,z as g,T as h,S as i,U as j,f as k,h as l,y as m,b as n,o,E as p,V as q,j as r,G as s};
2
+ //# sourceMappingURL=chunk-DMKUAQB7.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as e}from"./chunk-52C73T26.mjs";var r=class t extends e{constructor(i){super();this.identifier=i}serialize(i){i.serializeStr(this.identifier)}static deserialize(i){let s=i.deserializeStr();return new t(s)}};export{r as a};
2
+ //# sourceMappingURL=chunk-DSTKXJMA.mjs.map
@@ -0,0 +1,2 @@
1
+ var s=class extends Error{constructor(e,i){super(e);this.invalidReason=i}};export{s as a};
2
+ //# sourceMappingURL=chunk-FBPNHF54.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l,b as s,c as u,d as c,e as d,f as m,g as U}from"./chunk-SRDIYE3M.mjs";import{a as o}from"./chunk-36QXVFR5.mjs";import{b as w}from"./chunk-BCUSI3N6.mjs";var t=class n extends o{constructor(e){super(),this.values=e}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){if(!(this.values[0]instanceof s)&&this.values[0]!==void 0)throw new Error("Script function arguments only accept u8 vectors");e.serializeU32AsUleb128(4),e.serialize(this)}static U8(e){let r;if(Array.isArray(e)&&typeof e[0]=="number")r=e;else if(typeof e=="string"){let i=w.fromHexInput(e);r=Array.from(i.toUint8Array())}else if(e instanceof Uint8Array)r=Array.from(e);else throw new Error("Invalid input type");return new n(r.map(i=>new s(i)))}static U16(e){return new n(e.map(r=>new u(r)))}static U32(e){return new n(e.map(r=>new c(r)))}static U64(e){return new n(e.map(r=>new d(r)))}static U128(e){return new n(e.map(r=>new m(r)))}static U256(e){return new n(e.map(r=>new U(r)))}static Bool(e){return new n(e.map(r=>new l(r)))}static MoveString(e){return new n(e.map(r=>new a(r)))}serialize(e){e.serializeVector(this.values)}static deserialize(e,r){let i=e.deserializeUleb128AsU32(),p=new Array;for(let y=0;y<i;y+=1)p.push(r.deserialize(e));return new n(p)}},a=class n extends o{constructor(e){super(),this.value=e}serialize(e){e.serializeStr(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){let r=this.bcsToBytes().slice(1);t.U8(r).serializeForScriptFunction(e)}static deserialize(e){return new n(e.deserializeStr())}},z=class n extends o{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 n(e!=null?new s(e):void 0)}static U16(e){return new n(e!=null?new u(e):void 0)}static U32(e){return new n(e!=null?new c(e):void 0)}static U64(e){return new n(e!=null?new d(e):void 0)}static U128(e){return new n(e!=null?new m(e):void 0)}static U256(e){return new n(e!=null?new U(e):void 0)}static Bool(e){return new n(e!=null?new l(e):void 0)}static MoveString(e){return new n(e!=null?new a(e):void 0)}static deserialize(e,r){let i=t.deserialize(e,r);return new n(i.values[0])}};export{t as a,a as b,z as c};
2
- //# sourceMappingURL=chunk-G56GPLTB.mjs.map
1
+ import{a as l,b as s,c as u,d as c,e as d,f as m,g as U}from"./chunk-QIAHBEEW.mjs";import{a as o}from"./chunk-52C73T26.mjs";import{b as z}from"./chunk-AOCNYMMX.mjs";var t=class n extends o{constructor(e){super();this.values=e}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){if(!(this.values[0]instanceof s)&&this.values[0]!==void 0)throw new Error("Script function arguments only accept u8 vectors");e.serializeU32AsUleb128(4),e.serialize(this)}static U8(e){let r;if(Array.isArray(e)&&typeof e[0]=="number")r=e;else if(typeof e=="string"){let i=z.fromHexInput(e);r=Array.from(i.toUint8Array())}else if(e instanceof Uint8Array)r=Array.from(e);else throw new Error("Invalid input type");return new n(r.map(i=>new s(i)))}static U16(e){return new n(e.map(r=>new u(r)))}static U32(e){return new n(e.map(r=>new c(r)))}static U64(e){return new n(e.map(r=>new d(r)))}static U128(e){return new n(e.map(r=>new m(r)))}static U256(e){return new n(e.map(r=>new U(r)))}static Bool(e){return new n(e.map(r=>new l(r)))}static MoveString(e){return new n(e.map(r=>new a(r)))}serialize(e){e.serializeVector(this.values)}static deserialize(e,r){let i=e.deserializeUleb128AsU32(),y=new Array;for(let w=0;w<i;w+=1)y.push(r.deserialize(e));return new n(y)}},a=class n extends o{constructor(e){super();this.value=e}serialize(e){e.serializeStr(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){let r=this.bcsToBytes().slice(1);t.U8(r).serializeForScriptFunction(e)}static deserialize(e){return new n(e.deserializeStr())}},f=class n extends o{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 n(e!=null?new s(e):void 0)}static U16(e){return new n(e!=null?new u(e):void 0)}static U32(e){return new n(e!=null?new c(e):void 0)}static U64(e){return new n(e!=null?new d(e):void 0)}static U128(e){return new n(e!=null?new m(e):void 0)}static U256(e){return new n(e!=null?new U(e):void 0)}static Bool(e){return new n(e!=null?new l(e):void 0)}static MoveString(e){return new n(e!=null?new a(e):void 0)}static deserialize(e,r){let i=t.deserialize(e,r);return new n(i.values[0])}};export{t as a,a as b,f as c};
2
+ //# sourceMappingURL=chunk-FS3NSGBF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-QJAI7DNA.mjs";import{a as c}from"./chunk-RIUFW2OG.mjs";import{b as i}from"./chunk-ASXXZH2D.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-UEKKYJGA.mjs.map
1
+ import{a as n}from"./chunk-ZPNCA4C7.mjs";import{a as c}from"./chunk-AP7UZTPZ.mjs";import{b as i}from"./chunk-Y2VA7F5D.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-G2QII3AT.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as A}from"./chunk-FC5MU6ZN.mjs";import{a as T}from"./chunk-HJYT6LDB.mjs";import{a as y}from"./chunk-5NWTYUKC.mjs";import{a as d}from"./chunk-3MFILHZT.mjs";import{d as g,e as o,h as m,i as p,j as f}from"./chunk-DGLW7OBS.mjs";import{a as i,b as s,c as r,d as e,e as c,f as u}from"./chunk-4AVC2RCH.mjs";var h=class{constructor(n){this.config=n,this.build=new y(this.config),this.simulate=new A(this.config),this.submit=new T(this.config),this.batch=new d(this.config)}async getTransactions(n){return i({aptosConfig:this.config,...n})}async getTransactionByVersion(n){return r({aptosConfig:this.config,...n})}async getTransactionByHash(n){return e({aptosConfig:this.config,...n})}async isPendingTransaction(n){return c({aptosConfig:this.config,...n})}async waitForTransaction(n){return u({aptosConfig:this.config,...n})}async getGasPriceEstimation(){return s({aptosConfig:this.config})}getSigningMessage(n){return g(n)}async publishPackageTransaction(n){return p({aptosConfig:this.config,...n})}async rotateAuthKey(n){return f({aptosConfig:this.config,...n})}sign(n){return o({...n})}signAsFeePayer(n){let{signer:t,transaction:a}=n;if(!a.feePayerAddress)throw new Error(`Transaction ${a} is not a Fee Payer transaction`);return a.feePayerAddress=t.accountAddress,o({signer:t,transaction:a})}async batchTransactionsForSingleAccount(n){try{let{sender:t,data:a,options:P}=n;this.batch.forSingleAccount({sender:t,data:a,options:P})}catch(t){throw new Error(`failed to submit transactions with error: ${t}`)}}async signAndSubmitTransaction(n){let{signer:t,transaction:a}=n;return m({aptosConfig:this.config,signer:t,transaction:a})}};export{h as a};
2
- //# sourceMappingURL=chunk-527DYQ3X.mjs.map
1
+ import{a as y}from"./chunk-HXN2WRUX.mjs";import{a as d}from"./chunk-ZKNM27TR.mjs";import{a as A}from"./chunk-QVKMFPAV.mjs";import{a as T}from"./chunk-647IOEXV.mjs";import{d as g,e as o,h as m,i as p,j as f}from"./chunk-KL6VJ3UK.mjs";import{a as i,b as s,c as r,d as e,e as c,g as u}from"./chunk-7CAEMK4R.mjs";var h=class{constructor(n){this.config=n,this.build=new y(this.config),this.simulate=new A(this.config),this.submit=new T(this.config),this.batch=new d(this.config)}async getTransactions(n){return i({aptosConfig:this.config,...n})}async getTransactionByVersion(n){return r({aptosConfig:this.config,...n})}async getTransactionByHash(n){return e({aptosConfig:this.config,...n})}async isPendingTransaction(n){return c({aptosConfig:this.config,...n})}async waitForTransaction(n){return u({aptosConfig:this.config,...n})}async getGasPriceEstimation(){return s({aptosConfig:this.config})}getSigningMessage(n){return g(n)}async publishPackageTransaction(n){return p({aptosConfig:this.config,...n})}async rotateAuthKey(n){return f({aptosConfig:this.config,...n})}sign(n){return o({...n})}signAsFeePayer(n){let{signer:t,transaction:a}=n;if(!a.feePayerAddress)throw new Error(`Transaction ${a} is not a Fee Payer transaction`);return a.feePayerAddress=t.accountAddress,o({signer:t,transaction:a})}async batchTransactionsForSingleAccount(n){try{let{sender:t,data:a,options:P}=n;this.batch.forSingleAccount({sender:t,data:a,options:P})}catch(t){throw new Error(`failed to submit transactions with error: ${t}`)}}async signAndSubmitTransaction(n){let{signer:t,transaction:a}=n;return m({aptosConfig:this.config,signer:t,transaction:a})}};export{h as a};
2
+ //# sourceMappingURL=chunk-GMVVQD72.mjs.map