@aptos-labs/ts-sdk 1.12.0 → 1.12.2

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 (231) hide show
  1. package/dist/common/index.js +1 -1
  2. package/dist/common/index.js.map +1 -1
  3. package/dist/esm/api/account.mjs +1 -1
  4. package/dist/esm/api/ans.mjs +1 -1
  5. package/dist/esm/api/aptos.mjs +1 -1
  6. package/dist/esm/api/coin.mjs +1 -1
  7. package/dist/esm/api/digitalAsset.mjs +1 -1
  8. package/dist/esm/api/event.mjs +1 -1
  9. package/dist/esm/api/faucet.mjs +1 -1
  10. package/dist/esm/api/fungibleAsset.mjs +1 -1
  11. package/dist/esm/api/general.mjs +1 -1
  12. package/dist/esm/api/index.mjs +1 -1
  13. package/dist/esm/api/staking.mjs +1 -1
  14. package/dist/esm/api/transaction.mjs +1 -1
  15. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  16. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  17. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  18. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  19. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  20. package/dist/esm/api/utils.mjs +1 -1
  21. package/dist/esm/bcs/index.mjs +1 -1
  22. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  23. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  24. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  25. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  26. package/dist/esm/bcs/serializer.mjs +1 -1
  27. package/dist/esm/{chunk-X3QW43I2.mjs → chunk-2EZJOBD2.mjs} +2 -2
  28. package/dist/esm/{chunk-LF6IQT54.mjs → chunk-35EWRSDK.mjs} +2 -2
  29. package/dist/esm/{chunk-4KMISR2H.mjs → chunk-36QXVFR5.mjs} +2 -2
  30. package/dist/esm/{chunk-JVBXZ6OJ.mjs → chunk-3AYBWD76.mjs} +2 -2
  31. package/dist/esm/{chunk-3D7GOEFD.mjs → chunk-45ZZWQ7X.mjs} +2 -2
  32. package/dist/esm/{chunk-R4ERAOCM.mjs → chunk-4ILXLBGX.mjs} +2 -2
  33. package/dist/esm/{chunk-F7J7ZW4H.mjs → chunk-4NHWV5AI.mjs} +2 -2
  34. package/dist/esm/{chunk-WNVUG2UF.mjs → chunk-5EN52MUT.mjs} +2 -2
  35. package/dist/esm/{chunk-O3YFW4T3.mjs → chunk-5GKROFZ4.mjs} +2 -2
  36. package/dist/esm/{chunk-JV2UOHGR.mjs → chunk-5RUPEEIG.mjs} +2 -2
  37. package/dist/esm/{chunk-3GTT6K3X.mjs → chunk-6APZ5TPE.mjs} +2 -2
  38. package/dist/esm/{chunk-WXXASZQ4.mjs → chunk-6BR5UJDT.mjs} +2 -2
  39. package/dist/esm/{chunk-NLMMCXLR.mjs → chunk-6ILDDGAX.mjs} +2 -2
  40. package/dist/esm/{chunk-J43BXPJ3.mjs → chunk-AEVRPB4E.mjs} +2 -2
  41. package/dist/esm/{chunk-QAMK2MSI.mjs → chunk-ARGODLTZ.mjs} +2 -2
  42. package/dist/esm/{chunk-Y2AFC3E6.mjs → chunk-ASXXZH2D.mjs} +2 -2
  43. package/dist/esm/{chunk-WZSVQBPA.mjs → chunk-B7X6PSE7.mjs} +2 -2
  44. package/dist/esm/{chunk-MV7RDJFK.mjs → chunk-C7YANDB2.mjs} +2 -2
  45. package/dist/esm/{chunk-EIXGNR6D.mjs → chunk-CAGDOGXS.mjs} +2 -2
  46. package/dist/esm/{chunk-2XVDVF5C.mjs → chunk-CEHCDA3G.mjs} +2 -2
  47. package/dist/esm/chunk-CXR7MOBW.mjs +2 -0
  48. package/dist/esm/{chunk-VU2W3ZLX.mjs.map → chunk-CXR7MOBW.mjs.map} +1 -1
  49. package/dist/esm/{chunk-7JZWCHLH.mjs → chunk-DUP7XY5P.mjs} +2 -2
  50. package/dist/esm/{chunk-KPDWT3LC.mjs → chunk-EKR6HLSN.mjs} +2 -2
  51. package/dist/esm/{chunk-CHVWOPVA.mjs → chunk-EV75CYGN.mjs} +2 -2
  52. package/dist/esm/{chunk-JV2PBG6G.mjs → chunk-FKTXWOKR.mjs} +2 -2
  53. package/dist/esm/{chunk-YJIRT3GJ.mjs → chunk-G56GPLTB.mjs} +2 -2
  54. package/dist/esm/{chunk-XMJEWG3I.mjs → chunk-GKGTODGE.mjs} +2 -2
  55. package/dist/esm/{chunk-ZPS4RIFU.mjs → chunk-GQR35QW3.mjs} +2 -2
  56. package/dist/esm/{chunk-Y52TZMRO.mjs → chunk-IHPWATYH.mjs} +2 -2
  57. package/dist/esm/{chunk-VUZDLGDK.mjs → chunk-IYSHHN5A.mjs} +2 -2
  58. package/dist/esm/{chunk-KJI5PY5Z.mjs → chunk-IZF6DFAL.mjs} +2 -2
  59. package/dist/esm/{chunk-QMFBU2CG.mjs → chunk-JOLLCFQL.mjs} +2 -2
  60. package/dist/esm/{chunk-JNDRFTEA.mjs → chunk-KAGLWBIJ.mjs} +2 -2
  61. package/dist/esm/{chunk-EOQOTFO7.mjs → chunk-KLAYDUFD.mjs} +2 -2
  62. package/dist/esm/{chunk-6X6G2RC3.mjs → chunk-KS7UY4W5.mjs} +2 -2
  63. package/dist/esm/{chunk-DAC5J2BG.mjs → chunk-KXR3IUJ7.mjs} +2 -2
  64. package/dist/esm/{chunk-RVUPGO4R.mjs → chunk-LPB7SZHL.mjs} +2 -2
  65. package/dist/esm/{chunk-JE7INUQ2.mjs → chunk-MJPUASSD.mjs} +2 -2
  66. package/dist/esm/{chunk-D5Q7BI3J.mjs → chunk-MXO53VAI.mjs} +2 -2
  67. package/dist/esm/{chunk-FNKDXPPQ.mjs → chunk-N3U47Y6Y.mjs} +2 -2
  68. package/dist/esm/{chunk-HTTPFWYL.mjs → chunk-OWXKKVWD.mjs} +2 -2
  69. package/dist/esm/{chunk-P2CIREOD.mjs → chunk-PF57EOJY.mjs} +2 -2
  70. package/dist/esm/{chunk-NLPPL42P.mjs → chunk-Q73VKL3A.mjs} +2 -2
  71. package/dist/esm/{chunk-6F7X2C22.mjs → chunk-QJAI7DNA.mjs} +2 -2
  72. package/dist/esm/{chunk-UEI62FBQ.mjs → chunk-QRS4DGP3.mjs} +2 -2
  73. package/dist/esm/{chunk-YMFCBU4L.mjs → chunk-RIUFW2OG.mjs} +2 -2
  74. package/dist/esm/{chunk-HOTGXRPG.mjs → chunk-SK5TPUAN.mjs} +2 -2
  75. package/dist/esm/{chunk-NMASPJTH.mjs → chunk-SOBCWGBM.mjs} +2 -2
  76. package/dist/esm/{chunk-5NSXEM3O.mjs → chunk-SRDIYE3M.mjs} +2 -2
  77. package/dist/esm/{chunk-PE6R6XQV.mjs → chunk-SWZOGZJ6.mjs} +2 -2
  78. package/dist/esm/{chunk-2MRYBOYC.mjs → chunk-T6J2LHHS.mjs} +2 -2
  79. package/dist/esm/{chunk-CPQPVRKV.mjs → chunk-TTUXAKCV.mjs} +2 -2
  80. package/dist/esm/{chunk-R3ELNYY5.mjs → chunk-TVHLZDCO.mjs} +2 -2
  81. package/dist/esm/{chunk-S5AGI7RQ.mjs → chunk-U3YYSIIT.mjs} +2 -2
  82. package/dist/esm/{chunk-6MLNYBCP.mjs → chunk-U43KR4TW.mjs} +2 -2
  83. package/dist/esm/{chunk-4J5V4M3P.mjs → chunk-UEKKYJGA.mjs} +2 -2
  84. package/dist/esm/{chunk-AFTMLXYT.mjs → chunk-UGPALAPN.mjs} +2 -2
  85. package/dist/esm/{chunk-LSKVPMOF.mjs → chunk-URTTOOEM.mjs} +2 -2
  86. package/dist/esm/{chunk-HTWJVZZ5.mjs → chunk-V6FZ7WZH.mjs} +2 -2
  87. package/dist/esm/{chunk-7PNFDDIG.mjs → chunk-W3V4IGGB.mjs} +2 -2
  88. package/dist/esm/{chunk-L6KXN3YD.mjs → chunk-WHA7RISE.mjs} +2 -2
  89. package/dist/esm/{chunk-RP66QS6R.mjs → chunk-WMJXRWVE.mjs} +2 -2
  90. package/dist/esm/{chunk-5LI6PUQN.mjs → chunk-XDXI3TRT.mjs} +2 -2
  91. package/dist/esm/{chunk-IQSAG5Y5.mjs → chunk-XX5J7KKC.mjs} +2 -2
  92. package/dist/esm/{chunk-C67SYOXM.mjs → chunk-Y2MYVQVT.mjs} +2 -2
  93. package/dist/esm/{chunk-XQMUVQI3.mjs → chunk-YZGEWPDE.mjs} +2 -2
  94. package/dist/esm/{chunk-UCDLUHVW.mjs → chunk-ZBT4HP6E.mjs} +2 -2
  95. package/dist/esm/{chunk-MS76A6LX.mjs → chunk-ZTIRBBNS.mjs} +2 -2
  96. package/dist/esm/client/core.mjs +1 -1
  97. package/dist/esm/client/get.mjs +1 -1
  98. package/dist/esm/client/index.mjs +1 -1
  99. package/dist/esm/client/post.mjs +1 -1
  100. package/dist/esm/core/account/Account.mjs +1 -1
  101. package/dist/esm/core/account/Ed25519Account.mjs +1 -1
  102. package/dist/esm/core/account/SingleKeyAccount.mjs +1 -1
  103. package/dist/esm/core/account/index.mjs +1 -1
  104. package/dist/esm/core/account/utils/address.mjs +1 -1
  105. package/dist/esm/core/account/utils/index.mjs +1 -1
  106. package/dist/esm/core/accountAddress.mjs +1 -1
  107. package/dist/esm/core/authenticationKey.mjs +1 -1
  108. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  109. package/dist/esm/core/crypto/index.mjs +1 -1
  110. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  111. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  112. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  113. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  114. package/dist/esm/core/crypto/signature.mjs +1 -1
  115. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  116. package/dist/esm/core/index.mjs +1 -1
  117. package/dist/esm/index.mjs +1 -1
  118. package/dist/esm/internal/account.d.mts +1 -1
  119. package/dist/esm/internal/account.mjs +1 -1
  120. package/dist/esm/internal/ans.d.mts +1 -1
  121. package/dist/esm/internal/ans.mjs +1 -1
  122. package/dist/esm/internal/coin.mjs +1 -1
  123. package/dist/esm/internal/digitalAsset.d.mts +2 -2
  124. package/dist/esm/internal/digitalAsset.mjs +1 -1
  125. package/dist/esm/internal/event.d.mts +1 -1
  126. package/dist/esm/internal/event.mjs +1 -1
  127. package/dist/esm/internal/faucet.mjs +1 -1
  128. package/dist/esm/internal/fungibleAsset.d.mts +1 -1
  129. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  130. package/dist/esm/internal/general.mjs +1 -1
  131. package/dist/esm/internal/staking.d.mts +2 -2
  132. package/dist/esm/internal/staking.mjs +1 -1
  133. package/dist/esm/internal/transaction.mjs +1 -1
  134. package/dist/esm/internal/transactionSubmission.d.mts +4 -4
  135. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  136. package/dist/esm/internal/view.mjs +1 -1
  137. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  138. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  139. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  140. package/dist/esm/transactions/index.mjs +1 -1
  141. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  142. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  143. package/dist/esm/transactions/instances/index.mjs +1 -1
  144. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  145. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  146. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  147. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  148. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  149. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  150. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  151. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  152. package/dist/esm/transactions/management/index.mjs +1 -1
  153. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  154. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  155. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  156. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  157. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  158. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  159. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  160. package/dist/esm/version.d.mts +1 -1
  161. package/dist/esm/version.mjs +1 -1
  162. package/package.json +1 -1
  163. package/src/version.ts +1 -1
  164. package/dist/esm/chunk-VU2W3ZLX.mjs +0 -2
  165. /package/dist/esm/{chunk-X3QW43I2.mjs.map → chunk-2EZJOBD2.mjs.map} +0 -0
  166. /package/dist/esm/{chunk-LF6IQT54.mjs.map → chunk-35EWRSDK.mjs.map} +0 -0
  167. /package/dist/esm/{chunk-4KMISR2H.mjs.map → chunk-36QXVFR5.mjs.map} +0 -0
  168. /package/dist/esm/{chunk-JVBXZ6OJ.mjs.map → chunk-3AYBWD76.mjs.map} +0 -0
  169. /package/dist/esm/{chunk-3D7GOEFD.mjs.map → chunk-45ZZWQ7X.mjs.map} +0 -0
  170. /package/dist/esm/{chunk-R4ERAOCM.mjs.map → chunk-4ILXLBGX.mjs.map} +0 -0
  171. /package/dist/esm/{chunk-F7J7ZW4H.mjs.map → chunk-4NHWV5AI.mjs.map} +0 -0
  172. /package/dist/esm/{chunk-WNVUG2UF.mjs.map → chunk-5EN52MUT.mjs.map} +0 -0
  173. /package/dist/esm/{chunk-O3YFW4T3.mjs.map → chunk-5GKROFZ4.mjs.map} +0 -0
  174. /package/dist/esm/{chunk-JV2UOHGR.mjs.map → chunk-5RUPEEIG.mjs.map} +0 -0
  175. /package/dist/esm/{chunk-3GTT6K3X.mjs.map → chunk-6APZ5TPE.mjs.map} +0 -0
  176. /package/dist/esm/{chunk-WXXASZQ4.mjs.map → chunk-6BR5UJDT.mjs.map} +0 -0
  177. /package/dist/esm/{chunk-NLMMCXLR.mjs.map → chunk-6ILDDGAX.mjs.map} +0 -0
  178. /package/dist/esm/{chunk-J43BXPJ3.mjs.map → chunk-AEVRPB4E.mjs.map} +0 -0
  179. /package/dist/esm/{chunk-QAMK2MSI.mjs.map → chunk-ARGODLTZ.mjs.map} +0 -0
  180. /package/dist/esm/{chunk-Y2AFC3E6.mjs.map → chunk-ASXXZH2D.mjs.map} +0 -0
  181. /package/dist/esm/{chunk-WZSVQBPA.mjs.map → chunk-B7X6PSE7.mjs.map} +0 -0
  182. /package/dist/esm/{chunk-MV7RDJFK.mjs.map → chunk-C7YANDB2.mjs.map} +0 -0
  183. /package/dist/esm/{chunk-EIXGNR6D.mjs.map → chunk-CAGDOGXS.mjs.map} +0 -0
  184. /package/dist/esm/{chunk-2XVDVF5C.mjs.map → chunk-CEHCDA3G.mjs.map} +0 -0
  185. /package/dist/esm/{chunk-7JZWCHLH.mjs.map → chunk-DUP7XY5P.mjs.map} +0 -0
  186. /package/dist/esm/{chunk-KPDWT3LC.mjs.map → chunk-EKR6HLSN.mjs.map} +0 -0
  187. /package/dist/esm/{chunk-CHVWOPVA.mjs.map → chunk-EV75CYGN.mjs.map} +0 -0
  188. /package/dist/esm/{chunk-JV2PBG6G.mjs.map → chunk-FKTXWOKR.mjs.map} +0 -0
  189. /package/dist/esm/{chunk-YJIRT3GJ.mjs.map → chunk-G56GPLTB.mjs.map} +0 -0
  190. /package/dist/esm/{chunk-XMJEWG3I.mjs.map → chunk-GKGTODGE.mjs.map} +0 -0
  191. /package/dist/esm/{chunk-ZPS4RIFU.mjs.map → chunk-GQR35QW3.mjs.map} +0 -0
  192. /package/dist/esm/{chunk-Y52TZMRO.mjs.map → chunk-IHPWATYH.mjs.map} +0 -0
  193. /package/dist/esm/{chunk-VUZDLGDK.mjs.map → chunk-IYSHHN5A.mjs.map} +0 -0
  194. /package/dist/esm/{chunk-KJI5PY5Z.mjs.map → chunk-IZF6DFAL.mjs.map} +0 -0
  195. /package/dist/esm/{chunk-QMFBU2CG.mjs.map → chunk-JOLLCFQL.mjs.map} +0 -0
  196. /package/dist/esm/{chunk-JNDRFTEA.mjs.map → chunk-KAGLWBIJ.mjs.map} +0 -0
  197. /package/dist/esm/{chunk-EOQOTFO7.mjs.map → chunk-KLAYDUFD.mjs.map} +0 -0
  198. /package/dist/esm/{chunk-6X6G2RC3.mjs.map → chunk-KS7UY4W5.mjs.map} +0 -0
  199. /package/dist/esm/{chunk-DAC5J2BG.mjs.map → chunk-KXR3IUJ7.mjs.map} +0 -0
  200. /package/dist/esm/{chunk-RVUPGO4R.mjs.map → chunk-LPB7SZHL.mjs.map} +0 -0
  201. /package/dist/esm/{chunk-JE7INUQ2.mjs.map → chunk-MJPUASSD.mjs.map} +0 -0
  202. /package/dist/esm/{chunk-D5Q7BI3J.mjs.map → chunk-MXO53VAI.mjs.map} +0 -0
  203. /package/dist/esm/{chunk-FNKDXPPQ.mjs.map → chunk-N3U47Y6Y.mjs.map} +0 -0
  204. /package/dist/esm/{chunk-HTTPFWYL.mjs.map → chunk-OWXKKVWD.mjs.map} +0 -0
  205. /package/dist/esm/{chunk-P2CIREOD.mjs.map → chunk-PF57EOJY.mjs.map} +0 -0
  206. /package/dist/esm/{chunk-NLPPL42P.mjs.map → chunk-Q73VKL3A.mjs.map} +0 -0
  207. /package/dist/esm/{chunk-6F7X2C22.mjs.map → chunk-QJAI7DNA.mjs.map} +0 -0
  208. /package/dist/esm/{chunk-UEI62FBQ.mjs.map → chunk-QRS4DGP3.mjs.map} +0 -0
  209. /package/dist/esm/{chunk-YMFCBU4L.mjs.map → chunk-RIUFW2OG.mjs.map} +0 -0
  210. /package/dist/esm/{chunk-HOTGXRPG.mjs.map → chunk-SK5TPUAN.mjs.map} +0 -0
  211. /package/dist/esm/{chunk-NMASPJTH.mjs.map → chunk-SOBCWGBM.mjs.map} +0 -0
  212. /package/dist/esm/{chunk-5NSXEM3O.mjs.map → chunk-SRDIYE3M.mjs.map} +0 -0
  213. /package/dist/esm/{chunk-PE6R6XQV.mjs.map → chunk-SWZOGZJ6.mjs.map} +0 -0
  214. /package/dist/esm/{chunk-2MRYBOYC.mjs.map → chunk-T6J2LHHS.mjs.map} +0 -0
  215. /package/dist/esm/{chunk-CPQPVRKV.mjs.map → chunk-TTUXAKCV.mjs.map} +0 -0
  216. /package/dist/esm/{chunk-R3ELNYY5.mjs.map → chunk-TVHLZDCO.mjs.map} +0 -0
  217. /package/dist/esm/{chunk-S5AGI7RQ.mjs.map → chunk-U3YYSIIT.mjs.map} +0 -0
  218. /package/dist/esm/{chunk-6MLNYBCP.mjs.map → chunk-U43KR4TW.mjs.map} +0 -0
  219. /package/dist/esm/{chunk-4J5V4M3P.mjs.map → chunk-UEKKYJGA.mjs.map} +0 -0
  220. /package/dist/esm/{chunk-AFTMLXYT.mjs.map → chunk-UGPALAPN.mjs.map} +0 -0
  221. /package/dist/esm/{chunk-LSKVPMOF.mjs.map → chunk-URTTOOEM.mjs.map} +0 -0
  222. /package/dist/esm/{chunk-HTWJVZZ5.mjs.map → chunk-V6FZ7WZH.mjs.map} +0 -0
  223. /package/dist/esm/{chunk-7PNFDDIG.mjs.map → chunk-W3V4IGGB.mjs.map} +0 -0
  224. /package/dist/esm/{chunk-L6KXN3YD.mjs.map → chunk-WHA7RISE.mjs.map} +0 -0
  225. /package/dist/esm/{chunk-RP66QS6R.mjs.map → chunk-WMJXRWVE.mjs.map} +0 -0
  226. /package/dist/esm/{chunk-5LI6PUQN.mjs.map → chunk-XDXI3TRT.mjs.map} +0 -0
  227. /package/dist/esm/{chunk-IQSAG5Y5.mjs.map → chunk-XX5J7KKC.mjs.map} +0 -0
  228. /package/dist/esm/{chunk-C67SYOXM.mjs.map → chunk-Y2MYVQVT.mjs.map} +0 -0
  229. /package/dist/esm/{chunk-XQMUVQI3.mjs.map → chunk-YZGEWPDE.mjs.map} +0 -0
  230. /package/dist/esm/{chunk-UCDLUHVW.mjs.map → chunk-ZBT4HP6E.mjs.map} +0 -0
  231. /package/dist/esm/{chunk-MS76A6LX.mjs.map → chunk-ZTIRBBNS.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as x,b as c,c as w,d as g,e as M,f as C,g as O,h,i as _,k as V,l as G,m as j,n as k,o as z,p as D,r as i,s as L}from"./chunk-D5Q7BI3J.mjs";import{c as A}from"./chunk-JE7INUQ2.mjs";import{n as I}from"./chunk-S5AGI7RQ.mjs";import{c as p}from"./chunk-JV2PBG6G.mjs";import{a as o,b as S,c as T}from"./chunk-YJIRT3GJ.mjs";import{a as d,b as E,c as B,d as v,e as $,f as b,g as F}from"./chunk-5NSXEM3O.mjs";import{b as U}from"./chunk-UEI62FBQ.mjs";var R=new TextEncoder;function Z(n){return n?.map(e=>c(e)?A(e):e)??[]}async function P(n,e,t,u){let r=await p({aptosConfig:u,accountAddress:n,moduleName:e});if(r.abi)return r.abi.exposed_functions.find(f=>f.name===t)}async function N(n,e,t,u){let r=await P(n,e,t,u);if(!r)throw new Error(`Could not find entry function ABI for '${n}::${e}::${t}'`);if(!r.is_entry)throw new Error(`'${n}::${e}::${t}' is not an entry function`);let f=L(r),y=[];for(let s=f;s<r.params.length;s+=1)y.push(A(r.params[s],{allowGenerics:!0}));return{signers:f,typeParameters:r.generic_type_params,parameters:y}}async function a(n,e,t,u){let r=await P(n,e,t,u);if(!r)throw new Error(`Could not find view function ABI for '${n}::${e}::${t}'`);if(!r.is_view)throw new Error(`'${n}::${e}::${t}' is not an view function`);let f=[];for(let s=0;s<r.params.length;s+=1)f.push(A(r.params[s],{allowGenerics:!0}));let y=[];for(let s=0;s<r.return.length;s+=1)y.push(A(r.return[s],{allowGenerics:!0}));return{typeParameters:r.generic_type_params,parameters:f,returnTypes:y}}function nn(n,e,t,u,r){if(u>=e.parameters.length)throw new Error(`Too many arguments for '${n}', expected ${e.parameters.length}`);let f=e.parameters[u];return l(t,f,u,r)}function l(n,e,t,u){return C(n)?(m(e,n,t),n):X(n,e,t,u)}function X(n,e,t,u){if(e.isBool()){if(x(n))return new d(n);i("boolean",t)}if(e.isAddress()){if(c(n))return U.fromString(n);i("string | AccountAddress",t)}if(e.isU8()){if(w(n))return new E(n);i("number",t)}if(e.isU16()){if(w(n))return new B(n);i("number",t)}if(e.isU32()){if(w(n))return new v(n);i("number",t)}if(e.isU64()){if(g(n))return new $(BigInt(n));i("bigint | number | string",t)}if(e.isU128()){if(g(n))return new b(BigInt(n));i("bigint | number | string",t)}if(e.isU256()){if(g(n))return new F(BigInt(n));i("bigint | number | string",t)}if(e.isGeneric()){let r=e.value;if(r<0||r>=u.length)throw new Error(`Generic argument ${e.toString()} is invalid for argument ${t}`);return l(n,u[r],t,u)}if(e.isVector()){if(e.value.isU8()){if(c(n))return o.U8(R.encode(n));if(n instanceof Uint8Array)return o.U8(n);if(n instanceof ArrayBuffer)return o.U8(new Uint8Array(n))}if(Array.isArray(n))return new o(n.map(r=>l(r,e.value,t,u)));throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}if(e.isStruct()){if(e.isString()){if(c(n))return new S(n);i("string",t)}if(e.isObject()){if(c(n))return U.fromString(n);i("string | AccountAddress",t)}if(e.isOption())return M(n)?new T(null):new T(l(n,e.value.typeArgs[0],t,u));throw new Error(`Unsupported struct input type for argument ${t}, type '${e.toString()}'`)}throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}function m(n,e,t){if(n.isBool()){if(O(e))return;i("Bool",t)}if(n.isAddress()){if(h(e))return;i("AccountAddress",t)}if(n.isU8()){if(V(e))return;i("U8",t)}if(n.isU16()){if(G(e))return;i("U16",t)}if(n.isU32()){if(j(e))return;i("U32",t)}if(n.isU64()){if(k(e))return;i("U64",t)}if(n.isU128()){if(z(e))return;i("U128",t)}if(n.isU256()){if(D(e))return;i("U256",t)}if(n.isVector()){if(e instanceof o){e.values.length>0&&m(n.value,e.values[0],t);return}i("MoveVector",t)}if(n instanceof I){if(n.isString()){if(_(e))return;i("MoveString",t)}if(n.isObject()){if(h(e))return;i("AccountAddress",t)}if(n.isOption()){if(e instanceof T){e.value!==void 0&&m(n.value.typeArgs[0],e.value,t);return}i("MoveOption",t)}}throw new Error(`Type mismatch for argument ${t}, expected '${n.toString()}'`)}export{Z as a,P as b,N as c,a as d,nn as e,l as f};
2
- //# sourceMappingURL=chunk-NLMMCXLR.mjs.map
1
+ import{a as x,b as c,c as w,d as g,e as M,f as C,g as O,h,i as _,k as V,l as G,m as j,n as k,o as z,p as D,r as i,s as L}from"./chunk-MXO53VAI.mjs";import{c as A}from"./chunk-MJPUASSD.mjs";import{n as I}from"./chunk-U3YYSIIT.mjs";import{c as p}from"./chunk-FKTXWOKR.mjs";import{b as U}from"./chunk-QRS4DGP3.mjs";import{a as o,b as S,c as T}from"./chunk-G56GPLTB.mjs";import{a as d,b as E,c as B,d as v,e as $,f as b,g as F}from"./chunk-SRDIYE3M.mjs";var R=new TextEncoder;function Z(n){return n?.map(e=>c(e)?A(e):e)??[]}async function P(n,e,t,u){let r=await p({aptosConfig:u,accountAddress:n,moduleName:e});if(r.abi)return r.abi.exposed_functions.find(f=>f.name===t)}async function N(n,e,t,u){let r=await P(n,e,t,u);if(!r)throw new Error(`Could not find entry function ABI for '${n}::${e}::${t}'`);if(!r.is_entry)throw new Error(`'${n}::${e}::${t}' is not an entry function`);let f=L(r),y=[];for(let s=f;s<r.params.length;s+=1)y.push(A(r.params[s],{allowGenerics:!0}));return{signers:f,typeParameters:r.generic_type_params,parameters:y}}async function a(n,e,t,u){let r=await P(n,e,t,u);if(!r)throw new Error(`Could not find view function ABI for '${n}::${e}::${t}'`);if(!r.is_view)throw new Error(`'${n}::${e}::${t}' is not an view function`);let f=[];for(let s=0;s<r.params.length;s+=1)f.push(A(r.params[s],{allowGenerics:!0}));let y=[];for(let s=0;s<r.return.length;s+=1)y.push(A(r.return[s],{allowGenerics:!0}));return{typeParameters:r.generic_type_params,parameters:f,returnTypes:y}}function nn(n,e,t,u,r){if(u>=e.parameters.length)throw new Error(`Too many arguments for '${n}', expected ${e.parameters.length}`);let f=e.parameters[u];return l(t,f,u,r)}function l(n,e,t,u){return C(n)?(m(e,n,t),n):X(n,e,t,u)}function X(n,e,t,u){if(e.isBool()){if(x(n))return new d(n);i("boolean",t)}if(e.isAddress()){if(c(n))return U.fromString(n);i("string | AccountAddress",t)}if(e.isU8()){if(w(n))return new E(n);i("number",t)}if(e.isU16()){if(w(n))return new B(n);i("number",t)}if(e.isU32()){if(w(n))return new v(n);i("number",t)}if(e.isU64()){if(g(n))return new $(BigInt(n));i("bigint | number | string",t)}if(e.isU128()){if(g(n))return new b(BigInt(n));i("bigint | number | string",t)}if(e.isU256()){if(g(n))return new F(BigInt(n));i("bigint | number | string",t)}if(e.isGeneric()){let r=e.value;if(r<0||r>=u.length)throw new Error(`Generic argument ${e.toString()} is invalid for argument ${t}`);return l(n,u[r],t,u)}if(e.isVector()){if(e.value.isU8()){if(c(n))return o.U8(R.encode(n));if(n instanceof Uint8Array)return o.U8(n);if(n instanceof ArrayBuffer)return o.U8(new Uint8Array(n))}if(Array.isArray(n))return new o(n.map(r=>l(r,e.value,t,u)));throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}if(e.isStruct()){if(e.isString()){if(c(n))return new S(n);i("string",t)}if(e.isObject()){if(c(n))return U.fromString(n);i("string | AccountAddress",t)}if(e.isOption())return M(n)?new T(null):new T(l(n,e.value.typeArgs[0],t,u));throw new Error(`Unsupported struct input type for argument ${t}, type '${e.toString()}'`)}throw new Error(`Type mismatch for argument ${t}, type '${e.toString()}'`)}function m(n,e,t){if(n.isBool()){if(O(e))return;i("Bool",t)}if(n.isAddress()){if(h(e))return;i("AccountAddress",t)}if(n.isU8()){if(V(e))return;i("U8",t)}if(n.isU16()){if(G(e))return;i("U16",t)}if(n.isU32()){if(j(e))return;i("U32",t)}if(n.isU64()){if(k(e))return;i("U64",t)}if(n.isU128()){if(z(e))return;i("U128",t)}if(n.isU256()){if(D(e))return;i("U256",t)}if(n.isVector()){if(e instanceof o){e.values.length>0&&m(n.value,e.values[0],t);return}i("MoveVector",t)}if(n instanceof I){if(n.isString()){if(_(e))return;i("MoveString",t)}if(n.isObject()){if(h(e))return;i("AccountAddress",t)}if(n.isOption()){if(e instanceof T){e.value!==void 0&&m(n.value.typeArgs[0],e.value,t);return}i("MoveOption",t)}}throw new Error(`Type mismatch for argument ${t}, expected '${n.toString()}'`)}export{Z as a,P as b,N as c,a as d,nn as e,l as f};
2
+ //# sourceMappingURL=chunk-6ILDDGAX.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-LSKVPMOF.mjs";import{f as M}from"./chunk-NLMMCXLR.mjs";import{c as V}from"./chunk-JE7INUQ2.mjs";import{b as w,f as v,i as G,l as A,m as f,n as s,q as p,s as g}from"./chunk-S5AGI7RQ.mjs";import{a as I,b as u}from"./chunk-YJIRT3GJ.mjs";import{a as T,e as S}from"./chunk-5NSXEM3O.mjs";import{b as c}from"./chunk-UEI62FBQ.mjs";import{d as O}from"./chunk-56CNRT2K.mjs";import{f as b}from"./chunk-CPQPVRKV.mjs";import{n as h,w as E,x,y as q}from"./chunk-S4SEFF4K.mjs";var C={BOOLEAN:"bool",U8:"u8",U16:"u16",U32:"u32",U64:"u64",U128:"u128",U256:"u256",ADDRESS:"address",STRING:"0x1::string::String",ARRAY:"vector<u8>"},m="0x4::token::Token";async function _t(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:q,variables:{where_condition:e}},originMethod:"getDigitalAssetData"})).current_token_datas_v2[0]}async function Pt(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()},amount:{_gt:0}};return(await b({aptosConfig:o,query:{query:x,variables:{where_condition:e}},originMethod:"getCurrentDigitalAssetOwnership"})).current_token_ownerships_v2[0]}async function kt(t){let{aptosConfig:o,ownerAddress:n,options:e}=t,r={owner_address:{_eq:c.from(n).toStringLong()},amount:{_gt:0}},i={query:x,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await b({aptosConfig:o,query:i,originMethod:"getOwnedDigitalAssets"})).current_token_ownerships_v2}async function Dt(t){let{aptosConfig:o,digitalAssetAddress:n,options:e}=t,r={token_data_id:{_eq:c.from(n).toStringLong()}},i={query:E,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await b({aptosConfig:o,query:i,originMethod:"getDigitalAssetActivity"})).token_activities_v2}var Q={typeParameters:[],parameters:[new s(p()),new v,new s(p()),new s(p()),new w,new w,new w,new w,new w,new w,new w,new w,new w,new v,new v]};async function St(t){let{aptosConfig:o,options:n,creator:e}=t;return d({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::create_collection",functionArguments:[new u(t.description),new S(t.maxSupply??O),new u(t.name),new u(t.uri),new T(t.mutableDescription??!0),new T(t.mutableRoyalty??!0),new T(t.mutableURI??!0),new T(t.mutableTokenDescription??!0),new T(t.mutableTokenName??!0),new T(t.mutableTokenProperties??!0),new T(t.mutableTokenURI??!0),new T(t.tokensBurnableByCreator??!0),new T(t.tokensFreezableByCreator??!0),new S(t.royaltyNumerator??0),new S(t.royaltyDenominator??1)],abi:Q},options:n})}async function U(t){let{aptosConfig:o,creatorAddress:n,collectionName:e,options:r}=t,i=c.from(n),a={collection_name:{_eq:e},creator_address:{_eq:i.toStringLong()}};return r?.tokenStandard&&(a.token_standard={_eq:r?.tokenStandard??"v2"}),(await b({aptosConfig:o,query:{query:h,variables:{where_condition:a}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function vt(t){let{aptosConfig:o,collectionId:n}=t,r={collection_id:{_eq:c.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:h,variables:{where_condition:r}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function ht(t){return(await U(t)).collection_id}var F={typeParameters:[],parameters:[new s(p()),new s(p()),new s(p()),new s(p()),new f(new s(p())),new f(new s(p())),new f(f.u8())]};async function xt(t){let{aptosConfig:o,options:n,creator:e,collection:r,description:i,name:a,uri:l,propertyKeys:y,propertyTypes:P,propertyValues:_}=t,k=P?.map(D=>C[D]);return d({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::mint",functionArguments:[new u(r),new u(i),new u(a),new u(l),I.MoveString(y??[]),I.MoveString(k??[]),R(_??[],k??[])],abi:F},options:n})}var N={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new G]};async function Gt(t){let{aptosConfig:o,sender:n,digitalAssetAddress:e,recipient:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x1::object::transfer",typeArguments:[i??m],functionArguments:[c.from(e),c.from(r)],abi:N},options:a})}var Y={typeParameters:[],parameters:[new s(p()),new s(p()),new s(p()),new s(p()),new f(new s(p())),new f(new s(p())),new f(f.u8()),new G]};async function Bt(t){let{aptosConfig:o,account:n,collection:e,description:r,name:i,uri:a,recipient:l,propertyKeys:y,propertyTypes:P,propertyValues:_,options:k}=t;if(y?.length!==_?.length)throw new Error("Property keys and property values counts do not match");if(P?.length!==_?.length)throw new Error("Property types and property values counts do not match");let D=P?.map(K=>C[K]);return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::mint_soul_bound",functionArguments:[e,r,i,a,I.MoveString(y??[]),I.MoveString(D??[]),R(_??[],D??[]),l],abi:Y},options:k})}var z={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function Ot(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::burn",typeArguments:[r??m],functionArguments:[c.from(e)],abi:z},options:i})}var L={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function Et(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::freeze_transfer",typeArguments:[r??m],functionArguments:[e],abi:L},options:i})}var j={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function qt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::unfreeze_transfer",typeArguments:[r??m],functionArguments:[e],abi:j},options:i})}var X={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Vt(t){let{aptosConfig:o,creator:n,description:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_description",typeArguments:[i??m],functionArguments:[c.from(r),new u(e)],abi:X},options:a})}var H={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Mt(t){let{aptosConfig:o,creator:n,name:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_name",typeArguments:[i??m],functionArguments:[c.from(r),new u(e)],abi:H},options:a})}var J={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Rt(t){let{aptosConfig:o,creator:n,uri:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_uri",typeArguments:[i??m],functionArguments:[c.from(r),new u(e)],abi:J},options:a})}var W={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p()),new s(p()),f.u8()]};async function Kt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_property",typeArguments:[l??m],functionArguments:[c.from(a),new u(e),new u(C[r]),I.U8(B(i,C[r]))],abi:W},options:y})}var Z={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Qt(t){let{aptosConfig:o,creator:n,propertyKey:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::remove_property",typeArguments:[i??m],functionArguments:[c.from(r),new u(e)],abi:Z},options:a})}var $={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p()),new s(p()),f.u8()]};async function Ut(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_property",typeArguments:[l??m],functionArguments:[c.from(a),new u(e),new u(C[r]),B(i,C[r])],abi:$},options:y})}var tt={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new s(g(new A(0))),new s(p()),new A(1)]};async function Ft(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_typed_property",typeArguments:[l??m,C[r]],functionArguments:[c.from(a),new u(e),i],abi:tt},options:y})}var et={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new s(g(new A(0))),new s(p()),new A(1)]};async function Nt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_typed_property",typeArguments:[l??m,C[r]],functionArguments:[c.from(a),new u(e),i],abi:et},options:y})}function R(t,o){let n=new Array;return o.forEach((e,r)=>{n.push(B(t[r],e))}),n}function B(t,o){let n=V(o);return M(t,n,0,[]).bcsToBytes()}export{_t as a,Pt as b,kt as c,Dt as d,St as e,U as f,vt as g,ht as h,xt as i,Gt as j,Bt as k,Ot as l,Et as m,qt as n,Vt as o,Mt as p,Rt as q,Kt as r,Qt as s,Ut as t,Ft as u,Nt as v};
2
- //# sourceMappingURL=chunk-J43BXPJ3.mjs.map
1
+ import{a as d}from"./chunk-URTTOOEM.mjs";import{f as M}from"./chunk-6ILDDGAX.mjs";import{c as V}from"./chunk-MJPUASSD.mjs";import{b as w,f as v,i as G,l as A,m as f,n as s,q as p,s as g}from"./chunk-U3YYSIIT.mjs";import{b as c}from"./chunk-QRS4DGP3.mjs";import{a as I,b as u}from"./chunk-G56GPLTB.mjs";import{a as T,e as S}from"./chunk-SRDIYE3M.mjs";import{d as O}from"./chunk-56CNRT2K.mjs";import{f as b}from"./chunk-TTUXAKCV.mjs";import{n as h,w as E,x,y as q}from"./chunk-S4SEFF4K.mjs";var C={BOOLEAN:"bool",U8:"u8",U16:"u16",U32:"u32",U64:"u64",U128:"u128",U256:"u256",ADDRESS:"address",STRING:"0x1::string::String",ARRAY:"vector<u8>"},m="0x4::token::Token";async function _t(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:q,variables:{where_condition:e}},originMethod:"getDigitalAssetData"})).current_token_datas_v2[0]}async function Pt(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:c.from(n).toStringLong()},amount:{_gt:0}};return(await b({aptosConfig:o,query:{query:x,variables:{where_condition:e}},originMethod:"getCurrentDigitalAssetOwnership"})).current_token_ownerships_v2[0]}async function kt(t){let{aptosConfig:o,ownerAddress:n,options:e}=t,r={owner_address:{_eq:c.from(n).toStringLong()},amount:{_gt:0}},i={query:x,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await b({aptosConfig:o,query:i,originMethod:"getOwnedDigitalAssets"})).current_token_ownerships_v2}async function Dt(t){let{aptosConfig:o,digitalAssetAddress:n,options:e}=t,r={token_data_id:{_eq:c.from(n).toStringLong()}},i={query:E,variables:{where_condition:r,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await b({aptosConfig:o,query:i,originMethod:"getDigitalAssetActivity"})).token_activities_v2}var Q={typeParameters:[],parameters:[new s(p()),new v,new s(p()),new s(p()),new w,new w,new w,new w,new w,new w,new w,new w,new w,new v,new v]};async function St(t){let{aptosConfig:o,options:n,creator:e}=t;return d({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::create_collection",functionArguments:[new u(t.description),new S(t.maxSupply??O),new u(t.name),new u(t.uri),new T(t.mutableDescription??!0),new T(t.mutableRoyalty??!0),new T(t.mutableURI??!0),new T(t.mutableTokenDescription??!0),new T(t.mutableTokenName??!0),new T(t.mutableTokenProperties??!0),new T(t.mutableTokenURI??!0),new T(t.tokensBurnableByCreator??!0),new T(t.tokensFreezableByCreator??!0),new S(t.royaltyNumerator??0),new S(t.royaltyDenominator??1)],abi:Q},options:n})}async function U(t){let{aptosConfig:o,creatorAddress:n,collectionName:e,options:r}=t,i=c.from(n),a={collection_name:{_eq:e},creator_address:{_eq:i.toStringLong()}};return r?.tokenStandard&&(a.token_standard={_eq:r?.tokenStandard??"v2"}),(await b({aptosConfig:o,query:{query:h,variables:{where_condition:a}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function vt(t){let{aptosConfig:o,collectionId:n}=t,r={collection_id:{_eq:c.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:h,variables:{where_condition:r}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function ht(t){return(await U(t)).collection_id}var F={typeParameters:[],parameters:[new s(p()),new s(p()),new s(p()),new s(p()),new f(new s(p())),new f(new s(p())),new f(f.u8())]};async function xt(t){let{aptosConfig:o,options:n,creator:e,collection:r,description:i,name:a,uri:l,propertyKeys:y,propertyTypes:P,propertyValues:_}=t,k=P?.map(D=>C[D]);return d({aptosConfig:o,sender:e.accountAddress,data:{function:"0x4::aptos_token::mint",functionArguments:[new u(r),new u(i),new u(a),new u(l),I.MoveString(y??[]),I.MoveString(k??[]),R(_??[],k??[])],abi:F},options:n})}var N={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new G]};async function Gt(t){let{aptosConfig:o,sender:n,digitalAssetAddress:e,recipient:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x1::object::transfer",typeArguments:[i??m],functionArguments:[c.from(e),c.from(r)],abi:N},options:a})}var Y={typeParameters:[],parameters:[new s(p()),new s(p()),new s(p()),new s(p()),new f(new s(p())),new f(new s(p())),new f(f.u8()),new G]};async function Bt(t){let{aptosConfig:o,account:n,collection:e,description:r,name:i,uri:a,recipient:l,propertyKeys:y,propertyTypes:P,propertyValues:_,options:k}=t;if(y?.length!==_?.length)throw new Error("Property keys and property values counts do not match");if(P?.length!==_?.length)throw new Error("Property types and property values counts do not match");let D=P?.map(K=>C[K]);return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::mint_soul_bound",functionArguments:[e,r,i,a,I.MoveString(y??[]),I.MoveString(D??[]),R(_??[],D??[]),l],abi:Y},options:k})}var z={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function Ot(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::burn",typeArguments:[r??m],functionArguments:[c.from(e)],abi:z},options:i})}var L={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function Et(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::freeze_transfer",typeArguments:[r??m],functionArguments:[e],abi:L},options:i})}var j={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0)))]};async function qt(t){let{aptosConfig:o,creator:n,digitalAssetAddress:e,digitalAssetType:r,options:i}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::unfreeze_transfer",typeArguments:[r??m],functionArguments:[e],abi:j},options:i})}var X={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Vt(t){let{aptosConfig:o,creator:n,description:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_description",typeArguments:[i??m],functionArguments:[c.from(r),new u(e)],abi:X},options:a})}var H={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Mt(t){let{aptosConfig:o,creator:n,name:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_name",typeArguments:[i??m],functionArguments:[c.from(r),new u(e)],abi:H},options:a})}var J={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Rt(t){let{aptosConfig:o,creator:n,uri:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::set_uri",typeArguments:[i??m],functionArguments:[c.from(r),new u(e)],abi:J},options:a})}var W={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p()),new s(p()),f.u8()]};async function Kt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_property",typeArguments:[l??m],functionArguments:[c.from(a),new u(e),new u(C[r]),I.U8(B(i,C[r]))],abi:W},options:y})}var Z={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Qt(t){let{aptosConfig:o,creator:n,propertyKey:e,digitalAssetAddress:r,digitalAssetType:i,options:a}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::remove_property",typeArguments:[i??m],functionArguments:[c.from(r),new u(e)],abi:Z},options:a})}var $={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p()),new s(p()),f.u8()]};async function Ut(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_property",typeArguments:[l??m],functionArguments:[c.from(a),new u(e),new u(C[r]),B(i,C[r])],abi:$},options:y})}var tt={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new s(g(new A(0))),new s(p()),new A(1)]};async function Ft(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::add_typed_property",typeArguments:[l??m,C[r]],functionArguments:[c.from(a),new u(e),i],abi:tt},options:y})}var et={typeParameters:[{constraints:["key"]},{constraints:[]}],parameters:[new s(g(new A(0))),new s(p()),new A(1)]};async function Nt(t){let{aptosConfig:o,creator:n,propertyKey:e,propertyType:r,propertyValue:i,digitalAssetAddress:a,digitalAssetType:l,options:y}=t;return d({aptosConfig:o,sender:n.accountAddress,data:{function:"0x4::aptos_token::update_typed_property",typeArguments:[l??m,C[r]],functionArguments:[c.from(a),new u(e),i],abi:et},options:y})}function R(t,o){let n=new Array;return o.forEach((e,r)=>{n.push(B(t[r],e))}),n}function B(t,o){let n=V(o);return M(t,n,0,[]).bcsToBytes()}export{_t as a,Pt as b,kt as c,Dt as d,St as e,U as f,vt as g,ht as h,xt as i,Gt as j,Bt as k,Ot as l,Et as m,qt as n,Vt as o,Mt as p,Rt as q,Kt as r,Qt as s,Ut as t,Ft as u,Nt as v};
2
+ //# sourceMappingURL=chunk-AEVRPB4E.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-F7EMGK4M.mjs";import{e as g,j as h}from"./chunk-LR65XHSF.mjs";import{a as f}from"./chunk-F7J7ZW4H.mjs";import{a as d}from"./chunk-AFTMLXYT.mjs";import{a as p}from"./chunk-4KMISR2H.mjs";import{b as s}from"./chunk-BCUSI3N6.mjs";import{sha3_256 as H}from"@noble/hashes/sha3";import{secp256k1 as o}from"@noble/curves/secp256k1";import{HDKey as U}from"@scure/bip32";var n=class n extends f{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==n.LENGTH)throw new Error(`PublicKey length should be ${n.LENGTH}`);this.key=r}verifySignature(e){let{message:r,signature:i}=e;if(!(i instanceof y))return!1;let l=u(r),c=s.fromHexInput(l).toUint8Array(),A=H(c),x=i.toUint8Array();return o.verify(x,A,this.key.toUint8Array())}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new n(r)}static isPublicKey(e){return e instanceof n}};n.LENGTH=65;var m=n,t=class t extends p{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==t.LENGTH)throw new Error(`PrivateKey length should be ${t.LENGTH}`);this.key=r}static generate(){let e=o.utils.randomPrivateKey();return new t(e)}static fromDerivationPath(e,r){if(!g(e))throw new Error(`Invalid derivation path ${e}`);return t.fromDerivationPathInner(e,h(r))}static fromDerivationPathInner(e,r){let{privateKey:i}=U.fromMasterSeed(r).derive(e);if(i===null)throw new Error("Invalid key");return new t(i)}sign(e){let r=u(e),i=s.fromHexInput(r),l=H(i.toUint8Array()),c=o.sign(l,this.key.toUint8Array());return new y(c.toCompactRawBytes())}publicKey(){let e=o.getPublicKey(this.key.toUint8Array(),!1);return new m(e)}toUint8Array(){return this.key.toUint8Array()}toString(){return this.key.toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new t(r)}static isPrivateKey(e){return e instanceof t}};t.LENGTH=32;var v=t,a=class a extends d{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==a.LENGTH)throw new Error(`Signature length should be ${a.LENGTH}, received ${r.toUint8Array().length}`);this.data=r}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new a(r)}};a.LENGTH=64;var y=a;export{m as a,v as b,y as c};
2
- //# sourceMappingURL=chunk-QAMK2MSI.mjs.map
1
+ import{a as f}from"./chunk-4NHWV5AI.mjs";import{a as d}from"./chunk-UGPALAPN.mjs";import{a as u}from"./chunk-F7EMGK4M.mjs";import{e as g,j as h}from"./chunk-LR65XHSF.mjs";import{a as p}from"./chunk-36QXVFR5.mjs";import{b as s}from"./chunk-BCUSI3N6.mjs";import{sha3_256 as H}from"@noble/hashes/sha3";import{secp256k1 as o}from"@noble/curves/secp256k1";import{HDKey as U}from"@scure/bip32";var n=class n extends f{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==n.LENGTH)throw new Error(`PublicKey length should be ${n.LENGTH}`);this.key=r}verifySignature(e){let{message:r,signature:i}=e;if(!(i instanceof y))return!1;let l=u(r),c=s.fromHexInput(l).toUint8Array(),A=H(c),x=i.toUint8Array();return o.verify(x,A,this.key.toUint8Array())}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new n(r)}static isPublicKey(e){return e instanceof n}};n.LENGTH=65;var m=n,t=class t extends p{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==t.LENGTH)throw new Error(`PrivateKey length should be ${t.LENGTH}`);this.key=r}static generate(){let e=o.utils.randomPrivateKey();return new t(e)}static fromDerivationPath(e,r){if(!g(e))throw new Error(`Invalid derivation path ${e}`);return t.fromDerivationPathInner(e,h(r))}static fromDerivationPathInner(e,r){let{privateKey:i}=U.fromMasterSeed(r).derive(e);if(i===null)throw new Error("Invalid key");return new t(i)}sign(e){let r=u(e),i=s.fromHexInput(r),l=H(i.toUint8Array()),c=o.sign(l,this.key.toUint8Array());return new y(c.toCompactRawBytes())}publicKey(){let e=o.getPublicKey(this.key.toUint8Array(),!1);return new m(e)}toUint8Array(){return this.key.toUint8Array()}toString(){return this.key.toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new t(r)}static isPrivateKey(e){return e instanceof t}};t.LENGTH=32;var v=t,a=class a extends d{constructor(e){super();let r=s.fromHexInput(e);if(r.toUint8Array().length!==a.LENGTH)throw new Error(`Signature length should be ${a.LENGTH}, received ${r.toUint8Array().length}`);this.data=r}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let r=e.deserializeBytes();return new a(r)}};a.LENGTH=64;var y=a;export{m as a,v as b,y as c};
2
+ //# sourceMappingURL=chunk-ARGODLTZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-F7EMGK4M.mjs";import{d as K,f as A,g as H,h as P,i as v,j as E}from"./chunk-LR65XHSF.mjs";import{b as S}from"./chunk-F7J7ZW4H.mjs";import{a as x}from"./chunk-AFTMLXYT.mjs";import{a as f}from"./chunk-WNVUG2UF.mjs";import{a as p}from"./chunk-4KMISR2H.mjs";import{b as i}from"./chunk-BCUSI3N6.mjs";import y from"tweetnacl";var n=class n extends S{constructor(e){super();let t=i.fromHexInput(e);if(t.toUint8Array().length!==n.LENGTH)throw new Error(`PublicKey length should be ${n.LENGTH}`);this.key=t}verifySignature(e){let{message:t,signature:s}=e;if(!(s instanceof c))return!1;let o=d(t),u=i.fromHexInput(o).toUint8Array(),l=s.toUint8Array(),g=this.key.toUint8Array();return y.sign.detached.verify(u,l,g)}authKey(){return f.fromSchemeAndBytes({scheme:0,input:this.toUint8Array()})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new n(t)}static isPublicKey(e){return e instanceof n}};n.LENGTH=32;var h=n,r=class r extends p{constructor(e){super();let t=i.fromHexInput(e);if(t.toUint8Array().length!==r.LENGTH)throw new Error(`PrivateKey length should be ${r.LENGTH}`);this.signingKeyPair=y.sign.keyPair.fromSeed(t.toUint8Array().slice(0,r.LENGTH))}static generate(){let e=y.sign.keyPair();return new r(e.secretKey.slice(0,r.LENGTH))}static fromDerivationPath(e,t){if(!A(e))throw new Error(`Invalid derivation path ${e}`);return r.fromDerivationPathInner(e,E(t))}static fromDerivationPathInner(e,t,s=K){let{key:o,chainCode:u}=H(r.SLIP_0010_SEED,t),l=v(e).map(m=>parseInt(m,10)),{key:g}=l.reduce((m,z)=>P(m,z+s),{key:o,chainCode:u});return new r(g)}publicKey(){let e=this.signingKeyPair.publicKey;return new h(e)}sign(e){let t=d(e),s=i.fromHexInput(t).toUint8Array(),o=y.sign.detached(s,this.signingKeyPair.secretKey);return new c(o)}toUint8Array(){return this.signingKeyPair.secretKey.slice(0,r.LENGTH)}toString(){return i.fromHexInput(this.toUint8Array()).toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new r(t)}static isPrivateKey(e){return e instanceof r}};r.LENGTH=32,r.SLIP_0010_SEED="ed25519 seed";var U=r,a=class a extends x{constructor(e){super();let t=i.fromHexInput(e);if(t.toUint8Array().length!==a.LENGTH)throw new Error(`Signature length should be ${a.LENGTH}`);this.data=t}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new a(t)}};a.LENGTH=64;var c=a;export{h as a,U as b,c};
2
- //# sourceMappingURL=chunk-Y2AFC3E6.mjs.map
1
+ import{b as S}from"./chunk-4NHWV5AI.mjs";import{a as x}from"./chunk-UGPALAPN.mjs";import{a as d}from"./chunk-F7EMGK4M.mjs";import{d as K,f as A,g as H,h as P,i as v,j as E}from"./chunk-LR65XHSF.mjs";import{a as f}from"./chunk-5EN52MUT.mjs";import{a as p}from"./chunk-36QXVFR5.mjs";import{b as i}from"./chunk-BCUSI3N6.mjs";import y from"tweetnacl";var n=class n extends S{constructor(e){super();let t=i.fromHexInput(e);if(t.toUint8Array().length!==n.LENGTH)throw new Error(`PublicKey length should be ${n.LENGTH}`);this.key=t}verifySignature(e){let{message:t,signature:s}=e;if(!(s instanceof c))return!1;let o=d(t),u=i.fromHexInput(o).toUint8Array(),l=s.toUint8Array(),g=this.key.toUint8Array();return y.sign.detached.verify(u,l,g)}authKey(){return f.fromSchemeAndBytes({scheme:0,input:this.toUint8Array()})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new n(t)}static isPublicKey(e){return e instanceof n}};n.LENGTH=32;var h=n,r=class r extends p{constructor(e){super();let t=i.fromHexInput(e);if(t.toUint8Array().length!==r.LENGTH)throw new Error(`PrivateKey length should be ${r.LENGTH}`);this.signingKeyPair=y.sign.keyPair.fromSeed(t.toUint8Array().slice(0,r.LENGTH))}static generate(){let e=y.sign.keyPair();return new r(e.secretKey.slice(0,r.LENGTH))}static fromDerivationPath(e,t){if(!A(e))throw new Error(`Invalid derivation path ${e}`);return r.fromDerivationPathInner(e,E(t))}static fromDerivationPathInner(e,t,s=K){let{key:o,chainCode:u}=H(r.SLIP_0010_SEED,t),l=v(e).map(m=>parseInt(m,10)),{key:g}=l.reduce((m,z)=>P(m,z+s),{key:o,chainCode:u});return new r(g)}publicKey(){let e=this.signingKeyPair.publicKey;return new h(e)}sign(e){let t=d(e),s=i.fromHexInput(t).toUint8Array(),o=y.sign.detached(s,this.signingKeyPair.secretKey);return new c(o)}toUint8Array(){return this.signingKeyPair.secretKey.slice(0,r.LENGTH)}toString(){return i.fromHexInput(this.toUint8Array()).toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new r(t)}static isPrivateKey(e){return e instanceof r}};r.LENGTH=32,r.SLIP_0010_SEED="ed25519 seed";var U=r,a=class a extends x{constructor(e){super();let t=i.fromHexInput(e);if(t.toUint8Array().length!==a.LENGTH)throw new Error(`Signature length should be ${a.LENGTH}`);this.data=t}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new a(t)}};a.LENGTH=64;var c=a;export{h as a,U as b,c};
2
+ //# sourceMappingURL=chunk-ASXXZH2D.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-4KMISR2H.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-WZSVQBPA.mjs.map
1
+ import{a as e}from"./chunk-36QXVFR5.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-B7X6PSE7.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-JV2PBG6G.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-MV7RDJFK.mjs.map
1
+ import{a as s}from"./chunk-FKTXWOKR.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-C7YANDB2.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as i}from"./chunk-PE6R6XQV.mjs";async function s(e){let{type:t,originMethod:o,path:p,body:r,acceptType:R,contentType:f,params:c,aptosConfig:n,overrides:d}=e,g=n.getRequestUrl(t);return i({url:g,method:"POST",originMethod:o,path:p,body:r,contentType:f,acceptType:R,params:c,overrides:d},n,e.type)}async function y(e){let{aptosConfig:t}=e;return s({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function m(e){let{aptosConfig:t}=e;return s({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function a(e){let{aptosConfig:t}=e,o={...t,clientConfig:{...t.clientConfig}};return delete o?.clientConfig?.API_KEY,s({...e,type:"Faucet",overrides:{...o.clientConfig,...o.faucetConfig,...e.overrides,HEADERS:{...o.clientConfig?.HEADERS,...o.faucetConfig?.HEADERS}}})}export{s as a,y as b,m as c,a as d};
2
- //# sourceMappingURL=chunk-EIXGNR6D.mjs.map
1
+ import{b as i}from"./chunk-SWZOGZJ6.mjs";async function s(e){let{type:t,originMethod:o,path:p,body:r,acceptType:R,contentType:f,params:c,aptosConfig:n,overrides:d}=e,g=n.getRequestUrl(t);return i({url:g,method:"POST",originMethod:o,path:p,body:r,contentType:f,acceptType:R,params:c,overrides:d},n,e.type)}async function y(e){let{aptosConfig:t}=e;return s({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function m(e){let{aptosConfig:t}=e;return s({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function a(e){let{aptosConfig:t}=e,o={...t,clientConfig:{...t.clientConfig}};return delete o?.clientConfig?.API_KEY,s({...e,type:"Faucet",overrides:{...o.clientConfig,...o.faucetConfig,...e.overrides,HEADERS:{...o.clientConfig?.HEADERS,...o.faucetConfig?.HEADERS}}})}export{s as a,y as b,m as c,a as d};
2
+ //# sourceMappingURL=chunk-CAGDOGXS.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-4KMISR2H.mjs";import{b as i}from"./chunk-BCUSI3N6.mjs";var t=class a extends r{constructor(e){super(),this.value=i.fromHexInput(e).toUint8Array()}serialize(e){e.serializeFixedBytes(this.value)}serializeForEntryFunction(e){e.serialize(this)}serializeForScriptFunction(e){e.serialize(this)}static deserialize(e,s){let o=e.deserializeFixedBytes(s);return new a(o)}};export{t as a};
2
- //# sourceMappingURL=chunk-2XVDVF5C.mjs.map
1
+ import{a as r}from"./chunk-36QXVFR5.mjs";import{b as i}from"./chunk-BCUSI3N6.mjs";var t=class a extends r{constructor(e){super(),this.value=i.fromHexInput(e).toUint8Array()}serialize(e){e.serializeFixedBytes(this.value)}serializeForEntryFunction(e){e.serialize(this)}serializeForScriptFunction(e){e.serialize(this)}static deserialize(e,s){let o=e.deserializeFixedBytes(s);return new a(o)}};export{t as a};
2
+ //# sourceMappingURL=chunk-CEHCDA3G.mjs.map
@@ -0,0 +1,2 @@
1
+ var o="1.12.1";export{o as a};
2
+ //# sourceMappingURL=chunk-CXR7MOBW.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.12.0\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
1
+ {"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.12.1\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
@@ -1,2 +1,2 @@
1
- import{b as r}from"./chunk-PE6R6XQV.mjs";async function i(e){let{aptosConfig:t,overrides:s,params:n,contentType:o,acceptType:p,path:a,originMethod:d,type:R}=e,u=t.getRequestUrl(R);return r({url:u,method:"GET",originMethod:d,path:a,contentType:o,acceptType:p,params:n,overrides:{...t.clientConfig,...s}},t,e.type)}async function c(e){let{aptosConfig:t}=e;return i({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function y(e){let t=[],s,n=e.params;do{let o=await i({type:"Fullnode",aptosConfig:e.aptosConfig,originMethod:e.originMethod,path:e.path,params:n,overrides:e.overrides});s=o.headers["x-aptos-cursor"],delete o.headers,t.push(...o.data),n.start=s}while(s!=null);return t}export{i as a,c as b,y as c};
2
- //# sourceMappingURL=chunk-7JZWCHLH.mjs.map
1
+ import{b as r}from"./chunk-SWZOGZJ6.mjs";async function i(e){let{aptosConfig:t,overrides:s,params:n,contentType:o,acceptType:p,path:a,originMethod:d,type:R}=e,u=t.getRequestUrl(R);return r({url:u,method:"GET",originMethod:d,path:a,contentType:o,acceptType:p,params:n,overrides:{...t.clientConfig,...s}},t,e.type)}async function c(e){let{aptosConfig:t}=e;return i({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function y(e){let t=[],s,n=e.params;do{let o=await i({type:"Fullnode",aptosConfig:e.aptosConfig,originMethod:e.originMethod,path:e.path,params:n,overrides:e.overrides});s=o.headers["x-aptos-cursor"],delete o.headers,t.push(...o.data),n.start=s}while(s!=null);return t}export{i as a,c as b,y as c};
2
+ //# sourceMappingURL=chunk-DUP7XY5P.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-HOTGXRPG.mjs";import{a as m}from"./chunk-LSKVPMOF.mjs";import{b as w}from"./chunk-UEI62FBQ.mjs";import{f as A}from"./chunk-CPQPVRKV.mjs";import{t as f}from"./chunk-S4SEFF4K.mjs";var T=["A name must be between 3 and 63 characters long,","and can only contain lowercase a-z, 0-9, and hyphens.","A name may not start or end with a hyphen."].join(" ");function E(e){return!(!e||e.length<3||e.length>63||!/^[a-z\d][a-z\d-]{1,61}[a-z\d]$/.test(e))}function c(e){let[n,t,...o]=e.replace(/\.apt$/,"").split(".");if(o.length>0)throw new Error(`${e} is invalid. A name can only have two parts, a domain and a subdomain separated by a "."`);if(!E(n))throw new Error(`${n} is not valid. ${T}`);if(t&&!E(t))throw new Error(`${t} is not valid. ${T}`);return{domainName:t||n,subdomainName:t?n:void 0}}var V="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",G="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",P={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:G,custom:null,devnet:null,randomnet:null};function d(e){let n=P[e.network];if(!n)throw new Error(`The ANS contract is not deployed to ${e.network}`);return n}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function j(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function Y(e){let{aptosConfig:n,expiration:t,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(n),{domainName:N,subdomainName:l}=c(o),S=t.policy==="subdomain:independent"||t.policy==="subdomain:follow-domain";if(l&&!S)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(S&&!l)throw new Error(`Policy is set to ${t.policy} but no subdomain was provided`);if(t.policy==="domain"){let h=t.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let D=h*31536e3;return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[N,D,s,i]},options:a})}if(!l)throw new Error(`${t.policy} requires a subdomain to be provided.`);let _=await I({aptosConfig:n,name:N});if(!_)throw new Error("The domain does not exist");let x=t.policy==="subdomain:independent"?t.expirationDate:_;if(x>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[N,l,Math.round(x/1e3),t.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function I(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t);try{let i=await g({aptosConfig:n,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function K(e){let{aptosConfig:n,address:t}=e,o=d(n),r=await g({aptosConfig:n,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(t).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function W(e){let{aptosConfig:n,sender:t,name:o,options:r}=e,s=d(n);if(!o)return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function F(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function H(e){let{aptosConfig:n,sender:t,name:o,address:r,options:s}=e,i=d(n),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function J(e){let{aptosConfig:n,name:t}=e,{domainName:o,subdomainName:r=""}=c(t),a=(await A({aptosConfig:n,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r},is_active:{_eq:!0}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=y(a)),a}async function X(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountNames",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(y)}async function Z(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountDomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(y)}async function ee(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(y)}async function ne(e){let{aptosConfig:n,options:t,domain:o}=e;return(await A({aptosConfig:n,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""},is_active:{_eq:!0}}}}})).current_aptos_names.map(y)}async function C(e){let{aptosConfig:n}=e,t=d(n),[o]=await g({aptosConfig:n,payload:{function:`${t}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function te(e){let{aptosConfig:n,sender:t,name:o,years:r=1,options:s}=e,i=d(n),a=r*31536e3,{domainName:u,subdomainName:p}=c(o);if(p)throw new Error("Subdomains cannot be renewed");if(r!==1)throw new Error("Currently, only 1 year renewals are supported");return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function y(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,E as b,c,V as d,G as e,j as f,Y as g,I as h,K as i,W as j,F as k,H as l,J as m,X as n,Z as o,ee as p,ne as q,te as r};
2
- //# sourceMappingURL=chunk-KPDWT3LC.mjs.map
1
+ import{a as g}from"./chunk-SK5TPUAN.mjs";import{a as m}from"./chunk-URTTOOEM.mjs";import{b as w}from"./chunk-QRS4DGP3.mjs";import{f as A}from"./chunk-TTUXAKCV.mjs";import{t as f}from"./chunk-S4SEFF4K.mjs";var T=["A name must be between 3 and 63 characters long,","and can only contain lowercase a-z, 0-9, and hyphens.","A name may not start or end with a hyphen."].join(" ");function E(e){return!(!e||e.length<3||e.length>63||!/^[a-z\d][a-z\d-]{1,61}[a-z\d]$/.test(e))}function c(e){let[n,t,...o]=e.replace(/\.apt$/,"").split(".");if(o.length>0)throw new Error(`${e} is invalid. A name can only have two parts, a domain and a subdomain separated by a "."`);if(!E(n))throw new Error(`${n} is not valid. ${T}`);if(t&&!E(t))throw new Error(`${t} is not valid. ${T}`);return{domainName:t||n,subdomainName:t?n:void 0}}var V="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",G="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",P={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:G,custom:null,devnet:null,randomnet:null};function d(e){let n=P[e.network];if(!n)throw new Error(`The ANS contract is not deployed to ${e.network}`);return n}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function j(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function Y(e){let{aptosConfig:n,expiration:t,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(n),{domainName:N,subdomainName:l}=c(o),S=t.policy==="subdomain:independent"||t.policy==="subdomain:follow-domain";if(l&&!S)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(S&&!l)throw new Error(`Policy is set to ${t.policy} but no subdomain was provided`);if(t.policy==="domain"){let h=t.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let D=h*31536e3;return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[N,D,s,i]},options:a})}if(!l)throw new Error(`${t.policy} requires a subdomain to be provided.`);let _=await I({aptosConfig:n,name:N});if(!_)throw new Error("The domain does not exist");let x=t.policy==="subdomain:independent"?t.expirationDate:_;if(x>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[N,l,Math.round(x/1e3),t.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function I(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t);try{let i=await g({aptosConfig:n,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function K(e){let{aptosConfig:n,address:t}=e,o=d(n),r=await g({aptosConfig:n,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(t).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function W(e){let{aptosConfig:n,sender:t,name:o,options:r}=e,s=d(n);if(!o)return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function F(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function H(e){let{aptosConfig:n,sender:t,name:o,address:r,options:s}=e,i=d(n),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function J(e){let{aptosConfig:n,name:t}=e,{domainName:o,subdomainName:r=""}=c(t),a=(await A({aptosConfig:n,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r},is_active:{_eq:!0}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=y(a)),a}async function X(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountNames",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(y)}async function Z(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountDomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(y)}async function ee(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(y)}async function ne(e){let{aptosConfig:n,options:t,domain:o}=e;return(await A({aptosConfig:n,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""},is_active:{_eq:!0}}}}})).current_aptos_names.map(y)}async function C(e){let{aptosConfig:n}=e,t=d(n),[o]=await g({aptosConfig:n,payload:{function:`${t}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function te(e){let{aptosConfig:n,sender:t,name:o,years:r=1,options:s}=e,i=d(n),a=r*31536e3,{domainName:u,subdomainName:p}=c(o);if(p)throw new Error("Subdomains cannot be renewed");if(r!==1)throw new Error("Currently, only 1 year renewals are supported");return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function y(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,E as b,c,V as d,G as e,j as f,Y as g,I as h,K as i,W as j,F as k,H as l,J as m,X as n,Z as o,ee as p,ne as q,te as r};
2
+ //# sourceMappingURL=chunk-EKR6HLSN.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c,b as h}from"./chunk-QMFBU2CG.mjs";import{b as m}from"./chunk-F7J7ZW4H.mjs";import{a as g}from"./chunk-AFTMLXYT.mjs";import{a as b}from"./chunk-WNVUG2UF.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-CHVWOPVA.mjs.map
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,2 +1,2 @@
1
- import{a as f}from"./chunk-4J5V4M3P.mjs";import{a as _}from"./chunk-QMFBU2CG.mjs";import{b as m}from"./chunk-QAMK2MSI.mjs";import{b as y}from"./chunk-Y2AFC3E6.mjs";import{a as p}from"./chunk-WNVUG2UF.mjs";import{b as c}from"./chunk-UEI62FBQ.mjs";import{a as S}from"./chunk-AH44UPM4.mjs";import{d as v,f as d}from"./chunk-CPQPVRKV.mjs";import{d as C,e as h,f as w,g as k,h as T,j as b,k as O,l as q}from"./chunk-S4SEFF4K.mjs";import{b as g,c as A}from"./chunk-7JZWCHLH.mjs";import{a as l}from"./chunk-GHYE26Q5.mjs";async function M(e){let{aptosConfig:n,accountAddress:t}=e,{data:o}=await g({aptosConfig:n,originMethod:"getInfo",path:`accounts/${c.from(t).toString()}`});return o}async function go(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getModules",path:`accounts/${c.from(t).toString()}/modules`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??1e3}})}async function Ao(e){return e.options?.ledgerVersion!==void 0?P(e):S(async()=>P(e),`module-${e.accountAddress}-${e.moduleName}`,1e3*60*5)()}async function P(e){let{aptosConfig:n,accountAddress:t,moduleName:o,options:r}=e,{data:s}=await g({aptosConfig:n,originMethod:"getModule",path:`accounts/${c.from(t).toString()}/module/${o}`,params:{ledger_version:r?.ledgerVersion}});return s}async function po(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getTransactions",path:`accounts/${c.from(t).toString()}/transactions`,params:{start:o?.offset,limit:o?.limit}})}async function fo(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getResources",path:`accounts/${c.from(t).toString()}/resources`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??999}})}async function K(e){let{aptosConfig:n,accountAddress:t,resourceType:o,options:r}=e,{data:s}=await g({aptosConfig:n,originMethod:"getResource",path:`accounts/${c.from(t).toString()}/resource/${o}`,params:{ledger_version:r?.ledgerVersion}});return s.data}async function Q(e){let{aptosConfig:n,authenticationKey:t,options:o}=e,r=await K({aptosConfig:n,accountAddress:"0x1",resourceType:"0x1::account::OriginatingAddress",options:o}),{address_map:{handle:s}}=r,a=c.from(t);try{let i=await v({aptosConfig:n,handle:s,data:{key:a.toString(),key_type:"address",value_type:"address"},options:o});return c.from(i)}catch(i){if(i instanceof l&&i.data.error_code==="table_item_not_found")return a;throw i}}async function lo(e){let{aptosConfig:n,accountAddress:t}=e,r={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}},a=await d({aptosConfig:n,query:{query:O,variables:{where_condition:r}},originMethod:"getAccountTokensCount"});return a.current_token_ownerships_v2_aggregate.aggregate?a.current_token_ownerships_v2_aggregate.aggregate.count:0}async function yo(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(s.token_standard={_eq:o?.tokenStandard});let a={query:T,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedTokens"})).current_token_ownerships_v2}async function mo(e){let{aptosConfig:n,accountAddress:t,collectionAddress:o,options:r}=e,s=c.from(t).toStringLong(),a=c.from(o).toStringLong(),i={owner_address:{_eq:s},current_token_data:{collection_id:{_eq:a}},amount:{_gt:0}};r?.tokenStandard&&(i.token_standard={_eq:r?.tokenStandard});let u={query:b,variables:{where_condition:i,offset:r?.offset,limit:r?.limit,order_by:r?.orderBy}};return(await d({aptosConfig:n,query:u,originMethod:"getAccountOwnedTokensFromCollectionAddress"})).current_token_ownerships_v2}async function _o(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(s.current_collection={token_standard:{_eq:o?.tokenStandard}});let a={query:w,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCollectionsWithOwnedTokens"})).current_collection_ownership_v2_view}async function Co(e){let{aptosConfig:n,accountAddress:t}=e,o=c.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:q,variables:{address:o}},originMethod:"getAccountTransactionsCount"});return s.account_transactions_aggregate.aggregate?s.account_transactions_aggregate.aggregate.count:0}async function ho(e){let{aptosConfig:n,accountAddress:t,coinType:o}=e,r=c.from(t).toStringLong(),s=await I({aptosConfig:n,accountAddress:r,options:{where:{asset_type:{_eq:o}}}});return s[0]?s[0].amount:0}async function I(e){let{aptosConfig:n,accountAddress:t,options:o}=e,r=c.from(t).toStringLong(),s={...o?.where,owner_address:{_eq:r}},a={query:h,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCoinsData"})).current_fungible_asset_balances}async function wo(e){let{aptosConfig:n,accountAddress:t}=e,o=c.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:C,variables:{address:o}},originMethod:"getAccountCoinsCount"});if(!s.current_fungible_asset_balances_aggregate.aggregate)throw Error("Failed to get the count of account coins");return s.current_fungible_asset_balances_aggregate.aggregate.count}async function ko(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()}},a={query:k,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedObjects"})).current_objects}async function To(e){let{aptosConfig:n,privateKey:t}=e,o=new _(t.publicKey());if(t instanceof m){let s=p.fromPublicKeyAndScheme({publicKey:o,scheme:2}).derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:s})}if(t instanceof y){let r=p.fromPublicKeyAndScheme({publicKey:o,scheme:2});if(await G({authKey:r,aptosConfig:n})){let u=r.derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:u,legacy:!1})}let a=p.fromPublicKeyAndScheme({publicKey:o.publicKey,scheme:0});if(await G({authKey:a,aptosConfig:n})){let u=a.derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:u,legacy:!0})}}throw new Error(`Can't derive account from private key ${t}`)}async function G(e){let{aptosConfig:n,authKey:t}=e,o=await Q({aptosConfig:n,authenticationKey:t.derivedAddress()});try{return await M({aptosConfig:n,accountAddress:o}),!0}catch(r){if(r.status===404)return!1;throw new Error(`Error while looking for an account info ${o.toString()}`)}}export{M as a,go as b,Ao as c,po as d,fo as e,K as f,Q as g,lo as h,yo as i,mo as j,_o as k,Co as l,ho as m,I as n,wo as o,ko as p,To as q,G as r};
2
- //# sourceMappingURL=chunk-JV2PBG6G.mjs.map
1
+ import{a as f}from"./chunk-UEKKYJGA.mjs";import{a as _}from"./chunk-JOLLCFQL.mjs";import{b as m}from"./chunk-ARGODLTZ.mjs";import{b as y}from"./chunk-ASXXZH2D.mjs";import{a as p}from"./chunk-5EN52MUT.mjs";import{b as c}from"./chunk-QRS4DGP3.mjs";import{a as S}from"./chunk-AH44UPM4.mjs";import{d as v,f as d}from"./chunk-TTUXAKCV.mjs";import{d as C,e as h,f as w,g as k,h as T,j as b,k as O,l as q}from"./chunk-S4SEFF4K.mjs";import{b as g,c as A}from"./chunk-DUP7XY5P.mjs";import{a as l}from"./chunk-GHYE26Q5.mjs";async function M(e){let{aptosConfig:n,accountAddress:t}=e,{data:o}=await g({aptosConfig:n,originMethod:"getInfo",path:`accounts/${c.from(t).toString()}`});return o}async function go(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getModules",path:`accounts/${c.from(t).toString()}/modules`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??1e3}})}async function Ao(e){return e.options?.ledgerVersion!==void 0?P(e):S(async()=>P(e),`module-${e.accountAddress}-${e.moduleName}`,1e3*60*5)()}async function P(e){let{aptosConfig:n,accountAddress:t,moduleName:o,options:r}=e,{data:s}=await g({aptosConfig:n,originMethod:"getModule",path:`accounts/${c.from(t).toString()}/module/${o}`,params:{ledger_version:r?.ledgerVersion}});return s}async function po(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getTransactions",path:`accounts/${c.from(t).toString()}/transactions`,params:{start:o?.offset,limit:o?.limit}})}async function fo(e){let{aptosConfig:n,accountAddress:t,options:o}=e;return A({aptosConfig:n,originMethod:"getResources",path:`accounts/${c.from(t).toString()}/resources`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??999}})}async function K(e){let{aptosConfig:n,accountAddress:t,resourceType:o,options:r}=e,{data:s}=await g({aptosConfig:n,originMethod:"getResource",path:`accounts/${c.from(t).toString()}/resource/${o}`,params:{ledger_version:r?.ledgerVersion}});return s.data}async function Q(e){let{aptosConfig:n,authenticationKey:t,options:o}=e,r=await K({aptosConfig:n,accountAddress:"0x1",resourceType:"0x1::account::OriginatingAddress",options:o}),{address_map:{handle:s}}=r,a=c.from(t);try{let i=await v({aptosConfig:n,handle:s,data:{key:a.toString(),key_type:"address",value_type:"address"},options:o});return c.from(i)}catch(i){if(i instanceof l&&i.data.error_code==="table_item_not_found")return a;throw i}}async function lo(e){let{aptosConfig:n,accountAddress:t}=e,r={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}},a=await d({aptosConfig:n,query:{query:O,variables:{where_condition:r}},originMethod:"getAccountTokensCount"});return a.current_token_ownerships_v2_aggregate.aggregate?a.current_token_ownerships_v2_aggregate.aggregate.count:0}async function yo(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(s.token_standard={_eq:o?.tokenStandard});let a={query:T,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedTokens"})).current_token_ownerships_v2}async function mo(e){let{aptosConfig:n,accountAddress:t,collectionAddress:o,options:r}=e,s=c.from(t).toStringLong(),a=c.from(o).toStringLong(),i={owner_address:{_eq:s},current_token_data:{collection_id:{_eq:a}},amount:{_gt:0}};r?.tokenStandard&&(i.token_standard={_eq:r?.tokenStandard});let u={query:b,variables:{where_condition:i,offset:r?.offset,limit:r?.limit,order_by:r?.orderBy}};return(await d({aptosConfig:n,query:u,originMethod:"getAccountOwnedTokensFromCollectionAddress"})).current_token_ownerships_v2}async function _o(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(s.current_collection={token_standard:{_eq:o?.tokenStandard}});let a={query:w,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCollectionsWithOwnedTokens"})).current_collection_ownership_v2_view}async function Co(e){let{aptosConfig:n,accountAddress:t}=e,o=c.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:q,variables:{address:o}},originMethod:"getAccountTransactionsCount"});return s.account_transactions_aggregate.aggregate?s.account_transactions_aggregate.aggregate.count:0}async function ho(e){let{aptosConfig:n,accountAddress:t,coinType:o}=e,r=c.from(t).toStringLong(),s=await I({aptosConfig:n,accountAddress:r,options:{where:{asset_type:{_eq:o}}}});return s[0]?s[0].amount:0}async function I(e){let{aptosConfig:n,accountAddress:t,options:o}=e,r=c.from(t).toStringLong(),s={...o?.where,owner_address:{_eq:r}},a={query:h,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountCoinsData"})).current_fungible_asset_balances}async function wo(e){let{aptosConfig:n,accountAddress:t}=e,o=c.from(t).toStringLong(),s=await d({aptosConfig:n,query:{query:C,variables:{address:o}},originMethod:"getAccountCoinsCount"});if(!s.current_fungible_asset_balances_aggregate.aggregate)throw Error("Failed to get the count of account coins");return s.current_fungible_asset_balances_aggregate.aggregate.count}async function ko(e){let{aptosConfig:n,accountAddress:t,options:o}=e,s={owner_address:{_eq:c.from(t).toStringLong()}},a={query:k,variables:{where_condition:s,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedObjects"})).current_objects}async function To(e){let{aptosConfig:n,privateKey:t}=e,o=new _(t.publicKey());if(t instanceof m){let s=p.fromPublicKeyAndScheme({publicKey:o,scheme:2}).derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:s})}if(t instanceof y){let r=p.fromPublicKeyAndScheme({publicKey:o,scheme:2});if(await G({authKey:r,aptosConfig:n})){let u=r.derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:u,legacy:!1})}let a=p.fromPublicKeyAndScheme({publicKey:o.publicKey,scheme:0});if(await G({authKey:a,aptosConfig:n})){let u=a.derivedAddress();return f.fromPrivateKeyAndAddress({privateKey:t,address:u,legacy:!0})}}throw new Error(`Can't derive account from private key ${t}`)}async function G(e){let{aptosConfig:n,authKey:t}=e,o=await Q({aptosConfig:n,authenticationKey:t.derivedAddress()});try{return await M({aptosConfig:n,accountAddress:o}),!0}catch(r){if(r.status===404)return!1;throw new Error(`Error while looking for an account info ${o.toString()}`)}}export{M as a,go as b,Ao as c,po as d,fo as e,K as f,Q as g,lo as h,yo as i,mo as j,_o as k,Co as l,ho as m,I as n,wo as o,ko as p,To as q,G as r};
2
+ //# sourceMappingURL=chunk-FKTXWOKR.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-5NSXEM3O.mjs";import{a as o}from"./chunk-4KMISR2H.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-YJIRT3GJ.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-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,2 +1,2 @@
1
- import{b as s}from"./chunk-UEI62FBQ.mjs";import{f as n}from"./chunk-CPQPVRKV.mjs";import{p as g,u as d}from"./chunk-S4SEFF4K.mjs";async function m(e){let{aptosConfig:t,poolAddress:o}=e,r=s.from(o).toStringLong(),i=await n({aptosConfig:t,query:{query:d,variables:{where_condition:{pool_address:{_eq:r}}}}});return i.num_active_delegator_per_pool[0]?i.num_active_delegator_per_pool[0].num_active_delegator:0}async function f(e){let{aptosConfig:t,options:o}=e,r={query:d,variables:{order_by:o?.orderBy}};return(await n({aptosConfig:t,query:r})).num_active_delegator_per_pool}async function A(e){let{aptosConfig:t,delegatorAddress:o,poolAddress:r}=e,a={query:g,variables:{delegatorAddress:s.from(o).toStringLong(),poolAddress:s.from(r).toStringLong()}};return(await n({aptosConfig:t,query:a})).delegated_staking_activities}export{m as a,f as b,A as c};
2
- //# sourceMappingURL=chunk-XMJEWG3I.mjs.map
1
+ import{b as s}from"./chunk-QRS4DGP3.mjs";import{f as n}from"./chunk-TTUXAKCV.mjs";import{p as g,u as d}from"./chunk-S4SEFF4K.mjs";async function m(e){let{aptosConfig:t,poolAddress:o}=e,r=s.from(o).toStringLong(),i=await n({aptosConfig:t,query:{query:d,variables:{where_condition:{pool_address:{_eq:r}}}}});return i.num_active_delegator_per_pool[0]?i.num_active_delegator_per_pool[0].num_active_delegator:0}async function f(e){let{aptosConfig:t,options:o}=e,r={query:d,variables:{order_by:o?.orderBy}};return(await n({aptosConfig:t,query:r})).num_active_delegator_per_pool}async function A(e){let{aptosConfig:t,delegatorAddress:o,poolAddress:r}=e,a={query:g,variables:{delegatorAddress:s.from(o).toStringLong(),poolAddress:s.from(r).toStringLong()}};return(await n({aptosConfig:t,query:a})).delegated_staking_activities}export{m as a,f as b,A as c};
2
+ //# sourceMappingURL=chunk-GKGTODGE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i,b as t,c as n,d as o}from"./chunk-O3YFW4T3.mjs";import{a as s}from"./chunk-VUZDLGDK.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-ZPS4RIFU.mjs.map
1
+ import{a as i,b as t,c as n,d as o}from"./chunk-5GKROFZ4.mjs";import{a as s}from"./chunk-IYSHHN5A.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-GQR35QW3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-RVUPGO4R.mjs";var t=class{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}};export{t as a};
2
- //# sourceMappingURL=chunk-Y52TZMRO.mjs.map
1
+ import{a as o}from"./chunk-LPB7SZHL.mjs";var t=class{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}};export{t as a};
2
+ //# sourceMappingURL=chunk-IHPWATYH.mjs.map
@@ -1,2 +1,2 @@
1
- import{g as e}from"./chunk-2MRYBOYC.mjs";async function i(o){o.minimumLedgerVersion!==void 0&&await e({aptosConfig:o.config,minimumLedgerVersion:o.minimumLedgerVersion,processorType:o.processorType})}export{i as a};
2
- //# sourceMappingURL=chunk-VUZDLGDK.mjs.map
1
+ import{g as e}from"./chunk-T6J2LHHS.mjs";async function i(o){o.minimumLedgerVersion!==void 0&&await e({aptosConfig:o.config,minimumLedgerVersion:o.minimumLedgerVersion,processorType:o.processorType})}export{i as a};
2
+ //# sourceMappingURL=chunk-IYSHHN5A.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-IQSAG5Y5.mjs";import{a as b,b as g}from"./chunk-5LI6PUQN.mjs";import{a as h,c as p}from"./chunk-Y2AFC3E6.mjs";import{b as a}from"./chunk-UEI62FBQ.mjs";import{a as y}from"./chunk-4KMISR2H.mjs";var n=class extends y{static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return o.load(e);case 1:return d.load(e);case 2:return u.load(e);case 3:return l.load(e);case 4:return A.load(e);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${r}`)}}},o=class s extends n{constructor(e,r){super(),this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=h.deserialize(e),t=p.deserialize(e);return new s(r,t)}},d=class s extends n{constructor(e,r){super(),this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=b.deserialize(e),t=g.deserialize(e);return new s(r,t)}},u=class s extends n{constructor(e,r,t){super(),this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=t}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let r=i.deserialize(e),t=e.deserializeVector(a),c=e.deserializeVector(i);return new s(r,t,c)}},l=class s extends n{constructor(e,r,t,c){super(),this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=t,this.fee_payer=c}serialize(e){e.serializeU32AsUleb128(3),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){let r=i.deserialize(e),t=e.deserializeVector(a),c=e.deserializeVector(i),_=a.deserialize(e),z=i.deserialize(e),S={address:_,authenticator:z};return new s(r,t,c,S)}},A=class s extends n{constructor(e){super(),this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let r=i.deserialize(e);return new s(r)}};export{n as a,o as b,d as c,u as d,l as e,A as f};
2
- //# sourceMappingURL=chunk-KJI5PY5Z.mjs.map
1
+ import{a as i}from"./chunk-XX5J7KKC.mjs";import{a as b,b as g}from"./chunk-XDXI3TRT.mjs";import{a as h,c as p}from"./chunk-ASXXZH2D.mjs";import{b as a}from"./chunk-QRS4DGP3.mjs";import{a as y}from"./chunk-36QXVFR5.mjs";var n=class extends y{static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return o.load(e);case 1:return d.load(e);case 2:return u.load(e);case 3:return l.load(e);case 4:return A.load(e);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${r}`)}}},o=class s extends n{constructor(e,r){super(),this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=h.deserialize(e),t=p.deserialize(e);return new s(r,t)}},d=class s extends n{constructor(e,r){super(),this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=b.deserialize(e),t=g.deserialize(e);return new s(r,t)}},u=class s extends n{constructor(e,r,t){super(),this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=t}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let r=i.deserialize(e),t=e.deserializeVector(a),c=e.deserializeVector(i);return new s(r,t,c)}},l=class s extends n{constructor(e,r,t,c){super(),this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=t,this.fee_payer=c}serialize(e){e.serializeU32AsUleb128(3),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){let r=i.deserialize(e),t=e.deserializeVector(a),c=e.deserializeVector(i),_=a.deserialize(e),z=i.deserialize(e),S={address:_,authenticator:z};return new s(r,t,c,S)}},A=class s extends n{constructor(e){super(),this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let r=i.deserialize(e);return new s(r)}};export{n as a,o as b,d as c,u as d,l as e,A as f};
2
+ //# sourceMappingURL=chunk-IZF6DFAL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,c}from"./chunk-QAMK2MSI.mjs";import{a as n,c as s}from"./chunk-Y2AFC3E6.mjs";import{b as l}from"./chunk-F7J7ZW4H.mjs";import{a as y}from"./chunk-AFTMLXYT.mjs";import{a as u}from"./chunk-WNVUG2UF.mjs";var b=class t extends l{constructor(e){if(super(),this.publicKey=e,e instanceof n)this.variant=0;else if(e instanceof a)this.variant=1;else throw new Error("Unsupported public key type")}verifySignature(e){let{message:r,signature:i}=e;return i instanceof o?this.publicKey.verifySignature({message:r,signature:i.signature}):!1}authKey(){return u.fromSchemeAndBytes({scheme:2,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.publicKey.serialize(e)}static deserialize(e){let r=e.deserializeUleb128AsU32(),i;switch(r){case 0:i=n.deserialize(e);break;case 1:i=a.deserialize(e);break;default:throw new Error(`Unknown variant index for AnyPublicKey: ${r}`)}return new t(i)}static isPublicKey(e){return e instanceof t}isEd25519(){return this.publicKey instanceof n}isSecp256k1PublicKey(){return this.publicKey instanceof a}},o=class t extends y{constructor(e){if(super(),this.signature=e,e instanceof s)this.variant=0;else if(e instanceof c)this.variant=1;else throw new Error("Unsupported signature type")}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let r=e.deserializeUleb128AsU32(),i;switch(r){case 0:i=s.deserialize(e);break;case 1:i=c.deserialize(e);break;default:throw new Error(`Unknown variant index for AnySignature: ${r}`)}return new t(i)}};export{b as a,o as b};
2
- //# sourceMappingURL=chunk-QMFBU2CG.mjs.map
1
+ import{a,c}from"./chunk-ARGODLTZ.mjs";import{a as n,c as s}from"./chunk-ASXXZH2D.mjs";import{b as l}from"./chunk-4NHWV5AI.mjs";import{a as y}from"./chunk-UGPALAPN.mjs";import{a as u}from"./chunk-5EN52MUT.mjs";var b=class t extends l{constructor(e){if(super(),this.publicKey=e,e instanceof n)this.variant=0;else if(e instanceof a)this.variant=1;else throw new Error("Unsupported public key type")}verifySignature(e){let{message:r,signature:i}=e;return i instanceof o?this.publicKey.verifySignature({message:r,signature:i.signature}):!1}authKey(){return u.fromSchemeAndBytes({scheme:2,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.publicKey.serialize(e)}static deserialize(e){let r=e.deserializeUleb128AsU32(),i;switch(r){case 0:i=n.deserialize(e);break;case 1:i=a.deserialize(e);break;default:throw new Error(`Unknown variant index for AnyPublicKey: ${r}`)}return new t(i)}static isPublicKey(e){return e instanceof t}isEd25519(){return this.publicKey instanceof n}isSecp256k1PublicKey(){return this.publicKey instanceof a}},o=class t extends y{constructor(e){if(super(),this.signature=e,e instanceof s)this.variant=0;else if(e instanceof c)this.variant=1;else throw new Error("Unsupported signature type")}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let r=e.deserializeUleb128AsU32(),i;switch(r){case 0:i=s.deserialize(e);break;case 1:i=c.deserialize(e);break;default:throw new Error(`Unknown variant index for AnySignature: ${r}`)}return new t(i)}};export{b as a,o as b};
2
+ //# sourceMappingURL=chunk-JOLLCFQL.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-UEI62FBQ.mjs";import{sha3_256 as n}from"@noble/hashes/sha3";var d=(e,r)=>{let t=e.bcsToBytes(),s=typeof r=="string"?Buffer.from(r,"utf8"):r,o=new Uint8Array([...t,...s,254]);return new c(n(o))},f=(e,r)=>{let t=e.bcsToBytes(),s=typeof r=="string"?Buffer.from(r,"utf8"):r,o=new Uint8Array([...t,...s,255]);return new c(n(o))},a=(e,r,t)=>{let s=`${r}::${t}`;return d(e,s)};export{d as a,f as b,a as c};
2
- //# sourceMappingURL=chunk-JNDRFTEA.mjs.map
1
+ import{b as c}from"./chunk-QRS4DGP3.mjs";import{sha3_256 as n}from"@noble/hashes/sha3";var d=(e,r)=>{let t=e.bcsToBytes(),s=typeof r=="string"?Buffer.from(r,"utf8"):r,o=new Uint8Array([...t,...s,254]);return new c(n(o))},f=(e,r)=>{let t=e.bcsToBytes(),s=typeof r=="string"?Buffer.from(r,"utf8"):r,o=new Uint8Array([...t,...s,255]);return new c(n(o))},a=(e,r,t)=>{let s=`${r}::${t}`;return d(e,s)};export{d as a,f as b,a as c};
2
+ //# sourceMappingURL=chunk-KAGLWBIJ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-VUZDLGDK.mjs";import{a as s,b as t,c as r,d as i,e as c,f as u,g as d,h as A,i as g,j as m,k as a,l as p,m as f,n as y,o as C,p as O,q as T}from"./chunk-JV2PBG6G.mjs";import{e as o}from"./chunk-CYNQRMO5.mjs";var l=class{constructor(e){this.config=e}async getAccountInfo(e){return s({aptosConfig:this.config,...e})}async getAccountModules(e){return t({aptosConfig:this.config,...e})}async getAccountModule(e){return r({aptosConfig:this.config,...e})}async getAccountTransactions(e){return i({aptosConfig:this.config,...e})}async getAccountResources(e){return c({aptosConfig:this.config,...e})}async getAccountResource(e){return u({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return d({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),A({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),g({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),m({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),p({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),y({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),C({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:o,...e})}async getAccountCoinAmount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),f({aptosConfig:this.config,...e})}async getAccountOwnedObjects(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),O({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return T({aptosConfig:this.config,...e})}};export{l as a};
2
- //# sourceMappingURL=chunk-EOQOTFO7.mjs.map
1
+ import{a as n}from"./chunk-IYSHHN5A.mjs";import{a as s,b as t,c as r,d as i,e as c,f as u,g as d,h as A,i as g,j as m,k as a,l as p,m as f,n as y,o as C,p as O,q as T}from"./chunk-FKTXWOKR.mjs";import{e as o}from"./chunk-CYNQRMO5.mjs";var l=class{constructor(e){this.config=e}async getAccountInfo(e){return s({aptosConfig:this.config,...e})}async getAccountModules(e){return t({aptosConfig:this.config,...e})}async getAccountModule(e){return r({aptosConfig:this.config,...e})}async getAccountTransactions(e){return i({aptosConfig:this.config,...e})}async getAccountResources(e){return c({aptosConfig:this.config,...e})}async getAccountResource(e){return u({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return d({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),A({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),g({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),m({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),p({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),y({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),C({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:o,...e})}async getAccountCoinAmount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),f({aptosConfig:this.config,...e})}async getAccountOwnedObjects(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),O({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return T({aptosConfig:this.config,...e})}};export{l as a};
2
+ //# sourceMappingURL=chunk-KLAYDUFD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-LSKVPMOF.mjs";var o=class{constructor(n){this.config=n}async simple(n){return t({aptosConfig:this.config,...n})}async multiAgent(n){return t({aptosConfig:this.config,...n})}};export{o as a};
2
- //# sourceMappingURL=chunk-6X6G2RC3.mjs.map
1
+ import{a as t}from"./chunk-URTTOOEM.mjs";var o=class{constructor(n){this.config=n}async simple(n){return t({aptosConfig:this.config,...n})}async multiAgent(n){return t({aptosConfig:this.config,...n})}};export{o as a};
2
+ //# sourceMappingURL=chunk-KS7UY4W5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-7PNFDDIG.mjs";import{b as i}from"./chunk-UEI62FBQ.mjs";import{a as d}from"./chunk-4KMISR2H.mjs";var o=class t extends d{constructor(e,s,r){super(),this.rawTransaction=e,this.feePayerAddress=r,this.secondarySignerAddresses=s}serialize(e){this.rawTransaction.serialize(e),e.serializeVector(this.secondarySignerAddresses),this.feePayerAddress===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.feePayerAddress.serialize(e))}static deserialize(e){let s=n.deserialize(e),r=e.deserializeVector(i),c=e.deserializeBool(),a;return c&&(a=i.deserialize(e)),new t(s,r,a)}};export{o as a};
2
- //# sourceMappingURL=chunk-DAC5J2BG.mjs.map
1
+ import{a as n}from"./chunk-W3V4IGGB.mjs";import{b as i}from"./chunk-QRS4DGP3.mjs";import{a as d}from"./chunk-36QXVFR5.mjs";var o=class t extends d{constructor(e,s,r){super(),this.rawTransaction=e,this.feePayerAddress=r,this.secondarySignerAddresses=s}serialize(e){this.rawTransaction.serialize(e),e.serializeVector(this.secondarySignerAddresses),this.feePayerAddress===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.feePayerAddress.serialize(e))}static deserialize(e){let s=n.deserialize(e),r=e.deserializeVector(i),c=e.deserializeBool(),a;return c&&(a=i.deserialize(e)),new t(s,r,a)}};export{o as a};
2
+ //# sourceMappingURL=chunk-KXR3IUJ7.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-LSKVPMOF.mjs";import{f as t,i as o}from"./chunk-S5AGI7RQ.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-RVUPGO4R.mjs.map
1
+ import{a as r}from"./chunk-URTTOOEM.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-LPB7SZHL.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as l,c as f,d as x,e as v,f as U,g as A,h as P,i as C,j as y,k as E,l as b,m as I,n as G,o as M}from"./chunk-S5AGI7RQ.mjs";import{a as d}from"./chunk-WZSVQBPA.mjs";import{b as w}from"./chunk-UEI62FBQ.mjs";function N(e){return!!e.match(/^[_a-zA-Z0-9]+$/)}function V(e){return!!e.match(/\s/)}function $(e){return!!e.match(/^T[0-9]+$/)}function F(e,n){let i=n;for(;i<e.length;i+=1){let c=e[i];if(!V(c))break}return i}var S=(t=>(t.InvalidTypeTag="unknown type",t.UnexpectedGenericType="unexpected generic type",t.UnexpectedTypeArgumentClose="unexpected '>'",t.UnexpectedWhitespaceCharacter="unexpected whitespace character",t.UnexpectedComma="unexpected ','",t.TypeArgumentCountMismatch="type argument count doesn't match expected amount",t.MissingTypeArgumentClose="no matching '>' for '<'",t.UnexpectedPrimitiveTypeArguments="primitive types not expected to have type arguments",t.UnexpectedVectorTypeArgumentCount="vector type expected to have exactly one type argument",t.UnexpectedStructFormat="unexpected struct format, must be of the form 0xaddress::module_name::struct_name",t.InvalidModuleNameCharacter="module name must only contain alphanumeric or '_' characters",t.InvalidStructNameCharacter="struct name must only contain alphanumeric or '_' characters",t))(S||{}),r=class extends Error{constructor(n,i){super(`Failed to parse typeTag '${n}', ${i}`)}};function Z(e,n){let i=n?.allowGenerics??!1,c=[],o=[],p=[],T=0,a="",u=1;for(;T<e.length;){let g=e[T];if(g==="<")c.push({savedExpectedTypes:u,savedStr:a,savedTypes:p}),a="",p=[],u=1;else if(g===">"){if(a!==""){let _=m(a,o,i);p.push(_)}let s=c.pop();if(s===void 0)throw new r(e,"unexpected '>'");if(u!==p.length)throw new r(e,"type argument count doesn't match expected amount");let{savedStr:h,savedTypes:t,savedExpectedTypes:W}=s;o=p,p=t,a=h,u=W}else if(g===","){if(a.length!==0){let s=m(a,o,i);o=[],p.push(s),a="",u+=1}}else if(V(g)){let s=!1;if(a.length!==0){let t=m(a,o,i);o=[],p.push(t),a="",s=!0}T=F(e,T);let h=e[T];if(T<e.length&&s&&h!==","&&h!==">")throw new r(e,"unexpected whitespace character");continue}else a+=g;T+=1}if(c.length>0)throw new r(e,"no matching '>' for '<'");switch(p.length){case 0:return m(a,o,i);case 1:if(a==="")return p[0];throw new r(e,"unexpected ','");default:throw new r(e,"unexpected whitespace character")}}function m(e,n,i){switch(e){case"&signer":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new E(new y);case"signer":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new y;case"bool":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new l;case"address":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new C;case"u8":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new f;case"u16":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new x;case"u32":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new v;case"u64":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new U;case"u128":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new A;case"u256":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new P;case"vector":if(n.length!==1)throw new r(e,"vector type expected to have exactly one type argument");return new I(n[0]);default:if($(e)){if(i)return new b(Number(e.split("T")[1]));throw new r(e,"unexpected generic type")}if(!e.match(/:/))throw new r(e,"unknown type");let c=e.split("::");if(c.length!==3)throw new r(e,"unexpected struct format, must be of the form 0xaddress::module_name::struct_name");if(!N(c[1]))throw new r(e,"module name must only contain alphanumeric or '_' characters");if(!N(c[2]))throw new r(e,"struct name must only contain alphanumeric or '_' characters");return new G(new M(w.fromString(c[0]),new d(c[1]),new d(c[2]),n))}}export{S as a,r as b,Z as c};
2
- //# sourceMappingURL=chunk-JE7INUQ2.mjs.map
1
+ import{b as l,c as f,d as x,e as v,f as U,g as A,h as P,i as C,j as y,k as E,l as b,m as I,n as G,o as M}from"./chunk-U3YYSIIT.mjs";import{a as d}from"./chunk-B7X6PSE7.mjs";import{b as w}from"./chunk-QRS4DGP3.mjs";function N(e){return!!e.match(/^[_a-zA-Z0-9]+$/)}function V(e){return!!e.match(/\s/)}function $(e){return!!e.match(/^T[0-9]+$/)}function F(e,n){let i=n;for(;i<e.length;i+=1){let c=e[i];if(!V(c))break}return i}var S=(t=>(t.InvalidTypeTag="unknown type",t.UnexpectedGenericType="unexpected generic type",t.UnexpectedTypeArgumentClose="unexpected '>'",t.UnexpectedWhitespaceCharacter="unexpected whitespace character",t.UnexpectedComma="unexpected ','",t.TypeArgumentCountMismatch="type argument count doesn't match expected amount",t.MissingTypeArgumentClose="no matching '>' for '<'",t.UnexpectedPrimitiveTypeArguments="primitive types not expected to have type arguments",t.UnexpectedVectorTypeArgumentCount="vector type expected to have exactly one type argument",t.UnexpectedStructFormat="unexpected struct format, must be of the form 0xaddress::module_name::struct_name",t.InvalidModuleNameCharacter="module name must only contain alphanumeric or '_' characters",t.InvalidStructNameCharacter="struct name must only contain alphanumeric or '_' characters",t))(S||{}),r=class extends Error{constructor(n,i){super(`Failed to parse typeTag '${n}', ${i}`)}};function Z(e,n){let i=n?.allowGenerics??!1,c=[],o=[],p=[],T=0,a="",u=1;for(;T<e.length;){let g=e[T];if(g==="<")c.push({savedExpectedTypes:u,savedStr:a,savedTypes:p}),a="",p=[],u=1;else if(g===">"){if(a!==""){let _=m(a,o,i);p.push(_)}let s=c.pop();if(s===void 0)throw new r(e,"unexpected '>'");if(u!==p.length)throw new r(e,"type argument count doesn't match expected amount");let{savedStr:h,savedTypes:t,savedExpectedTypes:W}=s;o=p,p=t,a=h,u=W}else if(g===","){if(a.length!==0){let s=m(a,o,i);o=[],p.push(s),a="",u+=1}}else if(V(g)){let s=!1;if(a.length!==0){let t=m(a,o,i);o=[],p.push(t),a="",s=!0}T=F(e,T);let h=e[T];if(T<e.length&&s&&h!==","&&h!==">")throw new r(e,"unexpected whitespace character");continue}else a+=g;T+=1}if(c.length>0)throw new r(e,"no matching '>' for '<'");switch(p.length){case 0:return m(a,o,i);case 1:if(a==="")return p[0];throw new r(e,"unexpected ','");default:throw new r(e,"unexpected whitespace character")}}function m(e,n,i){switch(e){case"&signer":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new E(new y);case"signer":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new y;case"bool":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new l;case"address":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new C;case"u8":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new f;case"u16":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new x;case"u32":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new v;case"u64":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new U;case"u128":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new A;case"u256":if(n.length>0)throw new r(e,"primitive types not expected to have type arguments");return new P;case"vector":if(n.length!==1)throw new r(e,"vector type expected to have exactly one type argument");return new I(n[0]);default:if($(e)){if(i)return new b(Number(e.split("T")[1]));throw new r(e,"unexpected generic type")}if(!e.match(/:/))throw new r(e,"unknown type");let c=e.split("::");if(c.length!==3)throw new r(e,"unexpected struct format, must be of the form 0xaddress::module_name::struct_name");if(!N(c[1]))throw new r(e,"module name must only contain alphanumeric or '_' characters");if(!N(c[2]))throw new r(e,"struct name must only contain alphanumeric or '_' characters");return new G(new M(w.fromString(c[0]),new d(c[1]),new d(c[2]),n))}}export{S as a,r as b,Z as c};
2
+ //# sourceMappingURL=chunk-MJPUASSD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a,b as g,c as f}from"./chunk-YJIRT3GJ.mjs";import{a as i}from"./chunk-2XVDVF5C.mjs";import{a as o,b as u,c as s,d as c,e as p,f as y,g as m}from"./chunk-5NSXEM3O.mjs";import{b as r}from"./chunk-UEI62FBQ.mjs";function M(n){return typeof n=="boolean"}function D(n){return typeof n=="string"}function N(n){return typeof n=="number"}function P(n){return typeof n=="number"||typeof n=="bigint"||typeof n=="string"}function w(n){return n==null}function G(n){return A(n)||x(n)||S(n)||B(n)||U(n)||I(n)||b(n)||T(n)||E(n)||d(n)||n instanceof a||n instanceof f}function A(n){return n instanceof o}function T(n){return n instanceof r}function E(n){return n instanceof g}function d(n){return n instanceof i}function x(n){return n instanceof u}function S(n){return n instanceof s}function B(n){return n instanceof c}function U(n){return n instanceof p}function I(n){return n instanceof y}function b(n){return n instanceof m}function $(n){return"bytecode"in n}function R(n,t){throw new Error(`Type mismatch for argument ${t}, expected '${n}'`)}function W(n){let t=n.params.findIndex(e=>e!=="signer"&&e!=="&signer");return t<0?n.params.length:t}function L(n){let t=n.split("::");if(t.length!==3)throw new Error(`Invalid function ${n}`);let e=t[0],F=t[1],l=t[2];return{moduleAddress:e,moduleName:F,functionName:l}}export{M as a,D as b,N as c,P as d,w as e,G as f,A as g,T as h,E as i,d as j,x as k,S as l,B as m,U as n,I as o,b as p,$ as q,R as r,W as s,L as t};
2
- //# sourceMappingURL=chunk-D5Q7BI3J.mjs.map
1
+ import{b as r}from"./chunk-QRS4DGP3.mjs";import{a as i}from"./chunk-CEHCDA3G.mjs";import{a,b as g,c as f}from"./chunk-G56GPLTB.mjs";import{a as o,b as u,c as s,d as c,e as p,f as y,g as m}from"./chunk-SRDIYE3M.mjs";function M(n){return typeof n=="boolean"}function D(n){return typeof n=="string"}function N(n){return typeof n=="number"}function P(n){return typeof n=="number"||typeof n=="bigint"||typeof n=="string"}function w(n){return n==null}function G(n){return A(n)||x(n)||S(n)||B(n)||U(n)||I(n)||b(n)||T(n)||E(n)||d(n)||n instanceof a||n instanceof f}function A(n){return n instanceof o}function T(n){return n instanceof r}function E(n){return n instanceof g}function d(n){return n instanceof i}function x(n){return n instanceof u}function S(n){return n instanceof s}function B(n){return n instanceof c}function U(n){return n instanceof p}function I(n){return n instanceof y}function b(n){return n instanceof m}function $(n){return"bytecode"in n}function R(n,t){throw new Error(`Type mismatch for argument ${t}, expected '${n}'`)}function W(n){let t=n.params.findIndex(e=>e!=="signer"&&e!=="&signer");return t<0?n.params.length:t}function L(n){let t=n.split("::");if(t.length!==3)throw new Error(`Invalid function ${n}`);let e=t[0],F=t[1],l=t[2];return{moduleAddress:e,moduleName:F,functionName:l}}export{M as a,D as b,N as c,P as d,w as e,G as f,A as g,T as h,E as i,d as j,x as k,S as l,B as m,U as n,I as o,b as p,$ as q,R as r,W as s,L as t};
2
+ //# sourceMappingURL=chunk-MXO53VAI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-2XVDVF5C.mjs";import{a as r}from"./chunk-4KMISR2H.mjs";var t=class l extends r{constructor(e){super(),this.value=new i(e)}serialize(e){e.serialize(this.value)}serializeForEntryFunction(e){e.serializeU32AsUleb128(this.value.value.length),e.serialize(this)}static deserialize(e,s){let a=i.deserialize(e,s);return new l(a.value)}};export{t as a};
2
- //# sourceMappingURL=chunk-FNKDXPPQ.mjs.map
1
+ import{a as i}from"./chunk-CEHCDA3G.mjs";import{a as r}from"./chunk-36QXVFR5.mjs";var t=class l extends r{constructor(e){super(),this.value=new i(e)}serialize(e){e.serialize(this.value)}serializeForEntryFunction(e){e.serializeU32AsUleb128(this.value.value.length),e.serialize(this)}static deserialize(e,s){let a=i.deserialize(e,s);return new l(a.value)}};export{t as a};
2
+ //# sourceMappingURL=chunk-N3U47Y6Y.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r,b as i,c as s}from"./chunk-XMJEWG3I.mjs";import{a as o}from"./chunk-VUZDLGDK.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-HTTPFWYL.mjs.map
1
+ import{a as r,b as i,c as s}from"./chunk-GKGTODGE.mjs";import{a as o}from"./chunk-IYSHHN5A.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-OWXKKVWD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-4KMISR2H.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-P2CIREOD.mjs.map
1
+ import{a as i}from"./chunk-36QXVFR5.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-PF57EOJY.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as p}from"./chunk-UEI62FBQ.mjs";import{f as a}from"./chunk-CPQPVRKV.mjs";import{q as d}from"./chunk-S4SEFF4K.mjs";var g=300,y=o=>{if(o&&o.length>g)throw new Error(`Event type length exceeds the maximum length of ${g}`)};async function f(o){let{aptosConfig:n,eventType:e,options:t}=o,r={where:{account_address:{_eq:"0x0000000000000000000000000000000000000000000000000000000000000000"},creation_number:{_eq:"0"},sequence_number:{_eq:"0"},indexed_type:{_eq:e}},pagination:t,orderBy:t?.orderBy};return c({aptosConfig:n,options:r})}async function h(o){let{accountAddress:n,aptosConfig:e,creationNumber:t,options:s}=o,i={where:{account_address:{_eq:p.from(n).toStringLong()},creation_number:{_eq:t}},pagination:s,orderBy:s?.orderBy};return c({aptosConfig:e,options:i})}async function _(o){let{accountAddress:n,aptosConfig:e,eventType:t,options:s}=o,i={where:{account_address:{_eq:p.from(n).toStringLong()},indexed_type:{_eq:t}},pagination:s,orderBy:s?.orderBy};return c({aptosConfig:e,options:i})}async function c(o){let{aptosConfig:n,options:e}=o;y(e?.where?.indexed_type?._eq);let t={query:d,variables:{where_condition:e?.where,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await a({aptosConfig:n,query:t,originMethod:"getEvents"})).events}export{f as a,h as b,_ as c,c as d};
2
- //# sourceMappingURL=chunk-NLPPL42P.mjs.map
1
+ import{b as p}from"./chunk-QRS4DGP3.mjs";import{f as a}from"./chunk-TTUXAKCV.mjs";import{q as d}from"./chunk-S4SEFF4K.mjs";var g=300,y=o=>{if(o&&o.length>g)throw new Error(`Event type length exceeds the maximum length of ${g}`)};async function f(o){let{aptosConfig:n,eventType:e,options:t}=o,r={where:{account_address:{_eq:"0x0000000000000000000000000000000000000000000000000000000000000000"},creation_number:{_eq:"0"},sequence_number:{_eq:"0"},indexed_type:{_eq:e}},pagination:t,orderBy:t?.orderBy};return c({aptosConfig:n,options:r})}async function h(o){let{accountAddress:n,aptosConfig:e,creationNumber:t,options:s}=o,i={where:{account_address:{_eq:p.from(n).toStringLong()},creation_number:{_eq:t}},pagination:s,orderBy:s?.orderBy};return c({aptosConfig:e,options:i})}async function _(o){let{accountAddress:n,aptosConfig:e,eventType:t,options:s}=o,i={where:{account_address:{_eq:p.from(n).toStringLong()},indexed_type:{_eq:t}},pagination:s,orderBy:s?.orderBy};return c({aptosConfig:e,options:i})}async function c(o){let{aptosConfig:n,options:e}=o;y(e?.where?.indexed_type?._eq);let t={query:d,variables:{where_condition:e?.where,offset:e?.offset,limit:e?.limit,order_by:e?.orderBy}};return(await a({aptosConfig:n,query:t,originMethod:"getEvents"})).events}export{f as a,h as b,_ as c,c as d};
2
+ //# sourceMappingURL=chunk-Q73VKL3A.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as o}from"./chunk-IQSAG5Y5.mjs";import{b as i}from"./chunk-Y2AFC3E6.mjs";import{b as s}from"./chunk-UEI62FBQ.mjs";var a=class n{constructor(e){this.signingScheme=0;let{privateKey:t,address:r}=e;this.privateKey=t,this.publicKey=t.publicKey(),this.accountAddress=r?s.from(r):this.publicKey.authKey().derivedAddress()}static generate(){let e=i.generate();return new n({privateKey:e})}static fromDerivationPath(e){let{path:t,mnemonic:r}=e,c=i.fromDerivationPath(t,r);return new n({privateKey:c})}verifySignature(e){return this.publicKey.verifySignature(e)}signWithAuthenticator(e){let t=this.privateKey.sign(e);return new o(this.publicKey,t)}sign(e){return this.signWithAuthenticator(e).signature}};export{a};
2
- //# sourceMappingURL=chunk-6F7X2C22.mjs.map
1
+ import{b as o}from"./chunk-XX5J7KKC.mjs";import{b as i}from"./chunk-ASXXZH2D.mjs";import{b as s}from"./chunk-QRS4DGP3.mjs";var a=class n{constructor(e){this.signingScheme=0;let{privateKey:t,address:r}=e;this.privateKey=t,this.publicKey=t.publicKey(),this.accountAddress=r?s.from(r):this.publicKey.authKey().derivedAddress()}static generate(){let e=i.generate();return new n({privateKey:e})}static fromDerivationPath(e){let{path:t,mnemonic:r}=e,c=i.fromDerivationPath(t,r);return new n({privateKey:c})}verifySignature(e){return this.publicKey.verifySignature(e)}signWithAuthenticator(e){let t=this.privateKey.sign(e);return new o(this.publicKey,t)}sign(e){return this.signWithAuthenticator(e).signature}};export{a};
2
+ //# sourceMappingURL=chunk-QJAI7DNA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-4KMISR2H.mjs";import{a as i}from"./chunk-LG7RJQ57.mjs";import{bytesToHex as o,hexToBytes as l}from"@noble/hashes/utils";var h=(s=>(s.INCORRECT_NUMBER_OF_BYTES="incorrect_number_of_bytes",s.INVALID_HEX_CHARS="invalid_hex_chars",s.TOO_SHORT="too_short",s.TOO_LONG="too_long",s.LEADING_ZERO_X_REQUIRED="leading_zero_x_required",s.LONG_FORM_REQUIRED_UNLESS_SPECIAL="long_form_required_unless_special",s.INVALID_PADDING_ZEROES="INVALID_PADDING_ZEROES",s))(h||{}),r=class r extends a{constructor(t){if(super(),t.length!==r.LENGTH)throw new i("AccountAddress data should be exactly 32 bytes long","incorrect_number_of_bytes");this.data=t}isSpecial(){return this.data.slice(0,this.data.length-1).every(t=>t===0)&&this.data[this.data.length-1]<16}toString(){return`0x${this.toStringWithoutPrefix()}`}toStringWithoutPrefix(){let t=o(this.data);return this.isSpecial()&&(t=t[t.length-1]),t}toStringLong(){return`0x${this.toStringLongWithoutPrefix()}`}toStringLongWithoutPrefix(){return o(this.data)}toUint8Array(){return this.data}serialize(t){t.serializeFixedBytes(this.data)}serializeForEntryFunction(t){let e=this.bcsToBytes();t.serializeBytes(e)}serializeForScriptFunction(t){t.serializeU32AsUleb128(3),t.serialize(this)}static deserialize(t){let e=t.deserializeFixedBytes(r.LENGTH);return new r(e)}static fromStringStrict(t){if(!t.startsWith("0x"))throw new i("Hex string must start with a leading 0x.","leading_zero_x_required");let e=r.fromString(t);if(t.length!==r.LONG_STRING_LENGTH+2)if(e.isSpecial()){if(t.length!==3)throw new i(`The given hex string ${t} is a special address not in LONG form, it must be 0x0 to 0xf without padding zeroes.`,"INVALID_PADDING_ZEROES")}else throw new i(`The given hex string ${t} is not a special address, it must be represented as 0x + 64 chars.`,"long_form_required_unless_special");return e}static fromString(t){let e=t;if(t.startsWith("0x")&&(e=t.slice(2)),e.length===0)throw new i("Hex string is too short, must be 1 to 64 chars long, excluding the leading 0x.","too_short");if(e.length>64)throw new i("Hex string is too long, must be 1 to 64 chars long, excluding the leading 0x.","too_long");let n;try{n=l(e.padStart(64,"0"))}catch(d){throw new i(`Hex characters are invalid: ${d?.message}`,"invalid_hex_chars")}return new r(n)}static from(t){return t instanceof r?t:t instanceof Uint8Array?new r(t):r.fromString(t)}static fromStrict(t){return t instanceof r?t:t instanceof Uint8Array?new r(t):r.fromStringStrict(t)}static isValid(t){try{return t.strict?r.fromStrict(t.input):r.from(t.input),{valid:!0}}catch(e){return{valid:!1,invalidReason:e?.invalidReason,invalidReasonMessage:e?.message}}}equals(t){return this.data.length!==t.data.length?!1:this.data.every((e,n)=>e===t.data[n])}};r.LENGTH=32,r.LONG_STRING_LENGTH=64,r.ZERO=r.from("0x0"),r.ONE=r.from("0x1"),r.TWO=r.from("0x2"),r.THREE=r.from("0x3"),r.FOUR=r.from("0x4");var c=r;export{h as a,c as b};
2
- //# sourceMappingURL=chunk-UEI62FBQ.mjs.map
1
+ import{a}from"./chunk-36QXVFR5.mjs";import{a as i}from"./chunk-LG7RJQ57.mjs";import{bytesToHex as o,hexToBytes as l}from"@noble/hashes/utils";var h=(s=>(s.INCORRECT_NUMBER_OF_BYTES="incorrect_number_of_bytes",s.INVALID_HEX_CHARS="invalid_hex_chars",s.TOO_SHORT="too_short",s.TOO_LONG="too_long",s.LEADING_ZERO_X_REQUIRED="leading_zero_x_required",s.LONG_FORM_REQUIRED_UNLESS_SPECIAL="long_form_required_unless_special",s.INVALID_PADDING_ZEROES="INVALID_PADDING_ZEROES",s))(h||{}),r=class r extends a{constructor(t){if(super(),t.length!==r.LENGTH)throw new i("AccountAddress data should be exactly 32 bytes long","incorrect_number_of_bytes");this.data=t}isSpecial(){return this.data.slice(0,this.data.length-1).every(t=>t===0)&&this.data[this.data.length-1]<16}toString(){return`0x${this.toStringWithoutPrefix()}`}toStringWithoutPrefix(){let t=o(this.data);return this.isSpecial()&&(t=t[t.length-1]),t}toStringLong(){return`0x${this.toStringLongWithoutPrefix()}`}toStringLongWithoutPrefix(){return o(this.data)}toUint8Array(){return this.data}serialize(t){t.serializeFixedBytes(this.data)}serializeForEntryFunction(t){let e=this.bcsToBytes();t.serializeBytes(e)}serializeForScriptFunction(t){t.serializeU32AsUleb128(3),t.serialize(this)}static deserialize(t){let e=t.deserializeFixedBytes(r.LENGTH);return new r(e)}static fromStringStrict(t){if(!t.startsWith("0x"))throw new i("Hex string must start with a leading 0x.","leading_zero_x_required");let e=r.fromString(t);if(t.length!==r.LONG_STRING_LENGTH+2)if(e.isSpecial()){if(t.length!==3)throw new i(`The given hex string ${t} is a special address not in LONG form, it must be 0x0 to 0xf without padding zeroes.`,"INVALID_PADDING_ZEROES")}else throw new i(`The given hex string ${t} is not a special address, it must be represented as 0x + 64 chars.`,"long_form_required_unless_special");return e}static fromString(t){let e=t;if(t.startsWith("0x")&&(e=t.slice(2)),e.length===0)throw new i("Hex string is too short, must be 1 to 64 chars long, excluding the leading 0x.","too_short");if(e.length>64)throw new i("Hex string is too long, must be 1 to 64 chars long, excluding the leading 0x.","too_long");let n;try{n=l(e.padStart(64,"0"))}catch(d){throw new i(`Hex characters are invalid: ${d?.message}`,"invalid_hex_chars")}return new r(n)}static from(t){return t instanceof r?t:t instanceof Uint8Array?new r(t):r.fromString(t)}static fromStrict(t){return t instanceof r?t:t instanceof Uint8Array?new r(t):r.fromStringStrict(t)}static isValid(t){try{return t.strict?r.fromStrict(t.input):r.from(t.input),{valid:!0}}catch(e){return{valid:!1,invalidReason:e?.invalidReason,invalidReasonMessage:e?.message}}}equals(t){return this.data.length!==t.data.length?!1:this.data.every((e,n)=>e===t.data[n])}};r.LENGTH=32,r.LONG_STRING_LENGTH=64,r.ZERO=r.from("0x0"),r.ONE=r.from("0x1"),r.TWO=r.from("0x2"),r.THREE=r.from("0x3"),r.FOUR=r.from("0x4");var c=r;export{h as a,c as b};
2
+ //# sourceMappingURL=chunk-QRS4DGP3.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as y}from"./chunk-IQSAG5Y5.mjs";import{a as g,b as u}from"./chunk-QMFBU2CG.mjs";import{b as s}from"./chunk-QAMK2MSI.mjs";import{b as i}from"./chunk-Y2AFC3E6.mjs";import{b as o}from"./chunk-UEI62FBQ.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-YMFCBU4L.mjs.map
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,2 +1,2 @@
1
- import{c as r}from"./chunk-NMASPJTH.mjs";import{b as i}from"./chunk-4KMISR2H.mjs";import{b as t}from"./chunk-EIXGNR6D.mjs";async function v(a){let{aptosConfig:o,payload:n,options:s}=a,p=await r({...n,aptosConfig:o}),e=new i;p.serialize(e);let l=e.toUint8Array(),{data:d}=await t({aptosConfig:o,path:"view",originMethod:"view",contentType:"application/x.aptos.view_function+bcs",params:{ledger_version:s?.ledgerVersion},body:l});return d}export{v as a};
2
- //# sourceMappingURL=chunk-HOTGXRPG.mjs.map
1
+ import{c as r}from"./chunk-SOBCWGBM.mjs";import{b as i}from"./chunk-36QXVFR5.mjs";import{b as t}from"./chunk-CAGDOGXS.mjs";async function v(a){let{aptosConfig:o,payload:n,options:s}=a,p=await r({...n,aptosConfig:o}),e=new i;p.serialize(e);let l=e.toUint8Array(),{data:d}=await t({aptosConfig:o,path:"view",originMethod:"view",contentType:"application/x.aptos.view_function+bcs",params:{ledger_version:s?.ledgerVersion},body:l});return d}export{v as a};
2
+ //# sourceMappingURL=chunk-SK5TPUAN.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as $,c as tn,d as en,e as M}from"./chunk-NLMMCXLR.mjs";import{q as nn,t as T}from"./chunk-D5Q7BI3J.mjs";import{a as rn}from"./chunk-DAC5J2BG.mjs";import{a as A}from"./chunk-R4ERAOCM.mjs";import{a as Y}from"./chunk-HTWJVZZ5.mjs";import{a as l,c as f,d as g}from"./chunk-7PNFDDIG.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-MS76A6LX.mjs";import{a as L}from"./chunk-P2CIREOD.mjs";import{b as R,d as F,e as _,f as D}from"./chunk-KJI5PY5Z.mjs";import{a as K}from"./chunk-JV2PBG6G.mjs";import{b as h,d as p,e as q}from"./chunk-IQSAG5Y5.mjs";import{a as v,b as E}from"./chunk-QMFBU2CG.mjs";import{a as G,c as k}from"./chunk-QAMK2MSI.mjs";import{a as x,c as B}from"./chunk-Y2AFC3E6.mjs";import{b as u}from"./chunk-UEI62FBQ.mjs";import{b}from"./chunk-BCUSI3N6.mjs";import{b as H}from"./chunk-2MRYBOYC.mjs";import{a as V}from"./chunk-AH44UPM4.mjs";import{a as O}from"./chunk-CPQPVRKV.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-NMASPJTH.mjs.map
1
+ import{a as $,c as tn,d as en,e as M}from"./chunk-6ILDDGAX.mjs";import{q as nn,t as T}from"./chunk-MXO53VAI.mjs";import{a as A}from"./chunk-4ILXLBGX.mjs";import{a as Y}from"./chunk-V6FZ7WZH.mjs";import{a as rn}from"./chunk-KXR3IUJ7.mjs";import{a as l,c as f,d as g}from"./chunk-W3V4IGGB.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-ZTIRBBNS.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-FKTXWOKR.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-T6J2LHHS.mjs";import{a as V}from"./chunk-AH44UPM4.mjs";import{a as O}from"./chunk-TTUXAKCV.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-SOBCWGBM.mjs.map