@aptos-labs/ts-sdk 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/dist/common/cli/index.js +1 -1
  2. package/dist/common/cli/index.js.map +1 -1
  3. package/dist/common/index.d.ts +22 -3
  4. package/dist/common/index.js +8 -8
  5. package/dist/common/index.js.map +1 -1
  6. package/dist/esm/account/Account.mjs +1 -1
  7. package/dist/esm/account/Ed25519Account.mjs +1 -1
  8. package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
  9. package/dist/esm/account/KeylessAccount.mjs +1 -1
  10. package/dist/esm/account/MultiKeyAccount.mjs +1 -1
  11. package/dist/esm/account/SingleKeyAccount.mjs +1 -1
  12. package/dist/esm/account/index.mjs +1 -1
  13. package/dist/esm/api/account.mjs +1 -1
  14. package/dist/esm/api/ans.mjs +1 -1
  15. package/dist/esm/api/aptos.mjs +1 -1
  16. package/dist/esm/api/coin.mjs +1 -1
  17. package/dist/esm/api/digitalAsset.mjs +1 -1
  18. package/dist/esm/api/event.mjs +1 -1
  19. package/dist/esm/api/faucet.mjs +1 -1
  20. package/dist/esm/api/fungibleAsset.d.mts +18 -1
  21. package/dist/esm/api/fungibleAsset.mjs +1 -1
  22. package/dist/esm/api/general.mjs +1 -1
  23. package/dist/esm/api/index.mjs +1 -1
  24. package/dist/esm/api/keyless.mjs +1 -1
  25. package/dist/esm/api/staking.mjs +1 -1
  26. package/dist/esm/api/table.mjs +1 -1
  27. package/dist/esm/api/transaction.mjs +1 -1
  28. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  29. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  30. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  31. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  32. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  33. package/dist/esm/api/utils.mjs +1 -1
  34. package/dist/esm/bcs/index.mjs +1 -1
  35. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
  36. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
  37. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
  38. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
  39. package/dist/esm/bcs/serializer.mjs +1 -1
  40. package/dist/esm/{chunk-XEYFKOYN.mjs → chunk-3EDNV7KS.mjs} +2 -2
  41. package/dist/esm/{chunk-XHCH7LG5.mjs → chunk-3JEL6FIZ.mjs} +2 -2
  42. package/dist/esm/{chunk-C75WI2DU.mjs → chunk-3KZ7HFFA.mjs} +2 -2
  43. package/dist/esm/{chunk-MRYNASDY.mjs → chunk-3VUSIKCF.mjs} +2 -2
  44. package/dist/esm/{chunk-27EDTWDR.mjs → chunk-47M33ENP.mjs} +2 -2
  45. package/dist/esm/{chunk-DIJ7EEXC.mjs → chunk-4EPLOSKY.mjs} +2 -2
  46. package/dist/esm/{chunk-4IMYC7VX.mjs → chunk-4U3MAEYH.mjs} +2 -2
  47. package/dist/esm/{chunk-WRKH7MMI.mjs → chunk-4ZM7V7HN.mjs} +2 -2
  48. package/dist/esm/{chunk-SZ2FGGM6.mjs → chunk-5Y3O7MLN.mjs} +2 -2
  49. package/dist/esm/{chunk-BI5F4IYT.mjs → chunk-64P5SB7N.mjs} +2 -2
  50. package/dist/esm/chunk-6DDSU7HN.mjs +2 -0
  51. package/dist/esm/{chunk-6J7KF4CI.mjs.map → chunk-6DDSU7HN.mjs.map} +1 -1
  52. package/dist/esm/{chunk-PI34ZZ2Q.mjs → chunk-6ZQWPHLV.mjs} +2 -2
  53. package/dist/esm/{chunk-IMGLHDIA.mjs → chunk-76OH2Z4Q.mjs} +2 -2
  54. package/dist/esm/{chunk-XAFM4JZX.mjs → chunk-77NXCSLY.mjs} +2 -2
  55. package/dist/esm/{chunk-GWUK3P3Y.mjs → chunk-7JUBWA7V.mjs} +2 -2
  56. package/dist/esm/{chunk-B3UIFT2G.mjs → chunk-A2Z7I2EY.mjs} +2 -2
  57. package/dist/esm/{chunk-HPZ2S4FE.mjs → chunk-A63SMUOU.mjs} +2 -2
  58. package/dist/esm/{chunk-YOJC4OXK.mjs → chunk-BCY5UOGP.mjs} +2 -2
  59. package/dist/esm/{chunk-TYS55ZIF.mjs → chunk-BF46IXHH.mjs} +2 -2
  60. package/dist/esm/{chunk-XZMPH72M.mjs → chunk-BI5P5ASH.mjs} +2 -2
  61. package/dist/esm/{chunk-LXLISEQ4.mjs → chunk-BOYYQAB4.mjs} +2 -2
  62. package/dist/esm/{chunk-NCKTBQKI.mjs → chunk-C2IJG37E.mjs} +2 -2
  63. package/dist/esm/{chunk-ENKXK5WP.mjs → chunk-CAC7G2HC.mjs} +2 -2
  64. package/dist/esm/{chunk-FY7RZWGY.mjs → chunk-CPCS5KIA.mjs} +2 -2
  65. package/dist/esm/{chunk-3XA2PJT3.mjs → chunk-DCBXXRXS.mjs} +2 -2
  66. package/dist/esm/chunk-E2JEBCSY.mjs +2 -0
  67. package/dist/esm/chunk-E2JEBCSY.mjs.map +1 -0
  68. package/dist/esm/chunk-EAXCOIOP.mjs +2 -0
  69. package/dist/esm/{chunk-P2YIFHMW.mjs.map → chunk-EAXCOIOP.mjs.map} +1 -1
  70. package/dist/esm/{chunk-FDVU4LJF.mjs → chunk-FD2VCIZG.mjs} +2 -2
  71. package/dist/esm/{chunk-TSTGVIAU.mjs → chunk-FGFQZQGX.mjs} +2 -2
  72. package/dist/esm/{chunk-JWNKY2N3.mjs → chunk-FTA2ZMUX.mjs} +2 -2
  73. package/dist/esm/{chunk-6RI3QGKV.mjs → chunk-GCPWPGCS.mjs} +2 -2
  74. package/dist/esm/{chunk-IPBKWCHZ.mjs → chunk-GMHGYDZQ.mjs} +2 -2
  75. package/dist/esm/{chunk-OFERLF6R.mjs → chunk-GPZEPKKD.mjs} +2 -2
  76. package/dist/esm/{chunk-MIEL2ZWA.mjs → chunk-GRZVD45M.mjs} +2 -2
  77. package/dist/esm/{chunk-JBI3MFD3.mjs → chunk-GXLFQEPR.mjs} +2 -2
  78. package/dist/esm/{chunk-MS4MRLGA.mjs → chunk-H6YNXJNF.mjs} +2 -2
  79. package/dist/esm/{chunk-5YKVCBMZ.mjs → chunk-HACVLK5I.mjs} +2 -2
  80. package/dist/esm/{chunk-5AVPZE2Z.mjs → chunk-HED6CPN2.mjs} +2 -2
  81. package/dist/esm/{chunk-EPYUPOEE.mjs → chunk-HJT2Q5NL.mjs} +2 -2
  82. package/dist/esm/{chunk-HZCFCP4P.mjs → chunk-ICE6OL3A.mjs} +2 -2
  83. package/dist/esm/{chunk-Y5PEEKOM.mjs → chunk-ILXK4OH5.mjs} +2 -2
  84. package/dist/esm/{chunk-YXRXKYCR.mjs → chunk-IOMJ5OWV.mjs} +2 -2
  85. package/dist/esm/{chunk-AX7L7E42.mjs → chunk-JM7CSDJ3.mjs} +2 -2
  86. package/dist/esm/{chunk-PS4JR3KO.mjs → chunk-K6NUFABY.mjs} +2 -2
  87. package/dist/esm/chunk-KMJ6TF6Y.mjs +2 -0
  88. package/dist/esm/chunk-KMJ6TF6Y.mjs.map +1 -0
  89. package/dist/esm/{chunk-6AO7XFMJ.mjs → chunk-KUAN2WZF.mjs} +2 -2
  90. package/dist/esm/chunk-LAZTLEXF.mjs +2 -0
  91. package/dist/esm/chunk-LAZTLEXF.mjs.map +1 -0
  92. package/dist/esm/{chunk-RQ7N6FTV.mjs → chunk-LLLINNAG.mjs} +2 -2
  93. package/dist/esm/{chunk-DBDIEGAX.mjs → chunk-LWFSV3OA.mjs} +2 -2
  94. package/dist/esm/{chunk-VJZVCHIS.mjs → chunk-MH6HIFMG.mjs} +2 -2
  95. package/dist/esm/{chunk-4435A7EV.mjs → chunk-MKOIEX4B.mjs} +2 -2
  96. package/dist/esm/{chunk-BF4ZE37Q.mjs → chunk-MLDQ2TY2.mjs} +2 -2
  97. package/dist/esm/{chunk-M2QV232A.mjs → chunk-MQGW234H.mjs} +2 -2
  98. package/dist/esm/{chunk-YLDLEASQ.mjs → chunk-MUAV4P6C.mjs} +2 -2
  99. package/dist/esm/{chunk-774QDXM7.mjs → chunk-N5A4L6Z6.mjs} +2 -2
  100. package/dist/esm/{chunk-S2FOCEY3.mjs → chunk-NBGXHLM4.mjs} +2 -2
  101. package/dist/esm/{chunk-772PPMHG.mjs → chunk-OKLLJQM4.mjs} +2 -2
  102. package/dist/esm/{chunk-4OMMO2ZM.mjs → chunk-OLVNRYGT.mjs} +2 -2
  103. package/dist/esm/{chunk-GBCAP4Z5.mjs → chunk-OPGMT27G.mjs} +2 -2
  104. package/dist/esm/{chunk-YJCZU6PR.mjs → chunk-P5V7OZNN.mjs} +2 -2
  105. package/dist/esm/{chunk-4TODRUKS.mjs → chunk-PS7L2TLP.mjs} +2 -2
  106. package/dist/esm/{chunk-G4UKDWKT.mjs → chunk-PVEPP4HR.mjs} +2 -2
  107. package/dist/esm/{chunk-BTTZZ2IQ.mjs → chunk-QTNKFKDE.mjs} +2 -2
  108. package/dist/esm/{chunk-42XI3HFJ.mjs → chunk-RFA7BIDN.mjs} +2 -2
  109. package/dist/esm/{chunk-CVHPBWAE.mjs → chunk-RUVDYKIZ.mjs} +2 -2
  110. package/dist/esm/chunk-SYV4KFI7.mjs +2 -0
  111. package/dist/esm/chunk-SYV4KFI7.mjs.map +1 -0
  112. package/dist/esm/{chunk-27IBTALL.mjs → chunk-TFNJPJF6.mjs} +2 -2
  113. package/dist/esm/{chunk-QUHKUJEO.mjs → chunk-TY4IEDJD.mjs} +2 -2
  114. package/dist/esm/{chunk-CR2SYJYG.mjs → chunk-V5JJHVMP.mjs} +2 -2
  115. package/dist/esm/{chunk-O5IXBRSF.mjs → chunk-VRSZLJVR.mjs} +2 -2
  116. package/dist/esm/{chunk-Q5M2JKZ5.mjs → chunk-VY2MJZWM.mjs} +2 -2
  117. package/dist/esm/{chunk-IYZMBB6Z.mjs → chunk-WUWJLSGN.mjs} +2 -2
  118. package/dist/esm/{chunk-3DSVH6LX.mjs → chunk-XSHUCBNT.mjs} +2 -2
  119. package/dist/esm/{chunk-CDTDQXTN.mjs → chunk-Y37TV7SM.mjs} +2 -2
  120. package/dist/esm/{chunk-ANH2FYMX.mjs → chunk-YDXU6ALO.mjs} +2 -2
  121. package/dist/esm/{chunk-A5XE22JG.mjs → chunk-YF6UA3XW.mjs} +2 -2
  122. package/dist/esm/{chunk-6QGVRNV6.mjs → chunk-YPHH6CAO.mjs} +2 -2
  123. package/dist/esm/{chunk-E37YRKWK.mjs → chunk-YUNDX5I7.mjs} +2 -2
  124. package/dist/esm/{chunk-KZWAQOS5.mjs → chunk-YXXEXFQH.mjs} +2 -2
  125. package/dist/esm/chunk-ZQUDGZIZ.mjs +2 -0
  126. package/dist/esm/chunk-ZQUDGZIZ.mjs.map +1 -0
  127. package/dist/esm/cli/index.mjs +1 -1
  128. package/dist/esm/cli/move.mjs +1 -1
  129. package/dist/esm/client/core.mjs +1 -1
  130. package/dist/esm/client/get.mjs +1 -1
  131. package/dist/esm/client/index.mjs +1 -1
  132. package/dist/esm/client/post.mjs +1 -1
  133. package/dist/esm/core/account/index.mjs +1 -1
  134. package/dist/esm/core/account/utils/address.mjs +1 -1
  135. package/dist/esm/core/account/utils/index.mjs +1 -1
  136. package/dist/esm/core/accountAddress.mjs +1 -1
  137. package/dist/esm/core/authenticationKey.mjs +1 -1
  138. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  139. package/dist/esm/core/crypto/ephemeral.mjs +1 -1
  140. package/dist/esm/core/crypto/index.mjs +1 -1
  141. package/dist/esm/core/crypto/keyless.mjs +1 -1
  142. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  143. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  144. package/dist/esm/core/crypto/proof.mjs +1 -1
  145. package/dist/esm/core/crypto/publicKey.mjs +1 -1
  146. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  147. package/dist/esm/core/crypto/signature.mjs +1 -1
  148. package/dist/esm/core/crypto/singleKey.mjs +1 -1
  149. package/dist/esm/core/index.mjs +1 -1
  150. package/dist/esm/index.d.mts +1 -1
  151. package/dist/esm/index.mjs +1 -1
  152. package/dist/esm/internal/account.mjs +1 -1
  153. package/dist/esm/internal/ans.mjs +1 -1
  154. package/dist/esm/internal/coin.mjs +1 -1
  155. package/dist/esm/internal/digitalAsset.mjs +1 -1
  156. package/dist/esm/internal/event.mjs +1 -1
  157. package/dist/esm/internal/faucet.mjs +1 -1
  158. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  159. package/dist/esm/internal/general.mjs +1 -1
  160. package/dist/esm/internal/keyless.mjs +1 -1
  161. package/dist/esm/internal/staking.mjs +1 -1
  162. package/dist/esm/internal/table.mjs +1 -1
  163. package/dist/esm/internal/transaction.mjs +1 -1
  164. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  165. package/dist/esm/internal/view.mjs +1 -1
  166. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  167. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  168. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  169. package/dist/esm/transactions/index.d.mts +1 -1
  170. package/dist/esm/transactions/index.mjs +1 -1
  171. package/dist/esm/transactions/instances/chainId.mjs +1 -1
  172. package/dist/esm/transactions/instances/identifier.mjs +1 -1
  173. package/dist/esm/transactions/instances/index.mjs +1 -1
  174. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  175. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
  176. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  177. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  178. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  179. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
  180. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  181. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  182. package/dist/esm/transactions/management/index.mjs +1 -1
  183. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  184. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +3 -2
  185. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  186. package/dist/esm/transactions/transactionBuilder/index.d.mts +1 -1
  187. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  188. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +1 -0
  189. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  190. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
  191. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  192. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  193. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  194. package/dist/esm/utils/index.mjs +1 -1
  195. package/dist/esm/utils/normalizeBundle.mjs +1 -1
  196. package/dist/esm/version.d.mts +1 -1
  197. package/dist/esm/version.mjs +1 -1
  198. package/package.json +1 -1
  199. package/src/api/fungibleAsset.ts +36 -2
  200. package/src/bcs/serializable/moveStructs.ts +5 -2
  201. package/src/cli/move.ts +6 -10
  202. package/src/transactions/transactionBuilder/helpers.ts +12 -1
  203. package/src/transactions/transactionBuilder/remoteAbi.ts +58 -24
  204. package/src/transactions/transactionBuilder/transactionBuilder.ts +2 -3
  205. package/src/version.ts +1 -1
  206. package/dist/esm/chunk-6J7KF4CI.mjs +0 -2
  207. package/dist/esm/chunk-7UBKXR37.mjs +0 -2
  208. package/dist/esm/chunk-7UBKXR37.mjs.map +0 -1
  209. package/dist/esm/chunk-DKEUYXWU.mjs +0 -2
  210. package/dist/esm/chunk-DKEUYXWU.mjs.map +0 -1
  211. package/dist/esm/chunk-P2YIFHMW.mjs +0 -2
  212. package/dist/esm/chunk-PPJYFA3V.mjs +0 -2
  213. package/dist/esm/chunk-PPJYFA3V.mjs.map +0 -1
  214. package/dist/esm/chunk-XAISUKMY.mjs +0 -2
  215. package/dist/esm/chunk-XAISUKMY.mjs.map +0 -1
  216. package/dist/esm/chunk-XQM7P7PK.mjs +0 -2
  217. package/dist/esm/chunk-XQM7P7PK.mjs.map +0 -1
  218. /package/dist/esm/{chunk-XEYFKOYN.mjs.map → chunk-3EDNV7KS.mjs.map} +0 -0
  219. /package/dist/esm/{chunk-XHCH7LG5.mjs.map → chunk-3JEL6FIZ.mjs.map} +0 -0
  220. /package/dist/esm/{chunk-C75WI2DU.mjs.map → chunk-3KZ7HFFA.mjs.map} +0 -0
  221. /package/dist/esm/{chunk-MRYNASDY.mjs.map → chunk-3VUSIKCF.mjs.map} +0 -0
  222. /package/dist/esm/{chunk-27EDTWDR.mjs.map → chunk-47M33ENP.mjs.map} +0 -0
  223. /package/dist/esm/{chunk-DIJ7EEXC.mjs.map → chunk-4EPLOSKY.mjs.map} +0 -0
  224. /package/dist/esm/{chunk-4IMYC7VX.mjs.map → chunk-4U3MAEYH.mjs.map} +0 -0
  225. /package/dist/esm/{chunk-WRKH7MMI.mjs.map → chunk-4ZM7V7HN.mjs.map} +0 -0
  226. /package/dist/esm/{chunk-SZ2FGGM6.mjs.map → chunk-5Y3O7MLN.mjs.map} +0 -0
  227. /package/dist/esm/{chunk-BI5F4IYT.mjs.map → chunk-64P5SB7N.mjs.map} +0 -0
  228. /package/dist/esm/{chunk-PI34ZZ2Q.mjs.map → chunk-6ZQWPHLV.mjs.map} +0 -0
  229. /package/dist/esm/{chunk-IMGLHDIA.mjs.map → chunk-76OH2Z4Q.mjs.map} +0 -0
  230. /package/dist/esm/{chunk-XAFM4JZX.mjs.map → chunk-77NXCSLY.mjs.map} +0 -0
  231. /package/dist/esm/{chunk-GWUK3P3Y.mjs.map → chunk-7JUBWA7V.mjs.map} +0 -0
  232. /package/dist/esm/{chunk-B3UIFT2G.mjs.map → chunk-A2Z7I2EY.mjs.map} +0 -0
  233. /package/dist/esm/{chunk-HPZ2S4FE.mjs.map → chunk-A63SMUOU.mjs.map} +0 -0
  234. /package/dist/esm/{chunk-YOJC4OXK.mjs.map → chunk-BCY5UOGP.mjs.map} +0 -0
  235. /package/dist/esm/{chunk-TYS55ZIF.mjs.map → chunk-BF46IXHH.mjs.map} +0 -0
  236. /package/dist/esm/{chunk-XZMPH72M.mjs.map → chunk-BI5P5ASH.mjs.map} +0 -0
  237. /package/dist/esm/{chunk-LXLISEQ4.mjs.map → chunk-BOYYQAB4.mjs.map} +0 -0
  238. /package/dist/esm/{chunk-NCKTBQKI.mjs.map → chunk-C2IJG37E.mjs.map} +0 -0
  239. /package/dist/esm/{chunk-ENKXK5WP.mjs.map → chunk-CAC7G2HC.mjs.map} +0 -0
  240. /package/dist/esm/{chunk-FY7RZWGY.mjs.map → chunk-CPCS5KIA.mjs.map} +0 -0
  241. /package/dist/esm/{chunk-3XA2PJT3.mjs.map → chunk-DCBXXRXS.mjs.map} +0 -0
  242. /package/dist/esm/{chunk-FDVU4LJF.mjs.map → chunk-FD2VCIZG.mjs.map} +0 -0
  243. /package/dist/esm/{chunk-TSTGVIAU.mjs.map → chunk-FGFQZQGX.mjs.map} +0 -0
  244. /package/dist/esm/{chunk-JWNKY2N3.mjs.map → chunk-FTA2ZMUX.mjs.map} +0 -0
  245. /package/dist/esm/{chunk-6RI3QGKV.mjs.map → chunk-GCPWPGCS.mjs.map} +0 -0
  246. /package/dist/esm/{chunk-IPBKWCHZ.mjs.map → chunk-GMHGYDZQ.mjs.map} +0 -0
  247. /package/dist/esm/{chunk-OFERLF6R.mjs.map → chunk-GPZEPKKD.mjs.map} +0 -0
  248. /package/dist/esm/{chunk-MIEL2ZWA.mjs.map → chunk-GRZVD45M.mjs.map} +0 -0
  249. /package/dist/esm/{chunk-JBI3MFD3.mjs.map → chunk-GXLFQEPR.mjs.map} +0 -0
  250. /package/dist/esm/{chunk-MS4MRLGA.mjs.map → chunk-H6YNXJNF.mjs.map} +0 -0
  251. /package/dist/esm/{chunk-5YKVCBMZ.mjs.map → chunk-HACVLK5I.mjs.map} +0 -0
  252. /package/dist/esm/{chunk-5AVPZE2Z.mjs.map → chunk-HED6CPN2.mjs.map} +0 -0
  253. /package/dist/esm/{chunk-EPYUPOEE.mjs.map → chunk-HJT2Q5NL.mjs.map} +0 -0
  254. /package/dist/esm/{chunk-HZCFCP4P.mjs.map → chunk-ICE6OL3A.mjs.map} +0 -0
  255. /package/dist/esm/{chunk-Y5PEEKOM.mjs.map → chunk-ILXK4OH5.mjs.map} +0 -0
  256. /package/dist/esm/{chunk-YXRXKYCR.mjs.map → chunk-IOMJ5OWV.mjs.map} +0 -0
  257. /package/dist/esm/{chunk-AX7L7E42.mjs.map → chunk-JM7CSDJ3.mjs.map} +0 -0
  258. /package/dist/esm/{chunk-PS4JR3KO.mjs.map → chunk-K6NUFABY.mjs.map} +0 -0
  259. /package/dist/esm/{chunk-6AO7XFMJ.mjs.map → chunk-KUAN2WZF.mjs.map} +0 -0
  260. /package/dist/esm/{chunk-RQ7N6FTV.mjs.map → chunk-LLLINNAG.mjs.map} +0 -0
  261. /package/dist/esm/{chunk-DBDIEGAX.mjs.map → chunk-LWFSV3OA.mjs.map} +0 -0
  262. /package/dist/esm/{chunk-VJZVCHIS.mjs.map → chunk-MH6HIFMG.mjs.map} +0 -0
  263. /package/dist/esm/{chunk-4435A7EV.mjs.map → chunk-MKOIEX4B.mjs.map} +0 -0
  264. /package/dist/esm/{chunk-BF4ZE37Q.mjs.map → chunk-MLDQ2TY2.mjs.map} +0 -0
  265. /package/dist/esm/{chunk-M2QV232A.mjs.map → chunk-MQGW234H.mjs.map} +0 -0
  266. /package/dist/esm/{chunk-YLDLEASQ.mjs.map → chunk-MUAV4P6C.mjs.map} +0 -0
  267. /package/dist/esm/{chunk-774QDXM7.mjs.map → chunk-N5A4L6Z6.mjs.map} +0 -0
  268. /package/dist/esm/{chunk-S2FOCEY3.mjs.map → chunk-NBGXHLM4.mjs.map} +0 -0
  269. /package/dist/esm/{chunk-772PPMHG.mjs.map → chunk-OKLLJQM4.mjs.map} +0 -0
  270. /package/dist/esm/{chunk-4OMMO2ZM.mjs.map → chunk-OLVNRYGT.mjs.map} +0 -0
  271. /package/dist/esm/{chunk-GBCAP4Z5.mjs.map → chunk-OPGMT27G.mjs.map} +0 -0
  272. /package/dist/esm/{chunk-YJCZU6PR.mjs.map → chunk-P5V7OZNN.mjs.map} +0 -0
  273. /package/dist/esm/{chunk-4TODRUKS.mjs.map → chunk-PS7L2TLP.mjs.map} +0 -0
  274. /package/dist/esm/{chunk-G4UKDWKT.mjs.map → chunk-PVEPP4HR.mjs.map} +0 -0
  275. /package/dist/esm/{chunk-BTTZZ2IQ.mjs.map → chunk-QTNKFKDE.mjs.map} +0 -0
  276. /package/dist/esm/{chunk-42XI3HFJ.mjs.map → chunk-RFA7BIDN.mjs.map} +0 -0
  277. /package/dist/esm/{chunk-CVHPBWAE.mjs.map → chunk-RUVDYKIZ.mjs.map} +0 -0
  278. /package/dist/esm/{chunk-27IBTALL.mjs.map → chunk-TFNJPJF6.mjs.map} +0 -0
  279. /package/dist/esm/{chunk-QUHKUJEO.mjs.map → chunk-TY4IEDJD.mjs.map} +0 -0
  280. /package/dist/esm/{chunk-CR2SYJYG.mjs.map → chunk-V5JJHVMP.mjs.map} +0 -0
  281. /package/dist/esm/{chunk-O5IXBRSF.mjs.map → chunk-VRSZLJVR.mjs.map} +0 -0
  282. /package/dist/esm/{chunk-Q5M2JKZ5.mjs.map → chunk-VY2MJZWM.mjs.map} +0 -0
  283. /package/dist/esm/{chunk-IYZMBB6Z.mjs.map → chunk-WUWJLSGN.mjs.map} +0 -0
  284. /package/dist/esm/{chunk-3DSVH6LX.mjs.map → chunk-XSHUCBNT.mjs.map} +0 -0
  285. /package/dist/esm/{chunk-CDTDQXTN.mjs.map → chunk-Y37TV7SM.mjs.map} +0 -0
  286. /package/dist/esm/{chunk-ANH2FYMX.mjs.map → chunk-YDXU6ALO.mjs.map} +0 -0
  287. /package/dist/esm/{chunk-A5XE22JG.mjs.map → chunk-YF6UA3XW.mjs.map} +0 -0
  288. /package/dist/esm/{chunk-6QGVRNV6.mjs.map → chunk-YPHH6CAO.mjs.map} +0 -0
  289. /package/dist/esm/{chunk-E37YRKWK.mjs.map → chunk-YUNDX5I7.mjs.map} +0 -0
  290. /package/dist/esm/{chunk-KZWAQOS5.mjs.map → chunk-YXXEXFQH.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-A5XE22JG.mjs";import{a as f}from"./chunk-PPJYFA3V.mjs";import{a as g}from"./chunk-SZ2FGGM6.mjs";import{a as u}from"./chunk-BI5F4IYT.mjs";import{a as y}from"./chunk-4IMYC7VX.mjs";import{a as m}from"./chunk-XZMPH72M.mjs";import{a as h}from"./chunk-XHCH7LG5.mjs";import{a as s}from"./chunk-RQ7N6FTV.mjs";import{a as p}from"./chunk-774QDXM7.mjs";import{a as d}from"./chunk-NMD45OTM.mjs";import{a as r}from"./chunk-CVHPBWAE.mjs";import{a}from"./chunk-3XA2PJT3.mjs";import{a as c}from"./chunk-ENKXK5WP.mjs";var t=class{constructor(e){this.config=new d(e),this.account=new s(this.config),this.ans=new p(this.config),this.coin=new r(this.config),this.digitalAsset=new a(this.config),this.event=new c(this.config),this.faucet=new l(this.config),this.fungibleAsset=new f(this.config),this.general=new g(this.config),this.staking=new y(this.config),this.transaction=new h(this.config),this.table=new m(this.config),this.keyless=new u(this.config)}};function n(A,e,b){Object.getOwnPropertyNames(e.prototype).forEach(i=>{let o=Object.getOwnPropertyDescriptor(e.prototype,i);o&&(o.value=function(...w){return this[b][i](...w)},Object.defineProperty(A.prototype,i,o))})}n(t,s,"account");n(t,p,"ans");n(t,r,"coin");n(t,a,"digitalAsset");n(t,c,"event");n(t,l,"faucet");n(t,f,"fungibleAsset");n(t,g,"general");n(t,y,"staking");n(t,h,"transaction");n(t,m,"table");n(t,u,"keyless");export{t as a};
2
- //# sourceMappingURL=chunk-JWNKY2N3.mjs.map
1
+ import{a as l}from"./chunk-YF6UA3XW.mjs";import{a as f}from"./chunk-LAZTLEXF.mjs";import{a as g}from"./chunk-5Y3O7MLN.mjs";import{a as u}from"./chunk-64P5SB7N.mjs";import{a as y}from"./chunk-4U3MAEYH.mjs";import{a as m}from"./chunk-BI5P5ASH.mjs";import{a as h}from"./chunk-3JEL6FIZ.mjs";import{a as s}from"./chunk-LLLINNAG.mjs";import{a as p}from"./chunk-N5A4L6Z6.mjs";import{a as d}from"./chunk-NMD45OTM.mjs";import{a as r}from"./chunk-RUVDYKIZ.mjs";import{a}from"./chunk-DCBXXRXS.mjs";import{a as c}from"./chunk-CAC7G2HC.mjs";var t=class{constructor(e){this.config=new d(e),this.account=new s(this.config),this.ans=new p(this.config),this.coin=new r(this.config),this.digitalAsset=new a(this.config),this.event=new c(this.config),this.faucet=new l(this.config),this.fungibleAsset=new f(this.config),this.general=new g(this.config),this.staking=new y(this.config),this.transaction=new h(this.config),this.table=new m(this.config),this.keyless=new u(this.config)}};function n(A,e,b){Object.getOwnPropertyNames(e.prototype).forEach(i=>{let o=Object.getOwnPropertyDescriptor(e.prototype,i);o&&(o.value=function(...w){return this[b][i](...w)},Object.defineProperty(A.prototype,i,o))})}n(t,s,"account");n(t,p,"ans");n(t,r,"coin");n(t,a,"digitalAsset");n(t,c,"event");n(t,l,"faucet");n(t,f,"fungibleAsset");n(t,g,"general");n(t,y,"staking");n(t,h,"transaction");n(t,m,"table");n(t,u,"keyless");export{t as a};
2
+ //# sourceMappingURL=chunk-FTA2ZMUX.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as o}from"./chunk-TYS55ZIF.mjs";import{a as u,b as r}from"./chunk-XAISUKMY.mjs";import{e as t}from"./chunk-6QGVRNV6.mjs";import{a as i}from"./chunk-HPZ2S4FE.mjs";var c=class extends i{constructor(e){super();this.accountAddress=o.ONE;this.moduleName=new r("account");this.structName=new r("RotationProofChallenge");this.sequenceNumber=new t(e.sequenceNumber),this.originator=e.originator,this.currentAuthKey=e.currentAuthKey,this.newPublicKey=u.U8(e.newPublicKey.toUint8Array())}serialize(e){e.serialize(this.accountAddress),e.serialize(this.moduleName),e.serialize(this.structName),e.serialize(this.sequenceNumber),e.serialize(this.originator),e.serialize(this.currentAuthKey),e.serialize(this.newPublicKey)}};export{c as a};
2
- //# sourceMappingURL=chunk-6RI3QGKV.mjs.map
1
+ import{b as o}from"./chunk-BF46IXHH.mjs";import{a as u,b as r}from"./chunk-KMJ6TF6Y.mjs";import{e as t}from"./chunk-YPHH6CAO.mjs";import{a as i}from"./chunk-A63SMUOU.mjs";var c=class extends i{constructor(e){super();this.accountAddress=o.ONE;this.moduleName=new r("account");this.structName=new r("RotationProofChallenge");this.sequenceNumber=new t(e.sequenceNumber),this.originator=e.originator,this.currentAuthKey=e.currentAuthKey,this.newPublicKey=u.U8(e.newPublicKey.toUint8Array())}serialize(e){e.serialize(this.accountAddress),e.serialize(this.moduleName),e.serialize(this.structName),e.serialize(this.sequenceNumber),e.serialize(this.originator),e.serialize(this.currentAuthKey),e.serialize(this.newPublicKey)}};export{c as a};
2
+ //# sourceMappingURL=chunk-GCPWPGCS.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as p}from"./chunk-Q5M2JKZ5.mjs";async function o(e){let{type:t,originMethod:s,path:i,body:r,acceptType:R,contentType:f,params:c,aptosConfig:n,overrides:A}=e,d=n.getRequestUrl(t);return p({url:d,method:"POST",originMethod:s,path:i,body:r,contentType:f,acceptType:R,params:c,overrides:A},n,e.type)}async function q(e){let{aptosConfig:t}=e;return o({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function C(e){let{aptosConfig:t}=e;return o({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function m(e){let{aptosConfig:t}=e,s={...t,clientConfig:{...t.clientConfig}};return delete s?.clientConfig?.API_KEY,o({...e,type:"Faucet",overrides:{...s.clientConfig,...s.faucetConfig,...e.overrides,HEADERS:{...s.clientConfig?.HEADERS,...s.faucetConfig?.HEADERS}}})}async function E(e){return o({...e,type:"Pepper"})}async function a(e){return o({...e,type:"Prover"})}export{o as a,q as b,C as c,m as d,E as e,a as f};
2
- //# sourceMappingURL=chunk-IPBKWCHZ.mjs.map
1
+ import{b as p}from"./chunk-VY2MJZWM.mjs";async function o(e){let{type:t,originMethod:s,path:i,body:r,acceptType:R,contentType:f,params:c,aptosConfig:n,overrides:A}=e,d=n.getRequestUrl(t);return p({url:d,method:"POST",originMethod:s,path:i,body:r,contentType:f,acceptType:R,params:c,overrides:A},n,e.type)}async function q(e){let{aptosConfig:t}=e;return o({...e,type:"Fullnode",overrides:{...t.clientConfig,...t.fullnodeConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.fullnodeConfig?.HEADERS}}})}async function C(e){let{aptosConfig:t}=e;return o({...e,type:"Indexer",overrides:{...t.clientConfig,...t.indexerConfig,...e.overrides,HEADERS:{...t.clientConfig?.HEADERS,...t.indexerConfig?.HEADERS}}})}async function m(e){let{aptosConfig:t}=e,s={...t,clientConfig:{...t.clientConfig}};return delete s?.clientConfig?.API_KEY,o({...e,type:"Faucet",overrides:{...s.clientConfig,...s.faucetConfig,...e.overrides,HEADERS:{...s.clientConfig?.HEADERS,...s.faucetConfig?.HEADERS}}})}async function E(e){return o({...e,type:"Pepper"})}async function a(e){return o({...e,type:"Prover"})}export{o as a,q as b,C as c,m as d,E as e,a as f};
2
+ //# sourceMappingURL=chunk-GMHGYDZQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{m as c,v as n}from"./chunk-HIHKTLLM.mjs";import{c as p}from"./chunk-IPBKWCHZ.mjs";import{b as i}from"./chunk-27EDTWDR.mjs";async function d(o){let{aptosConfig:s}=o,{data:e}=await i({aptosConfig:s,originMethod:"getLedgerInfo",path:""});return e}async function C(o){let{aptosConfig:s,limit:e}=o;return(await a({aptosConfig:s,query:{query:c,variables:{limit:e}},originMethod:"getChainTopUserTransactions"})).user_transactions}async function a(o){let{aptosConfig:s,query:e,originMethod:t}=o,{data:r}=await p({aptosConfig:s,originMethod:t??"queryIndexer",path:"",body:e,overrides:{WITH_CREDENTIALS:!1}});return r}async function u(o){let{aptosConfig:s}=o;return(await a({aptosConfig:s,query:{query:n},originMethod:"getProcessorStatuses"})).processor_status}async function h(o){let s=await u({aptosConfig:o.aptosConfig});return BigInt(s[0].last_success_version)}async function T(o){let{aptosConfig:s,processorType:e}=o;return(await a({aptosConfig:s,query:{query:n,variables:{where_condition:{processor:{_eq:e}}}},originMethod:"getProcessorStatus"})).processor_status[0]}export{d as a,C as b,a as c,u as d,h as e,T as f};
2
- //# sourceMappingURL=chunk-OFERLF6R.mjs.map
1
+ import{m as c,v as n}from"./chunk-HIHKTLLM.mjs";import{b as i}from"./chunk-47M33ENP.mjs";import{c as p}from"./chunk-GMHGYDZQ.mjs";async function d(o){let{aptosConfig:s}=o,{data:e}=await i({aptosConfig:s,originMethod:"getLedgerInfo",path:""});return e}async function C(o){let{aptosConfig:s,limit:e}=o;return(await a({aptosConfig:s,query:{query:c,variables:{limit:e}},originMethod:"getChainTopUserTransactions"})).user_transactions}async function a(o){let{aptosConfig:s,query:e,originMethod:t}=o,{data:r}=await p({aptosConfig:s,originMethod:t??"queryIndexer",path:"",body:e,overrides:{WITH_CREDENTIALS:!1}});return r}async function u(o){let{aptosConfig:s}=o;return(await a({aptosConfig:s,query:{query:n},originMethod:"getProcessorStatuses"})).processor_status}async function h(o){let s=await u({aptosConfig:o.aptosConfig});return BigInt(s[0].last_success_version)}async function T(o){let{aptosConfig:s,processorType:e}=o;return(await a({aptosConfig:s,query:{query:n,variables:{where_condition:{processor:{_eq:e}}}},originMethod:"getProcessorStatus"})).processor_status[0]}export{d as a,C as b,a as c,u as d,h as e,T as f};
2
+ //# sourceMappingURL=chunk-GPZEPKKD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as P}from"./chunk-GWUK3P3Y.mjs";import{c as d}from"./chunk-OFERLF6R.mjs";import{d as w,e as h,f as k,g as T,h as b,j as O,k as q,l as v}from"./chunk-HIHKTLLM.mjs";import{a as f}from"./chunk-O5IXBRSF.mjs";import{a as C}from"./chunk-CR2SYJYG.mjs";import{b as y}from"./chunk-PI34ZZ2Q.mjs";import{b as l}from"./chunk-B3UIFT2G.mjs";import{a as g}from"./chunk-XAFM4JZX.mjs";import{b as c}from"./chunk-TYS55ZIF.mjs";import{a as _}from"./chunk-AH44UPM4.mjs";import{b as A,d as p}from"./chunk-27EDTWDR.mjs";import{a as m}from"./chunk-GHYE26Q5.mjs";async function S(t){let{aptosConfig:n,accountAddress:e}=t,{data:o}=await A({aptosConfig:n,originMethod:"getInfo",path:`accounts/${c.from(e).toString()}`});return o}async function H(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return p({aptosConfig:n,originMethod:"getModules",path:`accounts/${c.from(e).toString()}/modules`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??1e3}})}async function J(t){return t.options?.ledgerVersion!==void 0?G(t):_(async()=>G(t),`module-${t.accountAddress}-${t.moduleName}`,1e3*60*5)()}async function G(t){let{aptosConfig:n,accountAddress:e,moduleName:o,options:s}=t,{data:r}=await A({aptosConfig:n,originMethod:"getModule",path:`accounts/${c.from(e).toString()}/module/${o}`,params:{ledger_version:s?.ledgerVersion}});return r}async function U(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return p({aptosConfig:n,originMethod:"getTransactions",path:`accounts/${c.from(e).toString()}/transactions`,params:{start:o?.offset,limit:o?.limit}})}async function X(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return p({aptosConfig:n,originMethod:"getResources",path:`accounts/${c.from(e).toString()}/resources`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??999}})}async function K(t){let{aptosConfig:n,accountAddress:e,resourceType:o,options:s}=t,{data:r}=await A({aptosConfig:n,originMethod:"getResource",path:`accounts/${c.from(e).toString()}/resource/${o}`,params:{ledger_version:s?.ledgerVersion}});return r.data}async function Q(t){let{aptosConfig:n,authenticationKey:e,options:o}=t,s=await K({aptosConfig:n,accountAddress:"0x1",resourceType:"0x1::account::OriginatingAddress",options:o}),{address_map:{handle:r}}=s,a=c.from(e);try{let i=await P({aptosConfig:n,handle:r,data:{key:a.toString(),key_type:"address",value_type:"address"},options:o});return c.from(i)}catch(i){if(i instanceof m&&i.data.error_code==="table_item_not_found")return a;throw i}}async function Y(t){let{aptosConfig:n,accountAddress:e}=t,s={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}},a=await d({aptosConfig:n,query:{query:q,variables:{where_condition:s}},originMethod:"getAccountTokensCount"});return a.current_token_ownerships_v2_aggregate.aggregate?a.current_token_ownerships_v2_aggregate.aggregate.count:0}async function Z(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(r.token_standard={_eq:o?.tokenStandard});let a={query:b,variables:{where_condition:r,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 oo(t){let{aptosConfig:n,accountAddress:e,collectionAddress:o,options:s}=t,r=c.from(e).toStringLong(),a=c.from(o).toStringLong(),i={owner_address:{_eq:r},current_token_data:{collection_id:{_eq:a}},amount:{_gt:0}};s?.tokenStandard&&(i.token_standard={_eq:s?.tokenStandard});let u={query:O,variables:{where_condition:i,offset:s?.offset,limit:s?.limit,order_by:s?.orderBy}};return(await d({aptosConfig:n,query:u,originMethod:"getAccountOwnedTokensFromCollectionAddress"})).current_token_ownerships_v2}async function to(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(r.current_collection={token_standard:{_eq:o?.tokenStandard}});let a={query:k,variables:{where_condition:r,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 eo(t){let{aptosConfig:n,accountAddress:e}=t,o=c.from(e).toStringLong(),r=await d({aptosConfig:n,query:{query:v,variables:{address:o}},originMethod:"getAccountTransactionsCount"});return r.account_transactions_aggregate.aggregate?r.account_transactions_aggregate.aggregate.count:0}async function no(t){let{aptosConfig:n,accountAddress:e,coinType:o}=t,s=c.from(e).toStringLong(),r=await I({aptosConfig:n,accountAddress:s,options:{where:{asset_type:{_eq:o}}}});return r[0]?r[0].amount:0}async function I(t){let{aptosConfig:n,accountAddress:e,options:o}=t,s=c.from(e).toStringLong(),r={...o?.where,owner_address:{_eq:s}},a={query:h,variables:{where_condition:r,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 ro(t){let{aptosConfig:n,accountAddress:e}=t,o=c.from(e).toStringLong(),r=await d({aptosConfig:n,query:{query:w,variables:{address:o}},originMethod:"getAccountCoinsCount"});if(!r.current_fungible_asset_balances_aggregate.aggregate)throw Error("Failed to get the count of account coins");return r.current_fungible_asset_balances_aggregate.aggregate.count}async function so(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()}},a={query:T,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedObjects"})).current_objects}async function co(t){let{aptosConfig:n,privateKey:e}=t,o=new C(e.publicKey());if(e instanceof y){let r=g.fromPublicKey({publicKey:o}).derivedAddress();return f.fromPrivateKey({privateKey:e,address:r})}if(e instanceof l){let s=g.fromPublicKey({publicKey:o});if(await M({authKey:s,aptosConfig:n})){let u=s.derivedAddress();return f.fromPrivateKey({privateKey:e,address:u,legacy:!1})}let a=g.fromPublicKey({publicKey:o.publicKey});if(await M({authKey:a,aptosConfig:n})){let u=a.derivedAddress();return f.fromPrivateKey({privateKey:e,address:u,legacy:!0})}}throw new Error(`Can't derive account from private key ${e}`)}async function M(t){let{aptosConfig:n,authKey:e}=t,o=await Q({aptosConfig:n,authenticationKey:e.derivedAddress()});try{return await S({aptosConfig:n,accountAddress:o}),!0}catch(s){if(s.status===404)return!1;throw new Error(`Error while looking for an account info ${o.toString()}`)}}export{S as a,H as b,J as c,U as d,X as e,K as f,Q as g,Y as h,Z as i,oo as j,to as k,eo as l,no as m,I as n,ro as o,so as p,co as q,M as r};
2
- //# sourceMappingURL=chunk-MIEL2ZWA.mjs.map
1
+ import{a as P}from"./chunk-7JUBWA7V.mjs";import{c as d}from"./chunk-GPZEPKKD.mjs";import{d as w,e as h,f as k,g as T,h as b,j as O,k as q,l as v}from"./chunk-HIHKTLLM.mjs";import{a as f}from"./chunk-VRSZLJVR.mjs";import{a as C}from"./chunk-V5JJHVMP.mjs";import{b as y}from"./chunk-6ZQWPHLV.mjs";import{b as l}from"./chunk-A2Z7I2EY.mjs";import{a as g}from"./chunk-77NXCSLY.mjs";import{b as c}from"./chunk-BF46IXHH.mjs";import{a as _}from"./chunk-AH44UPM4.mjs";import{b as A,d as p}from"./chunk-47M33ENP.mjs";import{a as m}from"./chunk-GHYE26Q5.mjs";async function S(t){let{aptosConfig:n,accountAddress:e}=t,{data:o}=await A({aptosConfig:n,originMethod:"getInfo",path:`accounts/${c.from(e).toString()}`});return o}async function H(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return p({aptosConfig:n,originMethod:"getModules",path:`accounts/${c.from(e).toString()}/modules`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??1e3}})}async function J(t){return t.options?.ledgerVersion!==void 0?G(t):_(async()=>G(t),`module-${t.accountAddress}-${t.moduleName}`,1e3*60*5)()}async function G(t){let{aptosConfig:n,accountAddress:e,moduleName:o,options:s}=t,{data:r}=await A({aptosConfig:n,originMethod:"getModule",path:`accounts/${c.from(e).toString()}/module/${o}`,params:{ledger_version:s?.ledgerVersion}});return r}async function U(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return p({aptosConfig:n,originMethod:"getTransactions",path:`accounts/${c.from(e).toString()}/transactions`,params:{start:o?.offset,limit:o?.limit}})}async function X(t){let{aptosConfig:n,accountAddress:e,options:o}=t;return p({aptosConfig:n,originMethod:"getResources",path:`accounts/${c.from(e).toString()}/resources`,params:{ledger_version:o?.ledgerVersion,start:o?.offset,limit:o?.limit??999}})}async function K(t){let{aptosConfig:n,accountAddress:e,resourceType:o,options:s}=t,{data:r}=await A({aptosConfig:n,originMethod:"getResource",path:`accounts/${c.from(e).toString()}/resource/${o}`,params:{ledger_version:s?.ledgerVersion}});return r.data}async function Q(t){let{aptosConfig:n,authenticationKey:e,options:o}=t,s=await K({aptosConfig:n,accountAddress:"0x1",resourceType:"0x1::account::OriginatingAddress",options:o}),{address_map:{handle:r}}=s,a=c.from(e);try{let i=await P({aptosConfig:n,handle:r,data:{key:a.toString(),key_type:"address",value_type:"address"},options:o});return c.from(i)}catch(i){if(i instanceof m&&i.data.error_code==="table_item_not_found")return a;throw i}}async function Y(t){let{aptosConfig:n,accountAddress:e}=t,s={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}},a=await d({aptosConfig:n,query:{query:q,variables:{where_condition:s}},originMethod:"getAccountTokensCount"});return a.current_token_ownerships_v2_aggregate.aggregate?a.current_token_ownerships_v2_aggregate.aggregate.count:0}async function Z(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(r.token_standard={_eq:o?.tokenStandard});let a={query:b,variables:{where_condition:r,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 oo(t){let{aptosConfig:n,accountAddress:e,collectionAddress:o,options:s}=t,r=c.from(e).toStringLong(),a=c.from(o).toStringLong(),i={owner_address:{_eq:r},current_token_data:{collection_id:{_eq:a}},amount:{_gt:0}};s?.tokenStandard&&(i.token_standard={_eq:s?.tokenStandard});let u={query:O,variables:{where_condition:i,offset:s?.offset,limit:s?.limit,order_by:s?.orderBy}};return(await d({aptosConfig:n,query:u,originMethod:"getAccountOwnedTokensFromCollectionAddress"})).current_token_ownerships_v2}async function to(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()},amount:{_gt:0}};o?.tokenStandard&&(r.current_collection={token_standard:{_eq:o?.tokenStandard}});let a={query:k,variables:{where_condition:r,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 eo(t){let{aptosConfig:n,accountAddress:e}=t,o=c.from(e).toStringLong(),r=await d({aptosConfig:n,query:{query:v,variables:{address:o}},originMethod:"getAccountTransactionsCount"});return r.account_transactions_aggregate.aggregate?r.account_transactions_aggregate.aggregate.count:0}async function no(t){let{aptosConfig:n,accountAddress:e,coinType:o}=t,s=c.from(e).toStringLong(),r=await I({aptosConfig:n,accountAddress:s,options:{where:{asset_type:{_eq:o}}}});return r[0]?r[0].amount:0}async function I(t){let{aptosConfig:n,accountAddress:e,options:o}=t,s=c.from(e).toStringLong(),r={...o?.where,owner_address:{_eq:s}},a={query:h,variables:{where_condition:r,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 ro(t){let{aptosConfig:n,accountAddress:e}=t,o=c.from(e).toStringLong(),r=await d({aptosConfig:n,query:{query:w,variables:{address:o}},originMethod:"getAccountCoinsCount"});if(!r.current_fungible_asset_balances_aggregate.aggregate)throw Error("Failed to get the count of account coins");return r.current_fungible_asset_balances_aggregate.aggregate.count}async function so(t){let{aptosConfig:n,accountAddress:e,options:o}=t,r={owner_address:{_eq:c.from(e).toStringLong()}},a={query:T,variables:{where_condition:r,offset:o?.offset,limit:o?.limit,order_by:o?.orderBy}};return(await d({aptosConfig:n,query:a,originMethod:"getAccountOwnedObjects"})).current_objects}async function co(t){let{aptosConfig:n,privateKey:e}=t,o=new C(e.publicKey());if(e instanceof y){let r=g.fromPublicKey({publicKey:o}).derivedAddress();return f.fromPrivateKey({privateKey:e,address:r})}if(e instanceof l){let s=g.fromPublicKey({publicKey:o});if(await M({authKey:s,aptosConfig:n})){let u=s.derivedAddress();return f.fromPrivateKey({privateKey:e,address:u,legacy:!1})}let a=g.fromPublicKey({publicKey:o.publicKey});if(await M({authKey:a,aptosConfig:n})){let u=a.derivedAddress();return f.fromPrivateKey({privateKey:e,address:u,legacy:!0})}}throw new Error(`Can't derive account from private key ${e}`)}async function M(t){let{aptosConfig:n,authKey:e}=t,o=await Q({aptosConfig:n,authenticationKey:e.derivedAddress()});try{return await S({aptosConfig:n,accountAddress:o}),!0}catch(s){if(s.status===404)return!1;throw new Error(`Error while looking for an account info ${o.toString()}`)}}export{S as a,H as b,J as c,U as d,X as e,K as f,Q as g,Y as h,Z as i,oo as j,to as k,eo as l,no as m,I as n,ro as o,so as p,co as q,M as r};
2
+ //# sourceMappingURL=chunk-GRZVD45M.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-6AO7XFMJ.mjs";import{c as p}from"./chunk-MRYNASDY.mjs";import{c as o}from"./chunk-OFERLF6R.mjs";import{o as u,r as g,s as A}from"./chunk-HIHKTLLM.mjs";import{f as a,i as r}from"./chunk-42XI3HFJ.mjs";async function G(t){let{aptosConfig:s,options:e}=t,n={query:A,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetMetadata"})).fungible_asset_metadata}async function h(t){let{aptosConfig:s,options:e}=t,n={query:g,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetActivities"})).fungible_asset_activities}async function M(t){let{aptosConfig:s,options:e}=t,n={query:u,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getCurrentFungibleAssetBalances"})).current_fungible_asset_balances}var b={typeParameters:[{constraints:[]}],parameters:[p("0x1::object::Object"),new r,new a]};async function x(t){let{aptosConfig:s,sender:e,fungibleAssetMetadataAddress:n,recipient:i,amount:l,options:f}=t;return c({aptosConfig:s,sender:e.accountAddress,data:{function:"0x1::primary_fungible_store::transfer",typeArguments:["0x1::fungible_asset::Metadata"],functionArguments:[n,i,l],abi:b},options:f})}export{G as a,h as b,M as c,x as d};
2
- //# sourceMappingURL=chunk-JBI3MFD3.mjs.map
1
+ import{a as c}from"./chunk-KUAN2WZF.mjs";import{c as p}from"./chunk-3VUSIKCF.mjs";import{c as o}from"./chunk-GPZEPKKD.mjs";import{o as u,r as g,s as A}from"./chunk-HIHKTLLM.mjs";import{f as a,i as r}from"./chunk-RFA7BIDN.mjs";async function G(t){let{aptosConfig:s,options:e}=t,n={query:A,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetMetadata"})).fungible_asset_metadata}async function h(t){let{aptosConfig:s,options:e}=t,n={query:g,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getFungibleAssetActivities"})).fungible_asset_activities}async function M(t){let{aptosConfig:s,options:e}=t,n={query:u,variables:{where_condition:e?.where,limit:e?.limit,offset:e?.offset}};return(await o({aptosConfig:s,query:n,originMethod:"getCurrentFungibleAssetBalances"})).current_fungible_asset_balances}var b={typeParameters:[{constraints:[]}],parameters:[p("0x1::object::Object"),new r,new a]};async function x(t){let{aptosConfig:s,sender:e,fungibleAssetMetadataAddress:n,recipient:i,amount:l,options:f}=t;return c({aptosConfig:s,sender:e.accountAddress,data:{function:"0x1::primary_fungible_store::transfer",typeArguments:["0x1::fungible_asset::Metadata"],functionArguments:[n,i,l],abi:b},options:f})}export{G as a,h as b,M as c,x as d};
2
+ //# sourceMappingURL=chunk-GXLFQEPR.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-HPZ2S4FE.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-MS4MRLGA.mjs.map
1
+ import{a as r}from"./chunk-A63SMUOU.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-H6YNXJNF.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as T,d as c}from"./chunk-ANH2FYMX.mjs";import{f as A,g as a}from"./chunk-YE5B2S5L.mjs";import{sha3_256 as y}from"@noble/hashes/sha3";function d(e){return e.feePayerAddress?new c(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress):e.secondarySignerAddresses?new T(e.rawTransaction,e.secondarySignerAddresses):e.rawTransaction}function n(e,r){let i=y.create();if(!r.startsWith("APTOS::"))throw new Error(`Domain separator needs to start with 'APTOS::'. Provided - ${r}`);i.update(r);let s=i.digest(),o=e,t=new Uint8Array(s.length+o.length);return t.set(s),t.set(o,s.length),t}function u(e){return n(e.bcsToBytes(),`APTOS::${e.constructor.name}`)}function S(e){let r=d(e);return e.feePayerAddress?n(r.bcsToBytes(),a):e.secondarySignerAddresses?n(r.bcsToBytes(),a):n(r.bcsToBytes(),A)}export{d as a,n as b,u as c,S as d};
2
- //# sourceMappingURL=chunk-5YKVCBMZ.mjs.map
1
+ import{c as T,d as c}from"./chunk-YDXU6ALO.mjs";import{f as A,g as a}from"./chunk-YE5B2S5L.mjs";import{sha3_256 as y}from"@noble/hashes/sha3";function d(e){return e.feePayerAddress?new c(e.rawTransaction,e.secondarySignerAddresses??[],e.feePayerAddress):e.secondarySignerAddresses?new T(e.rawTransaction,e.secondarySignerAddresses):e.rawTransaction}function n(e,r){let i=y.create();if(!r.startsWith("APTOS::"))throw new Error(`Domain separator needs to start with 'APTOS::'. Provided - ${r}`);i.update(r);let s=i.digest(),o=e,t=new Uint8Array(s.length+o.length);return t.set(s),t.set(o,s.length),t}function u(e){return n(e.bcsToBytes(),`APTOS::${e.constructor.name}`)}function S(e){let r=d(e);return e.feePayerAddress?n(r.bcsToBytes(),a):e.secondarySignerAddresses?n(r.bcsToBytes(),a):n(r.bcsToBytes(),A)}export{d as a,n as b,u as c,S as d};
2
+ //# sourceMappingURL=chunk-HACVLK5I.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-WRKH7MMI.mjs";import{a as o,b as c}from"./chunk-U6Z4FNB7.mjs";import{a as h,h as d}from"./chunk-6AO7XFMJ.mjs";import{g as u}from"./chunk-27IBTALL.mjs";import g from"eventemitter3";var m="fulfilled",f=(n=>(n.TransactionSent="transactionSent",n.TransactionSendFailed="transactionSendFailed",n.TransactionExecuted="transactionExecuted",n.TransactionExecutionFailed="transactionExecutionFailed",n.ExecutionFinish="executionFinish",n))(f||{}),p=class extends g{constructor(t,e,a=30,n=100,i=10){super();this.taskQueue=new o;this.transactionsQueue=new o;this.outstandingTransactions=new o;this.sentTransactions=[];this.executedTransactions=[];this.aptosConfig=t,this.account=e,this.started=!1,this.accountSequnceNumber=new l(t,e,a,n,i)}async submitNextTransaction(){try{for(;;){let t=await this.accountSequnceNumber.nextSequenceNumber();if(t===null)return;let e=await this.generateNextTransaction(this.account,t);if(!e)return;let a=d({aptosConfig:this.aptosConfig,transaction:e,signer:this.account});await this.outstandingTransactions.enqueue([a,t])}}catch(t){if(t instanceof c)return;throw new Error(`Submit transaction failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async processTransactions(){try{for(;;){let t=[],e=[],[a,n]=await this.outstandingTransactions.dequeue();for(t.push(a),e.push(n);!this.outstandingTransactions.isEmpty();)[a,n]=await this.outstandingTransactions.dequeue(),t.push(a),e.push(n);let i=await Promise.allSettled(t);for(let s=0;s<i.length&&s<e.length;s+=1){let r=i[s];n=e[s],r.status===m?(this.sentTransactions.push([r.value.hash,n,null]),this.emit("transactionSent",{message:`transaction hash ${r.value.hash} has been committed to chain`,transactionHash:r.value.hash}),await this.checkTransaction(r,n)):(this.sentTransactions.push([r.status,n,r.reason]),this.emit("transactionSendFailed",{message:`failed to commit transaction ${this.sentTransactions.length} with error ${r.reason}`,error:r.reason}))}this.emit("executionFinish",{message:`execute ${i.length} transactions finished`})}}catch(t){if(t instanceof c)return;throw new Error(`Process execution failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async checkTransaction(t,e){try{let a=[];a.push(u({aptosConfig:this.aptosConfig,transactionHash:t.value.hash}));let n=await Promise.allSettled(a);for(let i=0;i<n.length;i+=1){let s=n[i];s.status===m?(this.executedTransactions.push([s.value.hash,e,null]),this.emit("transactionExecuted",{message:`transaction hash ${s.value.hash} has been executed on chain`,transactionHash:t.value.hash})):(this.executedTransactions.push([s.status,e,s.reason]),this.emit("transactionExecutionFailed",{message:`failed to execute transaction ${this.executedTransactions.length} with error ${s.reason}`,error:s.reason}))}}catch(a){throw new Error(`Check transaction failed for ${this.account.accountAddress.toString()} with error ${a}`)}}async push(t,e){this.transactionsQueue.enqueue([t,e])}async generateNextTransaction(t,e){if(this.transactionsQueue.isEmpty())return;let[a,n]=await this.transactionsQueue.dequeue();return h({aptosConfig:this.aptosConfig,sender:t.accountAddress,data:a,options:{...n,accountSequenceNumber:e}})}async run(){try{for(;!this.taskQueue.isCancelled();)await(await this.taskQueue.dequeue())()}catch(t){throw new Error(`Unable to start transaction batching: ${t}`)}}start(){if(this.started)throw new Error("worker has already started");this.started=!0,this.taskQueue.enqueue(()=>this.submitNextTransaction()),this.taskQueue.enqueue(()=>this.processTransactions()),this.run()}stop(){if(this.taskQueue.isCancelled())throw new Error("worker has already stopped");this.started=!1,this.taskQueue.cancel()}};export{m as a,f as b,p as c};
2
- //# sourceMappingURL=chunk-5AVPZE2Z.mjs.map
1
+ import{a as l}from"./chunk-4ZM7V7HN.mjs";import{a as o,b as c}from"./chunk-U6Z4FNB7.mjs";import{a as h,h as d}from"./chunk-KUAN2WZF.mjs";import{g as u}from"./chunk-TFNJPJF6.mjs";import g from"eventemitter3";var m="fulfilled",f=(n=>(n.TransactionSent="transactionSent",n.TransactionSendFailed="transactionSendFailed",n.TransactionExecuted="transactionExecuted",n.TransactionExecutionFailed="transactionExecutionFailed",n.ExecutionFinish="executionFinish",n))(f||{}),p=class extends g{constructor(t,e,a=30,n=100,i=10){super();this.taskQueue=new o;this.transactionsQueue=new o;this.outstandingTransactions=new o;this.sentTransactions=[];this.executedTransactions=[];this.aptosConfig=t,this.account=e,this.started=!1,this.accountSequnceNumber=new l(t,e,a,n,i)}async submitNextTransaction(){try{for(;;){let t=await this.accountSequnceNumber.nextSequenceNumber();if(t===null)return;let e=await this.generateNextTransaction(this.account,t);if(!e)return;let a=d({aptosConfig:this.aptosConfig,transaction:e,signer:this.account});await this.outstandingTransactions.enqueue([a,t])}}catch(t){if(t instanceof c)return;throw new Error(`Submit transaction failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async processTransactions(){try{for(;;){let t=[],e=[],[a,n]=await this.outstandingTransactions.dequeue();for(t.push(a),e.push(n);!this.outstandingTransactions.isEmpty();)[a,n]=await this.outstandingTransactions.dequeue(),t.push(a),e.push(n);let i=await Promise.allSettled(t);for(let s=0;s<i.length&&s<e.length;s+=1){let r=i[s];n=e[s],r.status===m?(this.sentTransactions.push([r.value.hash,n,null]),this.emit("transactionSent",{message:`transaction hash ${r.value.hash} has been committed to chain`,transactionHash:r.value.hash}),await this.checkTransaction(r,n)):(this.sentTransactions.push([r.status,n,r.reason]),this.emit("transactionSendFailed",{message:`failed to commit transaction ${this.sentTransactions.length} with error ${r.reason}`,error:r.reason}))}this.emit("executionFinish",{message:`execute ${i.length} transactions finished`})}}catch(t){if(t instanceof c)return;throw new Error(`Process execution failed for ${this.account.accountAddress.toString()} with error ${t}`)}}async checkTransaction(t,e){try{let a=[];a.push(u({aptosConfig:this.aptosConfig,transactionHash:t.value.hash}));let n=await Promise.allSettled(a);for(let i=0;i<n.length;i+=1){let s=n[i];s.status===m?(this.executedTransactions.push([s.value.hash,e,null]),this.emit("transactionExecuted",{message:`transaction hash ${s.value.hash} has been executed on chain`,transactionHash:t.value.hash})):(this.executedTransactions.push([s.status,e,s.reason]),this.emit("transactionExecutionFailed",{message:`failed to execute transaction ${this.executedTransactions.length} with error ${s.reason}`,error:s.reason}))}}catch(a){throw new Error(`Check transaction failed for ${this.account.accountAddress.toString()} with error ${a}`)}}async push(t,e){this.transactionsQueue.enqueue([t,e])}async generateNextTransaction(t,e){if(this.transactionsQueue.isEmpty())return;let[a,n]=await this.transactionsQueue.dequeue();return h({aptosConfig:this.aptosConfig,sender:t.accountAddress,data:a,options:{...n,accountSequenceNumber:e}})}async run(){try{for(;!this.taskQueue.isCancelled();)await(await this.taskQueue.dequeue())()}catch(t){throw new Error(`Unable to start transaction batching: ${t}`)}}start(){if(this.started)throw new Error("worker has already started");this.started=!0,this.taskQueue.enqueue(()=>this.submitNextTransaction()),this.taskQueue.enqueue(()=>this.processTransactions()),this.run()}stop(){if(this.taskQueue.isCancelled())throw new Error("worker has already stopped");this.started=!1,this.taskQueue.cancel()}};export{m as a,f as b,p as c};
2
+ //# sourceMappingURL=chunk-HED6CPN2.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-4435A7EV.mjs";import{a as m}from"./chunk-6AO7XFMJ.mjs";import{c as A}from"./chunk-OFERLF6R.mjs";import{t as f}from"./chunk-HIHKTLLM.mjs";import{b as w}from"./chunk-TYS55ZIF.mjs";var T=["A name must be between 3 and 63 characters long,","and can only contain lowercase a-z, 0-9, and hyphens.","A name may not start or end with a hyphen."].join(" ");function E(e){return!(!e||e.length<3||e.length>63||!/^[a-z\d][a-z\d-]{1,61}[a-z\d]$/.test(e))}function c(e){let[n,t,...o]=e.replace(/\.apt$/,"").split(".");if(o.length>0)throw new Error(`${e} is invalid. A name can only have two parts, a domain and a subdomain separated by a "."`);if(!E(n))throw new Error(`${n} is not valid. ${T}`);if(t&&!E(t))throw new Error(`${t} is not valid. ${T}`);return{domainName:t||n,subdomainName:t?n:void 0}}var z="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",G="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",P={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:G,custom:null,devnet:null};function d(e){let n=P[e.network];if(!n)throw new Error(`The ANS contract is not deployed to ${e.network}`);return n}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function V(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function j(e){let{aptosConfig:n,expiration:t,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(n),{domainName:N,subdomainName:l}=c(o),S=t.policy==="subdomain:independent"||t.policy==="subdomain:follow-domain";if(l&&!S)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(S&&!l)throw new Error(`Policy is set to ${t.policy} but no subdomain was provided`);if(t.policy==="domain"){let h=t.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let D=h*31536e3;return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[N,D,s,i]},options:a})}if(!l)throw new Error(`${t.policy} requires a subdomain to be provided.`);let _=await I({aptosConfig:n,name:N});if(!_)throw new Error("The domain does not exist");let x=t.policy==="subdomain:independent"?t.expirationDate:_;if(x>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[N,l,Math.round(x/1e3),t.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function I(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t);try{let i=await g({aptosConfig:n,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function Y(e){let{aptosConfig:n,address:t}=e,o=d(n),r=await g({aptosConfig:n,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(t).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function K(e){let{aptosConfig:n,sender:t,name:o,options:r}=e,s=d(n);if(!o)return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function W(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function F(e){let{aptosConfig:n,sender:t,name:o,address:r,options:s}=e,i=d(n),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function H(e){let{aptosConfig:n,name:t}=e,{domainName:o,subdomainName:r=""}=c(t),a=(await A({aptosConfig:n,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r},is_active:{_eq:!0}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=y(a)),a}async function J(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountNames",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(y)}async function X(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountDomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(y)}async function Z(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(y)}async function ee(e){let{aptosConfig:n,options:t,domain:o}=e;return(await A({aptosConfig:n,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""},is_active:{_eq:!0}}}}})).current_aptos_names.map(y)}async function C(e){let{aptosConfig:n}=e,t=d(n),[o]=await g({aptosConfig:n,payload:{function:`${t}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function ne(e){let{aptosConfig:n,sender:t,name:o,years:r=1,options:s}=e,i=d(n),a=r*31536e3,{domainName:u,subdomainName:p}=c(o);if(p)throw new Error("Subdomains cannot be renewed");if(r!==1)throw new Error("Currently, only 1 year renewals are supported");return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function y(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,E as b,c,z as d,G as e,V as f,j as g,I as h,Y as i,K as j,W as k,F as l,H as m,J as n,X as o,Z as p,ee as q,ne as r};
2
- //# sourceMappingURL=chunk-EPYUPOEE.mjs.map
1
+ import{a as g}from"./chunk-MKOIEX4B.mjs";import{a as m}from"./chunk-KUAN2WZF.mjs";import{c as A}from"./chunk-GPZEPKKD.mjs";import{t as f}from"./chunk-HIHKTLLM.mjs";import{b as w}from"./chunk-BF46IXHH.mjs";var T=["A name must be between 3 and 63 characters long,","and can only contain lowercase a-z, 0-9, and hyphens.","A name may not start or end with a hyphen."].join(" ");function E(e){return!(!e||e.length<3||e.length>63||!/^[a-z\d][a-z\d-]{1,61}[a-z\d]$/.test(e))}function c(e){let[n,t,...o]=e.replace(/\.apt$/,"").split(".");if(o.length>0)throw new Error(`${e} is invalid. A name can only have two parts, a domain and a subdomain separated by a "."`);if(!E(n))throw new Error(`${n} is not valid. ${T}`);if(t&&!E(t))throw new Error(`${t} is not valid. ${T}`);return{domainName:t||n,subdomainName:t?n:void 0}}var z="0x37368b46ce665362562c6d1d4ec01a08c8644c488690df5a17e13ba163e20221",G="0x585fc9f0f0c54183b039ffc770ca282ebd87307916c215a3e692f2f8e4305e82",P={testnet:"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c",mainnet:"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c",local:G,custom:null,devnet:null};function d(e){let n=P[e.network];if(!n)throw new Error(`The ANS contract is not deployed to ${e.network}`);return n}var b=e=>{if(e&&typeof e=="object"&&"vec"in e&&Array.isArray(e.vec))return e.vec[0]};async function V(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_owner_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function j(e){let{aptosConfig:n,expiration:t,name:o,sender:r,targetAddress:s,toAddress:i,options:a,transferable:u}=e,p=d(n),{domainName:N,subdomainName:l}=c(o),S=t.policy==="subdomain:independent"||t.policy==="subdomain:follow-domain";if(l&&!S)throw new Error("Subdomains must have an expiration policy of either 'subdomain:independent' or 'subdomain:follow-domain'");if(S&&!l)throw new Error(`Policy is set to ${t.policy} but no subdomain was provided`);if(t.policy==="domain"){let h=t.years??1;if(h!==1)throw new Error("For now, names can only be registered for 1 year at a time");let D=h*31536e3;return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_domain`,functionArguments:[N,D,s,i]},options:a})}if(!l)throw new Error(`${t.policy} requires a subdomain to be provided.`);let _=await I({aptosConfig:n,name:N});if(!_)throw new Error("The domain does not exist");let x=t.policy==="subdomain:independent"?t.expirationDate:_;if(x>_)throw new Error("The subdomain expiration time cannot be greater than the domain expiration time");return await m({aptosConfig:n,sender:r.accountAddress.toString(),data:{function:`${p}::router::register_subdomain`,functionArguments:[N,l,Math.round(x/1e3),t.policy==="subdomain:follow-domain"?1:0,!!u,s,i]},options:a})}async function I(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t);try{let i=await g({aptosConfig:n,payload:{function:`${o}::router::get_expiration`,functionArguments:[r,s]}});return Number(i[0])*1e3}catch{return}}async function Y(e){let{aptosConfig:n,address:t}=e,o=d(n),r=await g({aptosConfig:n,payload:{function:`${o}::router::get_primary_name`,functionArguments:[w.from(t).toString()]}}),s=b(r[1]),i=b(r[0]);if(s)return[i,s].filter(Boolean).join(".")}async function K(e){let{aptosConfig:n,sender:t,name:o,options:r}=e,s=d(n);if(!o)return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::clear_primary_name`,functionArguments:[]},options:r});let{domainName:i,subdomainName:a}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${s}::router::set_primary_name`,functionArguments:[i,a]},options:r})}async function W(e){let{aptosConfig:n,name:t}=e,o=d(n),{domainName:r,subdomainName:s}=c(t),i=await g({aptosConfig:n,payload:{function:`${o}::router::get_target_addr`,functionArguments:[r,s]}}),a=b(i[0]);return a?w.from(a):void 0}async function F(e){let{aptosConfig:n,sender:t,name:o,address:r,options:s}=e,i=d(n),{domainName:a,subdomainName:u}=c(o);return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::set_target_addr`,functionArguments:[a,u,r]},options:s})}async function H(e){let{aptosConfig:n,name:t}=e,{domainName:o,subdomainName:r=""}=c(t),a=(await A({aptosConfig:n,query:{query:f,variables:{where_condition:{domain:{_eq:o},subdomain:{_eq:r},is_active:{_eq:!0}},limit:1}},originMethod:"getName"})).current_aptos_names[0];return a&&(a=y(a)),a}async function J(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountNames",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r}}}}})).current_aptos_names.map(y)}async function X(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountDomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_eq:""}}}}})).current_aptos_names.map(y)}async function Z(e){let{aptosConfig:n,options:t,accountAddress:o}=e,r=await C({aptosConfig:n});return(await A({aptosConfig:n,originMethod:"getAccountSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},owner_address:{_eq:o.toString()},expiration_timestamp:{_gte:r},subdomain:{_neq:""}}}}})).current_aptos_names.map(y)}async function ee(e){let{aptosConfig:n,options:t,domain:o}=e;return(await A({aptosConfig:n,originMethod:"getDomainSubdomains",query:{query:f,variables:{limit:t?.limit,offset:t?.offset,order_by:t?.orderBy,where_condition:{...e.options?.where??{},domain:{_eq:o},subdomain:{_neq:""},is_active:{_eq:!0}}}}})).current_aptos_names.map(y)}async function C(e){let{aptosConfig:n}=e,t=d(n),[o]=await g({aptosConfig:n,payload:{function:`${t}::config::reregistration_grace_sec`,functionArguments:[]}}),r=o/60/60/24,s=()=>new Date;return new Date(s().setDate(s().getDate()-r)).toISOString()}async function ne(e){let{aptosConfig:n,sender:t,name:o,years:r=1,options:s}=e,i=d(n),a=r*31536e3,{domainName:u,subdomainName:p}=c(o);if(p)throw new Error("Subdomains cannot be renewed");if(r!==1)throw new Error("Currently, only 1 year renewals are supported");return await m({aptosConfig:n,sender:t.accountAddress.toString(),data:{function:`${i}::router::renew_domain`,functionArguments:[u,a]},options:s})}function y(e){return{...e,expiration_timestamp:new Date(e.expiration_timestamp).getTime()}}export{T as a,E as b,c,z as d,G as e,V as f,j as g,I as h,Y as i,K as j,W as k,F as l,H as m,J as n,X as o,Z as p,ee as q,ne as r};
2
+ //# sourceMappingURL=chunk-HJT2Q5NL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as y}from"./chunk-IYZMBB6Z.mjs";import{e as o}from"./chunk-DBDIEGAX.mjs";import{a as g,b as u}from"./chunk-YLDLEASQ.mjs";var l=class a{constructor(i){let{multiKey:s,signers:e}=i;this.publicKey=s,this.signingScheme=3,this.accountAddress=this.publicKey.authKey().derivedAddress();let r=[];for(let t of e)r.push(this.publicKey.getIndex(t.publicKey));let n=e.map((t,c)=>[t,r[c]]);n.sort((t,c)=>t[1]-c[1]),this.signers=n.map(t=>t[0]),this.signerIndicies=n.map(t=>t[1]),this.signaturesBitmap=this.publicKey.createBitmap({bits:r})}static fromPublicKeysAndSigners(i){let{publicKeys:s,signaturesRequired:e,signers:r}=i,n=new g({publicKeys:s,signaturesRequired:e});return new a({multiKey:n,signers:r})}static isMultiKeySigner(i){return i instanceof a}signWithAuthenticator(i){return new o(this.publicKey,this.sign(i))}signTransactionWithAuthenticator(i){return new o(this.publicKey,this.signTransaction(i))}async waitForProofFetch(){let s=this.signers.filter(e=>e instanceof y).map(async e=>e.waitForProofFetch());await Promise.all(s)}sign(i){let s=[];for(let e of this.signers)s.push(e.sign(i));return new u({signatures:s,bitmap:this.signaturesBitmap})}signTransaction(i){let s=[];for(let e of this.signers)s.push(e.signTransaction(i));return new u({signatures:s,bitmap:this.signaturesBitmap})}verifySignature(i){let{message:s,signature:e}=i;if(!this.signerIndicies.every((n,t)=>t===0||n>=this.signerIndicies[t-1]))return!1;for(let n=0;n<e.signatures.length;n+=1){let t=e.signatures[n];if(!this.publicKey.publicKeys[this.signerIndicies[n]].verifySignature({message:s,signature:t}))return!1}return!0}};export{l as a};
2
- //# sourceMappingURL=chunk-HZCFCP4P.mjs.map
1
+ import{a as y}from"./chunk-WUWJLSGN.mjs";import{e as o}from"./chunk-LWFSV3OA.mjs";import{a as g,b as u}from"./chunk-MUAV4P6C.mjs";var l=class a{constructor(i){let{multiKey:s,signers:e}=i;this.publicKey=s,this.signingScheme=3,this.accountAddress=this.publicKey.authKey().derivedAddress();let r=[];for(let t of e)r.push(this.publicKey.getIndex(t.publicKey));let n=e.map((t,c)=>[t,r[c]]);n.sort((t,c)=>t[1]-c[1]),this.signers=n.map(t=>t[0]),this.signerIndicies=n.map(t=>t[1]),this.signaturesBitmap=this.publicKey.createBitmap({bits:r})}static fromPublicKeysAndSigners(i){let{publicKeys:s,signaturesRequired:e,signers:r}=i,n=new g({publicKeys:s,signaturesRequired:e});return new a({multiKey:n,signers:r})}static isMultiKeySigner(i){return i instanceof a}signWithAuthenticator(i){return new o(this.publicKey,this.sign(i))}signTransactionWithAuthenticator(i){return new o(this.publicKey,this.signTransaction(i))}async waitForProofFetch(){let s=this.signers.filter(e=>e instanceof y).map(async e=>e.waitForProofFetch());await Promise.all(s)}sign(i){let s=[];for(let e of this.signers)s.push(e.sign(i));return new u({signatures:s,bitmap:this.signaturesBitmap})}signTransaction(i){let s=[];for(let e of this.signers)s.push(e.signTransaction(i));return new u({signatures:s,bitmap:this.signaturesBitmap})}verifySignature(i){let{message:s,signature:e}=i;if(!this.signerIndicies.every((n,t)=>t===0||n>=this.signerIndicies[t-1]))return!1;for(let n=0;n<e.signatures.length;n+=1){let t=e.signatures[n];if(!this.publicKey.publicKeys[this.signerIndicies[n]].verifySignature({message:s,signature:t}))return!1}return!0}};export{l as a};
2
+ //# sourceMappingURL=chunk-ICE6OL3A.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-6AO7XFMJ.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
- //# sourceMappingURL=chunk-Y5PEEKOM.mjs.map
1
+ import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-KUAN2WZF.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
+ //# sourceMappingURL=chunk-ILXK4OH5.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as n}from"./chunk-OFERLF6R.mjs";import{p as g,u as d}from"./chunk-HIHKTLLM.mjs";import{b as s}from"./chunk-TYS55ZIF.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-YXRXKYCR.mjs.map
1
+ import{c as n}from"./chunk-GPZEPKKD.mjs";import{p as g,u as d}from"./chunk-HIHKTLLM.mjs";import{b as s}from"./chunk-BF46IXHH.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-IOMJ5OWV.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as o}from"./chunk-5YKVCBMZ.mjs";import{b as i}from"./chunk-DBDIEGAX.mjs";import{b as n}from"./chunk-B3UIFT2G.mjs";import{b as s}from"./chunk-TYS55ZIF.mjs";var c=class a{constructor(t){this.signingScheme=0;let{privateKey:e,address:r}=t;this.privateKey=e,this.publicKey=e.publicKey(),this.accountAddress=r?s.from(r):this.publicKey.authKey().derivedAddress()}static generate(){let t=n.generate();return new a({privateKey:t})}static fromDerivationPath(t){let{path:e,mnemonic:r}=t,u=n.fromDerivationPath(e,r);return new a({privateKey:u})}verifySignature(t){return this.publicKey.verifySignature(t)}signWithAuthenticator(t){return new i(this.publicKey,this.privateKey.sign(t))}signTransactionWithAuthenticator(t){return new i(this.publicKey,this.signTransaction(t))}sign(t){return this.privateKey.sign(t)}signTransaction(t){return this.sign(o(t))}};export{c as a};
2
- //# sourceMappingURL=chunk-AX7L7E42.mjs.map
1
+ import{d as o}from"./chunk-HACVLK5I.mjs";import{b as i}from"./chunk-LWFSV3OA.mjs";import{b as n}from"./chunk-A2Z7I2EY.mjs";import{b as s}from"./chunk-BF46IXHH.mjs";var c=class a{constructor(t){this.signingScheme=0;let{privateKey:e,address:r}=t;this.privateKey=e,this.publicKey=e.publicKey(),this.accountAddress=r?s.from(r):this.publicKey.authKey().derivedAddress()}static generate(){let t=n.generate();return new a({privateKey:t})}static fromDerivationPath(t){let{path:e,mnemonic:r}=t,u=n.fromDerivationPath(e,r);return new a({privateKey:u})}verifySignature(t){return this.publicKey.verifySignature(t)}signWithAuthenticator(t){return new i(this.publicKey,this.privateKey.sign(t))}signTransactionWithAuthenticator(t){return new i(this.publicKey,this.signTransaction(t))}sign(t){return this.privateKey.sign(t)}signTransaction(t){return this.sign(o(t))}};export{c as a};
2
+ //# sourceMappingURL=chunk-JM7CSDJ3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as m,c as V,d as v,e as B}from"./chunk-IVVWQKCF.mjs";import{a as P}from"./chunk-M2QV232A.mjs";import{a as b,b as y}from"./chunk-VJZVCHIS.mjs";import{a as C,c as I}from"./chunk-B3UIFT2G.mjs";import{b as U}from"./chunk-IMGLHDIA.mjs";import{a as d}from"./chunk-BF4ZE37Q.mjs";import{a as H}from"./chunk-XAFM4JZX.mjs";import{b as x}from"./chunk-TYS55ZIF.mjs";import{a as T}from"./chunk-AH44UPM4.mjs";import{b as w}from"./chunk-27EDTWDR.mjs";import{a as G}from"./chunk-DZXM2MQY.mjs";import{a as u,b as E}from"./chunk-HPZ2S4FE.mjs";import{b as p}from"./chunk-BCUSI3N6.mjs";import{jwtDecode as k}from"jwt-decode";var he=1e7,F=120,L=30,N=330,ge=120,fe=350,Se=300,xe=93,o=class o extends U{constructor(e,t){super();let i=p.fromHexInput(t).toUint8Array();if(i.length!==o.ID_COMMITMENT_LENGTH)throw new Error(`Id Commitment length in bytes should be ${o.ID_COMMITMENT_LENGTH}`);this.iss=e,this.idCommitment=i}authKey(){let e=new E;return e.serializeU32AsUleb128(3),e.serializeFixedBytes(this.bcsToBytes()),H.fromSchemeAndBytes({scheme:2,input:e.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}toString(){return p.fromHexInput(this.toUint8Array()).toString()}verifySignature(e){throw new Error("Not yet implemented")}serialize(e){e.serializeStr(this.iss),e.serializeBytes(this.idCommitment)}static deserialize(e){let t=e.deserializeStr(),i=e.deserializeBytes();return new o(t,i)}static load(e){let t=e.deserializeStr(),i=e.deserializeBytes();return new o(t,i)}static isPublicKey(e){return e instanceof o}static create(e){return _(e),new o(e.iss,_(e))}static fromJwtAndPepper(e){let{jwt:t,pepper:i,uidKey:a="sub"}=e,n=k(t),s=n.iss;if(typeof n.aud!="string")throw new Error("aud was not found or an array of values");let M=n.aud,R=n[a];return o.create({iss:s,uidKey:a,uidVal:R,aud:M,pepper:i})}};o.ID_COMMITMENT_LENGTH=32;var A=o;function _(r){let{uidKey:e,uidVal:t,aud:i,pepper:a}=r,n=[V(p.fromHexInput(a).toUint8Array()),m(i,F),m(t,N),m(e,L)];return v(B(n),A.ID_COMMITMENT_LENGTH)}var D=class r extends d{constructor(e){super();let{jwtHeader:t,ephemeralCertificate:i,expiryDateSecs:a,ephemeralPublicKey:n,ephemeralSignature:s}=e;this.jwtHeader=t,this.ephemeralCertificate=i,this.expiryDateSecs=a,this.ephemeralPublicKey=n,this.ephemeralSignature=s}toUint8Array(){return this.bcsToBytes()}serialize(e){this.ephemeralCertificate.serialize(e),e.serializeStr(this.jwtHeader),e.serializeU64(this.expiryDateSecs),this.ephemeralPublicKey.serialize(e),this.ephemeralSignature.serialize(e)}static deserialize(e){let t=h.deserialize(e),i=e.deserializeStr(),a=e.deserializeU64(),n=b.deserialize(e),s=y.deserialize(e);return new r({jwtHeader:i,expiryDateSecs:Number(a),ephemeralCertificate:t,ephemeralPublicKey:n,ephemeralSignature:s})}static getSimulationSignature(){return new r({jwtHeader:"{}",ephemeralCertificate:new h(new S({proof:new f(new g({a:new Uint8Array(32),b:new Uint8Array(64),c:new Uint8Array(32)}),0),expHorizonSecs:0}),0),expiryDateSecs:0,ephemeralPublicKey:new b(new C(new Uint8Array(32))),ephemeralSignature:new y(new I(new Uint8Array(64)))})}static isSignature(e){return e instanceof r}},h=class r extends d{constructor(e,t){super(),this.signature=e,this.variant=t}toUint8Array(){return this.signature.toUint8Array()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return new r(S.deserialize(e),t);default:throw new Error(`Unknown variant index for EphemeralCertificate: ${t}`)}}},c=class r extends u{constructor(e){if(super(),this.data=p.fromHexInput(e).toUint8Array(),this.data.length!==32)throw new Error("Input needs to be 32 bytes")}serialize(e){e.serializeFixedBytes(this.data)}static deserialize(e){let t=e.deserializeFixedBytes(32);return new r(t)}},l=class r extends u{constructor(e){if(super(),this.data=p.fromHexInput(e).toUint8Array(),this.data.length!==64)throw new Error("Input needs to be 64 bytes")}serialize(e){e.serializeFixedBytes(this.data)}static deserialize(e){let t=e.deserializeFixedBytes(64);return new r(t)}},g=class r extends P{constructor(e){super();let{a:t,b:i,c:a}=e;this.a=new c(t),this.b=new l(i),this.c=new c(a)}serialize(e){this.a.serialize(e),this.b.serialize(e),this.c.serialize(e)}static deserialize(e){let t=c.deserialize(e).bcsToBytes(),i=l.deserialize(e).bcsToBytes(),a=c.deserialize(e).bcsToBytes();return new r({a:t,b:i,c:a})}},f=class r extends u{constructor(e,t){super(),this.proof=e,this.variant=t}serialize(e){e.serializeU32AsUleb128(this.variant),this.proof.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return new r(g.deserialize(e),t);default:throw new Error(`Unknown variant index for ZkProof: ${t}`)}}},S=class r extends d{constructor(e){super();let{proof:t,expHorizonSecs:i,trainingWheelsSignature:a,extraField:n,overrideAudVal:s}=e;this.proof=t,this.expHorizonSecs=i,this.trainingWheelsSignature=a,this.extraField=n,this.overrideAudVal=s}toUint8Array(){return this.bcsToBytes()}static fromBytes(e){return r.deserialize(new G(e))}serialize(e){this.proof.serialize(e),e.serializeU64(this.expHorizonSecs),e.serializeOptionStr(this.extraField),e.serializeOptionStr(this.overrideAudVal),e.serializeOption(this.trainingWheelsSignature)}static deserialize(e){let t=f.deserialize(e),i=Number(e.deserializeU64()),a=e.deserializeOptionStr(),n=e.deserializeOptionStr(),s=e.deserializeOption(y);return new r({proof:t,expHorizonSecs:i,trainingWheelsSignature:s,extraField:a,overrideAudVal:n})}},z=class r{constructor(e,t){this.verficationKey=e,this.maxExpHorizonSecs=t}static create(e,t){return new r(new K({alphaG1:e.alpha_g1,betaG2:e.beta_g2,deltaG2:e.delta_g2,gammaAbcG1:e.gamma_abc_g1,gammaG2:e.gamma_g2}),t)}},K=class r{constructor(e){let{alphaG1:t,betaG2:i,deltaG2:a,gammaAbcG1:n,gammaG2:s}=e;this.alphaG1=new c(t),this.betaG2=new l(i),this.deltaG2=new l(a),this.gammaAbcG1=[new c(n[0]),new c(n[1])],this.gammaG2=new l(s)}static fromGroth16VerificationKeyResponse(e){return new r({alphaG1:e.alpha_g1,betaG2:e.beta_g2,deltaG2:e.delta_g2,gammaAbcG1:e.gamma_abc_g1,gammaG2:e.gamma_g2})}};async function be(r){let{aptosConfig:e}=r;return T(async()=>{let t=await O(r),i=await j(r);return z.create(i,Number(t.max_exp_horizon_secs))},`keyless-configuration-${e.network}`,1e3*60*5)()}async function O(r){let{aptosConfig:e,options:t}=r,i="0x1::keyless_account::Configuration",{data:a}=await w({aptosConfig:e,originMethod:"getKeylessConfigurationResource",path:`accounts/${x.from("0x1").toString()}/resource/${i}`,params:{ledger_version:t?.ledgerVersion}});return a.data}async function j(r){let{aptosConfig:e,options:t}=r,i="0x1::keyless_account::Groth16VerificationKey",{data:a}=await w({aptosConfig:e,originMethod:"getGroth16VerificationKeyResource",path:`accounts/${x.from("0x1").toString()}/resource/${i}`,params:{ledger_version:t?.ledgerVersion}});return a.data}export{he as a,F as b,L as c,N as d,ge as e,fe as f,Se as g,xe as h,A as i,D as j,h as k,g as l,f as m,S as n,z as o,be as p};
2
- //# sourceMappingURL=chunk-PS4JR3KO.mjs.map
1
+ import{a as m,c as V,d as v,e as B}from"./chunk-IVVWQKCF.mjs";import{a as P}from"./chunk-MQGW234H.mjs";import{a as b,b as y}from"./chunk-MH6HIFMG.mjs";import{a as C,c as I}from"./chunk-A2Z7I2EY.mjs";import{b as U}from"./chunk-76OH2Z4Q.mjs";import{a as d}from"./chunk-MLDQ2TY2.mjs";import{a as H}from"./chunk-77NXCSLY.mjs";import{b as x}from"./chunk-BF46IXHH.mjs";import{a as T}from"./chunk-AH44UPM4.mjs";import{b as w}from"./chunk-47M33ENP.mjs";import{a as u,b as E}from"./chunk-A63SMUOU.mjs";import{b as p}from"./chunk-BCUSI3N6.mjs";import{a as G}from"./chunk-DZXM2MQY.mjs";import{jwtDecode as k}from"jwt-decode";var he=1e7,F=120,L=30,N=330,ge=120,fe=350,Se=300,xe=93,o=class o extends U{constructor(e,t){super();let i=p.fromHexInput(t).toUint8Array();if(i.length!==o.ID_COMMITMENT_LENGTH)throw new Error(`Id Commitment length in bytes should be ${o.ID_COMMITMENT_LENGTH}`);this.iss=e,this.idCommitment=i}authKey(){let e=new E;return e.serializeU32AsUleb128(3),e.serializeFixedBytes(this.bcsToBytes()),H.fromSchemeAndBytes({scheme:2,input:e.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}toString(){return p.fromHexInput(this.toUint8Array()).toString()}verifySignature(e){throw new Error("Not yet implemented")}serialize(e){e.serializeStr(this.iss),e.serializeBytes(this.idCommitment)}static deserialize(e){let t=e.deserializeStr(),i=e.deserializeBytes();return new o(t,i)}static load(e){let t=e.deserializeStr(),i=e.deserializeBytes();return new o(t,i)}static isPublicKey(e){return e instanceof o}static create(e){return _(e),new o(e.iss,_(e))}static fromJwtAndPepper(e){let{jwt:t,pepper:i,uidKey:a="sub"}=e,n=k(t),s=n.iss;if(typeof n.aud!="string")throw new Error("aud was not found or an array of values");let M=n.aud,R=n[a];return o.create({iss:s,uidKey:a,uidVal:R,aud:M,pepper:i})}};o.ID_COMMITMENT_LENGTH=32;var A=o;function _(r){let{uidKey:e,uidVal:t,aud:i,pepper:a}=r,n=[V(p.fromHexInput(a).toUint8Array()),m(i,F),m(t,N),m(e,L)];return v(B(n),A.ID_COMMITMENT_LENGTH)}var D=class r extends d{constructor(e){super();let{jwtHeader:t,ephemeralCertificate:i,expiryDateSecs:a,ephemeralPublicKey:n,ephemeralSignature:s}=e;this.jwtHeader=t,this.ephemeralCertificate=i,this.expiryDateSecs=a,this.ephemeralPublicKey=n,this.ephemeralSignature=s}toUint8Array(){return this.bcsToBytes()}serialize(e){this.ephemeralCertificate.serialize(e),e.serializeStr(this.jwtHeader),e.serializeU64(this.expiryDateSecs),this.ephemeralPublicKey.serialize(e),this.ephemeralSignature.serialize(e)}static deserialize(e){let t=h.deserialize(e),i=e.deserializeStr(),a=e.deserializeU64(),n=b.deserialize(e),s=y.deserialize(e);return new r({jwtHeader:i,expiryDateSecs:Number(a),ephemeralCertificate:t,ephemeralPublicKey:n,ephemeralSignature:s})}static getSimulationSignature(){return new r({jwtHeader:"{}",ephemeralCertificate:new h(new S({proof:new f(new g({a:new Uint8Array(32),b:new Uint8Array(64),c:new Uint8Array(32)}),0),expHorizonSecs:0}),0),expiryDateSecs:0,ephemeralPublicKey:new b(new C(new Uint8Array(32))),ephemeralSignature:new y(new I(new Uint8Array(64)))})}static isSignature(e){return e instanceof r}},h=class r extends d{constructor(e,t){super(),this.signature=e,this.variant=t}toUint8Array(){return this.signature.toUint8Array()}serialize(e){e.serializeU32AsUleb128(this.variant),this.signature.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return new r(S.deserialize(e),t);default:throw new Error(`Unknown variant index for EphemeralCertificate: ${t}`)}}},c=class r extends u{constructor(e){if(super(),this.data=p.fromHexInput(e).toUint8Array(),this.data.length!==32)throw new Error("Input needs to be 32 bytes")}serialize(e){e.serializeFixedBytes(this.data)}static deserialize(e){let t=e.deserializeFixedBytes(32);return new r(t)}},l=class r extends u{constructor(e){if(super(),this.data=p.fromHexInput(e).toUint8Array(),this.data.length!==64)throw new Error("Input needs to be 64 bytes")}serialize(e){e.serializeFixedBytes(this.data)}static deserialize(e){let t=e.deserializeFixedBytes(64);return new r(t)}},g=class r extends P{constructor(e){super();let{a:t,b:i,c:a}=e;this.a=new c(t),this.b=new l(i),this.c=new c(a)}serialize(e){this.a.serialize(e),this.b.serialize(e),this.c.serialize(e)}static deserialize(e){let t=c.deserialize(e).bcsToBytes(),i=l.deserialize(e).bcsToBytes(),a=c.deserialize(e).bcsToBytes();return new r({a:t,b:i,c:a})}},f=class r extends u{constructor(e,t){super(),this.proof=e,this.variant=t}serialize(e){e.serializeU32AsUleb128(this.variant),this.proof.serialize(e)}static deserialize(e){let t=e.deserializeUleb128AsU32();switch(t){case 0:return new r(g.deserialize(e),t);default:throw new Error(`Unknown variant index for ZkProof: ${t}`)}}},S=class r extends d{constructor(e){super();let{proof:t,expHorizonSecs:i,trainingWheelsSignature:a,extraField:n,overrideAudVal:s}=e;this.proof=t,this.expHorizonSecs=i,this.trainingWheelsSignature=a,this.extraField=n,this.overrideAudVal=s}toUint8Array(){return this.bcsToBytes()}static fromBytes(e){return r.deserialize(new G(e))}serialize(e){this.proof.serialize(e),e.serializeU64(this.expHorizonSecs),e.serializeOptionStr(this.extraField),e.serializeOptionStr(this.overrideAudVal),e.serializeOption(this.trainingWheelsSignature)}static deserialize(e){let t=f.deserialize(e),i=Number(e.deserializeU64()),a=e.deserializeOptionStr(),n=e.deserializeOptionStr(),s=e.deserializeOption(y);return new r({proof:t,expHorizonSecs:i,trainingWheelsSignature:s,extraField:a,overrideAudVal:n})}},z=class r{constructor(e,t){this.verficationKey=e,this.maxExpHorizonSecs=t}static create(e,t){return new r(new K({alphaG1:e.alpha_g1,betaG2:e.beta_g2,deltaG2:e.delta_g2,gammaAbcG1:e.gamma_abc_g1,gammaG2:e.gamma_g2}),t)}},K=class r{constructor(e){let{alphaG1:t,betaG2:i,deltaG2:a,gammaAbcG1:n,gammaG2:s}=e;this.alphaG1=new c(t),this.betaG2=new l(i),this.deltaG2=new l(a),this.gammaAbcG1=[new c(n[0]),new c(n[1])],this.gammaG2=new l(s)}static fromGroth16VerificationKeyResponse(e){return new r({alphaG1:e.alpha_g1,betaG2:e.beta_g2,deltaG2:e.delta_g2,gammaAbcG1:e.gamma_abc_g1,gammaG2:e.gamma_g2})}};async function be(r){let{aptosConfig:e}=r;return T(async()=>{let t=await O(r),i=await j(r);return z.create(i,Number(t.max_exp_horizon_secs))},`keyless-configuration-${e.network}`,1e3*60*5)()}async function O(r){let{aptosConfig:e,options:t}=r,i="0x1::keyless_account::Configuration",{data:a}=await w({aptosConfig:e,originMethod:"getKeylessConfigurationResource",path:`accounts/${x.from("0x1").toString()}/resource/${i}`,params:{ledger_version:t?.ledgerVersion}});return a.data}async function j(r){let{aptosConfig:e,options:t}=r,i="0x1::keyless_account::Groth16VerificationKey",{data:a}=await w({aptosConfig:e,originMethod:"getGroth16VerificationKeyResource",path:`accounts/${x.from("0x1").toString()}/resource/${i}`,params:{ledger_version:t?.ledgerVersion}});return a.data}export{he as a,F as b,L as c,N as d,ge as e,fe as f,Se as g,xe as h,A as i,D as j,h as k,g as l,f as m,S as n,z as o,be as p};
2
+ //# sourceMappingURL=chunk-K6NUFABY.mjs.map
@@ -0,0 +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-YPHH6CAO.mjs";import{a as o}from"./chunk-A63SMUOU.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)&&e.length===0)r=[];else 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, must be an number[], Uint8Array, or hex string");return new n(r.map(i=>new s(i)))}static U16(e){return new n(e.map(r=>new u(r)))}static U32(e){return new n(e.map(r=>new c(r)))}static U64(e){return new n(e.map(r=>new d(r)))}static U128(e){return new n(e.map(r=>new m(r)))}static U256(e){return new n(e.map(r=>new U(r)))}static Bool(e){return new n(e.map(r=>new l(r)))}static MoveString(e){return new n(e.map(r=>new a(r)))}serialize(e){e.serializeVector(this.values)}static deserialize(e,r){let i=e.deserializeUleb128AsU32(),y=new Array;for(let p=0;p<i;p+=1)y.push(r.deserialize(e));return new n(y)}},a=class n extends o{constructor(e){super(),this.value=e}serialize(e){e.serializeStr(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){let r=this.bcsToBytes().slice(1);t.U8(r).serializeForScriptFunction(e)}static deserialize(e){return new n(e.deserializeStr())}},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-KMJ6TF6Y.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/bcs/serializable/moveStructs.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Bool, U128, U16, U256, U32, U64, U8 } from \"./movePrimitives\";\nimport { Serializable, Serializer } from \"../serializer\";\nimport { Deserializable, Deserializer } from \"../deserializer\";\nimport { AnyNumber, HexInput, ScriptTransactionArgumentVariants } from \"../../types\";\nimport { Hex } from \"../../core/hex\";\nimport { EntryFunctionArgument, TransactionArgument } from \"../../transactions/instances/transactionArgument\";\n\n/**\n * This class is the Aptos Typescript SDK representation of a Move `vector<T>`,\n * where `T` represents either a primitive type (`bool`, `u8`, `u64`, ...)\n * or a BCS-serializable struct itself.\n *\n * It is a BCS-serializable, array-like type that contains an array of values of type `T`,\n * where `T` is a class that implements `Serializable`.\n *\n * The purpose of this class is to facilitate easy construction of BCS-serializable\n * Move `vector<T>` types.\n *\n * @example\n * // in Move: `vector<u8> [1, 2, 3, 4];`\n * const vecOfU8s = new MoveVector<U8>([new U8(1), new U8(2), new U8(3), new U8(4)]);\n * // in Move: `std::bcs::to_bytes(vector<u8> [1, 2, 3, 4]);`\n * const bcsBytes = vecOfU8s.toUint8Array();\n *\n * // vector<vector<u8>> [ vector<u8> [1], vector<u8> [1, 2, 3, 4], vector<u8> [5, 6, 7, 8] ];\n * const vecOfVecs = new MoveVector<MoveVector<U8>>([\n * new MoveVector<U8>([new U8(1)]),\n * MoveVector.U8([1, 2, 3, 4]),\n * MoveVector.U8([5, 6, 7, 8]),\n * ]);\n *\n * // vector<Option<u8>> [ std::option::some<u8>(1), std::option::some<u8>(2) ];\n * const vecOfOptionU8s = new MoveVector<MoveOption<U8>>([\n * MoveOption.U8(1),\n * MoveOption.U8(2),\n * ]);\n *\n * // vector<MoveString> [ std::string::utf8(b\"hello\"), std::string::utf8(b\"world\") ];\n * const vecOfStrings = new MoveVector([new MoveString(\"hello\"), new MoveString(\"world\")]);\n * const vecOfStrings2 = MoveVector.MoveString([\"hello\", \"world\"]);\n *\n * @params\n * values: an Array<T> of values where T is a class that implements Serializable\n * @returns a `MoveVector<T>` with the values `values`\n */\nexport class MoveVector<T extends Serializable & EntryFunctionArgument>\n extends Serializable\n implements TransactionArgument\n{\n public values: Array<T>;\n\n constructor(values: Array<T>) {\n super();\n this.values = values;\n }\n\n serializeForEntryFunction(serializer: Serializer): void {\n const bcsBytes = this.bcsToBytes();\n serializer.serializeBytes(bcsBytes);\n }\n\n /**\n * NOTE: This function will only work when the inner values in the `MoveVector` are `U8`s.\n * @param serializer\n */\n serializeForScriptFunction(serializer: Serializer): void {\n // runtime check to ensure that you can't serialize anything other than vector<u8>\n const isU8 = this.values[0] instanceof U8;\n // if the inner array is length 0, we can't check the type because it has no instance, so we assume it's a u8\n // it may not be, but we don't care because regardless of a vector's type,\n // a zero-length vector is serialized to a single byte value: 0\n if (!isU8 && this.values[0] !== undefined) {\n throw new Error(\"Script function arguments only accept u8 vectors\");\n }\n serializer.serializeU32AsUleb128(ScriptTransactionArgumentVariants.U8Vector);\n serializer.serialize(this);\n }\n\n /**\n * Factory method to generate a MoveVector of U8s from an array of numbers.\n *\n * @example\n * const v = MoveVector.U8([1, 2, 3, 4]);\n * @params values: an array of `numbers` to convert to U8s\n * @returns a `MoveVector<U8>`\n */\n static U8(values: Array<number> | HexInput): MoveVector<U8> {\n let numbers: Array<number>;\n\n if (Array.isArray(values) && values.length === 0) {\n // Handle empty array, since it won't have a \"first value\"\n numbers = [];\n } else if (Array.isArray(values) && typeof values[0] === \"number\") {\n numbers = values;\n } else if (typeof values === \"string\") {\n const hex = Hex.fromHexInput(values);\n numbers = Array.from(hex.toUint8Array());\n } else if (values instanceof Uint8Array) {\n numbers = Array.from(values);\n } else {\n throw new Error(\"Invalid input type, must be an number[], Uint8Array, or hex string\");\n }\n\n return new MoveVector<U8>(numbers.map((v) => new U8(v)));\n }\n\n /**\n * Factory method to generate a MoveVector of U16s from an array of numbers.\n *\n * @example\n * const v = MoveVector.U16([1, 2, 3, 4]);\n * @params values: an array of `numbers` to convert to U16s\n * @returns a `MoveVector<U16>`\n */\n static U16(values: Array<number>): MoveVector<U16> {\n return new MoveVector<U16>(values.map((v) => new U16(v)));\n }\n\n /**\n * Factory method to generate a MoveVector of U32s from an array of numbers.\n *\n * @example\n * const v = MoveVector.U32([1, 2, 3, 4]);\n * @params values: an array of `numbers` to convert to U32s\n * @returns a `MoveVector<U32>`\n */\n static U32(values: Array<number>): MoveVector<U32> {\n return new MoveVector<U32>(values.map((v) => new U32(v)));\n }\n\n /**\n * Factory method to generate a MoveVector of U64s from an array of numbers or bigints.\n *\n * @example\n * const v = MoveVector.U64([1, 2, 3, 4]);\n * @params values: an array of numbers of type `number | bigint` to convert to U64s\n * @returns a `MoveVector<U64>`\n */\n static U64(values: Array<AnyNumber>): MoveVector<U64> {\n return new MoveVector<U64>(values.map((v) => new U64(v)));\n }\n\n /**\n * Factory method to generate a MoveVector of U128s from an array of numbers or bigints.\n *\n * @example\n * const v = MoveVector.U128([1, 2, 3, 4]);\n * @params values: an array of numbers of type `number | bigint` to convert to U128s\n * @returns a `MoveVector<U128>`\n */\n static U128(values: Array<AnyNumber>): MoveVector<U128> {\n return new MoveVector<U128>(values.map((v) => new U128(v)));\n }\n\n /**\n * Factory method to generate a MoveVector of U256s from an array of numbers or bigints.\n *\n * @example\n * const v = MoveVector.U256([1, 2, 3, 4]);\n * @params values: an array of numbers of type `number | bigint` to convert to U256s\n * @returns a `MoveVector<U256>`\n */\n static U256(values: Array<AnyNumber>): MoveVector<U256> {\n return new MoveVector<U256>(values.map((v) => new U256(v)));\n }\n\n /**\n * Factory method to generate a MoveVector of Bools from an array of booleans.\n *\n * @example\n * const v = MoveVector.Bool([true, false, true, false]);\n * @params values: an array of `bools` to convert to Bools\n * @returns a `MoveVector<Bool>`\n */\n static Bool(values: Array<boolean>): MoveVector<Bool> {\n return new MoveVector<Bool>(values.map((v) => new Bool(v)));\n }\n\n /**\n * Factory method to generate a MoveVector of MoveStrings from an array of strings.\n *\n * @example\n * const v = MoveVector.MoveString([\"hello\", \"world\"]);\n * @params values: an array of `strings` to convert to MoveStrings\n * @returns a `MoveVector<MoveString>`\n */\n static MoveString(values: Array<string>): MoveVector<MoveString> {\n return new MoveVector<MoveString>(values.map((v) => new MoveString(v)));\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeVector(this.values);\n }\n\n /**\n * Deserialize a MoveVector of type T, specifically where T is a Serializable and Deserializable type.\n *\n * NOTE: This only works with a depth of one. Generics will not work.\n *\n * NOTE: This will not work with types that aren't of the Serializable class.\n *\n * If you're looking for a more flexible deserialization function, you can use the deserializeVector function\n * in the Deserializer class.\n *\n * @example\n * const vec = MoveVector.deserialize(deserializer, U64);\n * @params deserializer: the Deserializer instance to use, with bytes loaded into it already.\n * cls: the class to typecast the input values to, must be a Serializable and Deserializable type.\n * @returns a MoveVector of the corresponding class T\n * *\n */\n static deserialize<T extends Serializable & EntryFunctionArgument>(\n deserializer: Deserializer,\n cls: Deserializable<T>,\n ): MoveVector<T> {\n const length = deserializer.deserializeUleb128AsU32();\n const values = new Array<T>();\n for (let i = 0; i < length; i += 1) {\n values.push(cls.deserialize(deserializer));\n }\n return new MoveVector(values);\n }\n}\n\nexport class MoveString extends Serializable implements TransactionArgument {\n public value: string;\n\n constructor(value: string) {\n super();\n this.value = value;\n }\n\n serialize(serializer: Serializer): void {\n serializer.serializeStr(this.value);\n }\n\n serializeForEntryFunction(serializer: Serializer): void {\n const bcsBytes = this.bcsToBytes();\n serializer.serializeBytes(bcsBytes);\n }\n\n serializeForScriptFunction(serializer: Serializer): void {\n // Serialize the string as a fixed byte string, i.e., without the length prefix\n const fixedStringBytes = this.bcsToBytes().slice(1);\n // Put those bytes into a vector<u8> and serialize it as a script function argument\n const vectorU8 = MoveVector.U8(fixedStringBytes);\n vectorU8.serializeForScriptFunction(serializer);\n }\n\n static deserialize(deserializer: Deserializer): MoveString {\n return new MoveString(deserializer.deserializeStr());\n }\n}\n\nexport class MoveOption<T extends Serializable & EntryFunctionArgument>\n extends Serializable\n implements EntryFunctionArgument\n{\n private vec: MoveVector<T>;\n\n public readonly value?: T;\n\n constructor(value?: T | null) {\n super();\n if (typeof value !== \"undefined\" && value !== null) {\n this.vec = new MoveVector([value]);\n } else {\n this.vec = new MoveVector([]);\n }\n\n [this.value] = this.vec.values;\n }\n\n serializeForEntryFunction(serializer: Serializer): void {\n const bcsBytes = this.bcsToBytes();\n serializer.serializeBytes(bcsBytes);\n }\n\n /**\n * Retrieves the inner value of the MoveOption.\n *\n * This method is inspired by Rust's `Option<T>.unwrap()`.\n * In Rust, attempting to unwrap a `None` value results in a panic.\n *\n * Similarly, this method will throw an error if the value is not present.\n *\n * @example\n * const option = new MoveOption<Bool>(new Bool(true));\n * const value = option.unwrap(); // Returns the Bool instance\n *\n * @throws {Error} Throws an error if the MoveOption does not contain a value.\n *\n * @returns {T} The contained value if present.\n */\n unwrap(): T {\n if (!this.isSome()) {\n throw new Error(\"Called unwrap on a MoveOption with no value\");\n } else {\n return this.vec.values[0];\n }\n }\n\n // Check if the MoveOption has a value.\n isSome(): boolean {\n return this.vec.values.length === 1;\n }\n\n serialize(serializer: Serializer): void {\n // serialize 0 or 1\n // if 1, serialize the value\n this.vec.serialize(serializer);\n }\n\n /**\n * Factory method to generate a MoveOption<U8> from a `number` or `undefined`.\n *\n * @example\n * MoveOption.U8(1).isSome() === true;\n * MoveOption.U8().isSome() === false;\n * MoveOption.U8(undefined).isSome() === false;\n * @params value: the value used to fill the MoveOption. If `value` is undefined\n * the resulting MoveOption's .isSome() method will return false.\n * @returns a MoveOption<U8> with an inner value `value`\n */\n static U8(value?: number | null): MoveOption<U8> {\n return new MoveOption<U8>(value !== null && value !== undefined ? new U8(value) : undefined);\n }\n\n /**\n * Factory method to generate a MoveOption<U16> from a `number` or `undefined`.\n *\n * @example\n * MoveOption.U16(1).isSome() === true;\n * MoveOption.U16().isSome() === false;\n * MoveOption.U16(undefined).isSome() === false;\n * @params value: the value used to fill the MoveOption. If `value` is undefined\n * the resulting MoveOption's .isSome() method will return false.\n * @returns a MoveOption<U16> with an inner value `value`\n */\n static U16(value?: number | null): MoveOption<U16> {\n return new MoveOption<U16>(value !== null && value !== undefined ? new U16(value) : undefined);\n }\n\n /**\n * Factory method to generate a MoveOption<U32> from a `number` or `undefined`.\n *\n * @example\n * MoveOption.U32(1).isSome() === true;\n * MoveOption.U32().isSome() === false;\n * MoveOption.U32(undefined).isSome() === false;\n * @params value: the value used to fill the MoveOption. If `value` is undefined\n * the resulting MoveOption's .isSome() method will return false.\n * @returns a MoveOption<U32> with an inner value `value`\n */\n static U32(value?: number | null): MoveOption<U32> {\n return new MoveOption<U32>(value !== null && value !== undefined ? new U32(value) : undefined);\n }\n\n /**\n * Factory method to generate a MoveOption<U64> from a `number` or a `bigint` or `undefined`.\n *\n * @example\n * MoveOption.U64(1).isSome() === true;\n * MoveOption.U64().isSome() === false;\n * MoveOption.U64(undefined).isSome() === false;\n * @params value: the value used to fill the MoveOption. If `value` is undefined\n * the resulting MoveOption's .isSome() method will return false.\n * @returns a MoveOption<U64> with an inner value `value`\n */\n static U64(value?: AnyNumber | null): MoveOption<U64> {\n return new MoveOption<U64>(value !== null && value !== undefined ? new U64(value) : undefined);\n }\n\n /**\n * Factory method to generate a MoveOption<U128> from a `number` or a `bigint` or `undefined`.\n *\n * @example\n * MoveOption.U128(1).isSome() === true;\n * MoveOption.U128().isSome() === false;\n * MoveOption.U128(undefined).isSome() === false;\n * @params value: the value used to fill the MoveOption. If `value` is undefined\n * the resulting MoveOption's .isSome() method will return false.\n * @returns a MoveOption<U128> with an inner value `value`\n */\n static U128(value?: AnyNumber | null): MoveOption<U128> {\n return new MoveOption<U128>(value !== null && value !== undefined ? new U128(value) : undefined);\n }\n\n /**\n * Factory method to generate a MoveOption<U256> from a `number` or a `bigint` or `undefined`.\n *\n * @example\n * MoveOption.U256(1).isSome() === true;\n * MoveOption.U256().isSome() === false;\n * MoveOption.U256(undefined).isSome() === false;\n * @params value: the value used to fill the MoveOption. If `value` is undefined\n * the resulting MoveOption's .isSome() method will return false.\n * @returns a MoveOption<U256> with an inner value `value`\n */\n static U256(value?: AnyNumber | null): MoveOption<U256> {\n return new MoveOption<U256>(value !== null && value !== undefined ? new U256(value) : undefined);\n }\n\n /**\n * Factory method to generate a MoveOption<Bool> from a `boolean` or `undefined`.\n *\n * @example\n * MoveOption.Bool(true).isSome() === true;\n * MoveOption.Bool().isSome() === false;\n * MoveOption.Bool(undefined).isSome() === false;\n * @params value: the value used to fill the MoveOption. If `value` is undefined\n * the resulting MoveOption's .isSome() method will return false.\n * @returns a MoveOption<Bool> with an inner value `value`\n */\n static Bool(value?: boolean | null): MoveOption<Bool> {\n return new MoveOption<Bool>(value !== null && value !== undefined ? new Bool(value) : undefined);\n }\n\n /**\n * Factory method to generate a MoveOption<MoveString> from a `string` or `undefined`.\n *\n * @example\n * MoveOption.MoveString(\"hello\").isSome() === true;\n * MoveOption.MoveString(\"\").isSome() === true;\n * MoveOption.MoveString().isSome() === false;\n * MoveOption.MoveString(undefined).isSome() === false;\n * @params value: the value used to fill the MoveOption. If `value` is undefined\n * the resulting MoveOption's .isSome() method will return false.\n * @returns a MoveOption<MoveString> with an inner value `value`\n */\n static MoveString(value?: string | null): MoveOption<MoveString> {\n return new MoveOption<MoveString>(value !== null && value !== undefined ? new MoveString(value) : undefined);\n }\n\n static deserialize<U extends Serializable & EntryFunctionArgument>(\n deserializer: Deserializer,\n cls: Deserializable<U>,\n ): MoveOption<U> {\n const vector = MoveVector.deserialize(deserializer, cls);\n return new MoveOption(vector.values[0]);\n }\n}\n"],"mappings":"qKAgDO,IAAMA,EAAN,MAAMC,UACHC,CAEV,CAGE,YAAYC,EAAkB,CAC5B,MAAM,EACN,KAAK,OAASA,CAChB,CAEA,0BAA0BC,EAA8B,CACtD,IAAMC,EAAW,KAAK,WAAW,EACjCD,EAAW,eAAeC,CAAQ,CACpC,CAMA,2BAA2BD,EAA8B,CAMvD,GAAI,EAJS,KAAK,OAAO,CAAC,YAAaE,IAI1B,KAAK,OAAO,CAAC,IAAM,OAC9B,MAAM,IAAI,MAAM,kDAAkD,EAEpEF,EAAW,uBAAgE,EAC3EA,EAAW,UAAU,IAAI,CAC3B,CAUA,OAAO,GAAGD,EAAkD,CAC1D,IAAII,EAEJ,GAAI,MAAM,QAAQJ,CAAM,GAAKA,EAAO,SAAW,EAE7CI,EAAU,CAAC,UACF,MAAM,QAAQJ,CAAM,GAAK,OAAOA,EAAO,CAAC,GAAM,SACvDI,EAAUJ,UACD,OAAOA,GAAW,SAAU,CACrC,IAAMK,EAAMC,EAAI,aAAaN,CAAM,EACnCI,EAAU,MAAM,KAAKC,EAAI,aAAa,CAAC,CACzC,SAAWL,aAAkB,WAC3BI,EAAU,MAAM,KAAKJ,CAAM,MAE3B,OAAM,IAAI,MAAM,oEAAoE,EAGtF,OAAO,IAAIF,EAAeM,EAAQ,IAAKG,GAAM,IAAIJ,EAAGI,CAAC,CAAC,CAAC,CACzD,CAUA,OAAO,IAAIP,EAAwC,CACjD,OAAO,IAAIF,EAAgBE,EAAO,IAAKO,GAAM,IAAIC,EAAID,CAAC,CAAC,CAAC,CAC1D,CAUA,OAAO,IAAIP,EAAwC,CACjD,OAAO,IAAIF,EAAgBE,EAAO,IAAKO,GAAM,IAAIE,EAAIF,CAAC,CAAC,CAAC,CAC1D,CAUA,OAAO,IAAIP,EAA2C,CACpD,OAAO,IAAIF,EAAgBE,EAAO,IAAKO,GAAM,IAAIG,EAAIH,CAAC,CAAC,CAAC,CAC1D,CAUA,OAAO,KAAKP,EAA4C,CACtD,OAAO,IAAIF,EAAiBE,EAAO,IAAKO,GAAM,IAAII,EAAKJ,CAAC,CAAC,CAAC,CAC5D,CAUA,OAAO,KAAKP,EAA4C,CACtD,OAAO,IAAIF,EAAiBE,EAAO,IAAKO,GAAM,IAAIK,EAAKL,CAAC,CAAC,CAAC,CAC5D,CAUA,OAAO,KAAKP,EAA0C,CACpD,OAAO,IAAIF,EAAiBE,EAAO,IAAKO,GAAM,IAAIM,EAAKN,CAAC,CAAC,CAAC,CAC5D,CAUA,OAAO,WAAWP,EAA+C,CAC/D,OAAO,IAAIF,EAAuBE,EAAO,IAAKO,GAAM,IAAIO,EAAWP,CAAC,CAAC,CAAC,CACxE,CAEA,UAAUN,EAA8B,CACtCA,EAAW,gBAAgB,KAAK,MAAM,CACxC,CAmBA,OAAO,YACLc,EACAC,EACe,CACf,IAAMC,EAASF,EAAa,wBAAwB,EAC9Cf,EAAS,IAAI,MACnB,QAASkB,EAAI,EAAGA,EAAID,EAAQC,GAAK,EAC/BlB,EAAO,KAAKgB,EAAI,YAAYD,CAAY,CAAC,EAE3C,OAAO,IAAIjB,EAAWE,CAAM,CAC9B,CACF,EAEac,EAAN,MAAMK,UAAmBpB,CAA4C,CAG1E,YAAYqB,EAAe,CACzB,MAAM,EACN,KAAK,MAAQA,CACf,CAEA,UAAUnB,EAA8B,CACtCA,EAAW,aAAa,KAAK,KAAK,CACpC,CAEA,0BAA0BA,EAA8B,CACtD,IAAMC,EAAW,KAAK,WAAW,EACjCD,EAAW,eAAeC,CAAQ,CACpC,CAEA,2BAA2BD,EAA8B,CAEvD,IAAMoB,EAAmB,KAAK,WAAW,EAAE,MAAM,CAAC,EAEjCxB,EAAW,GAAGwB,CAAgB,EACtC,2BAA2BpB,CAAU,CAChD,CAEA,OAAO,YAAYc,EAAwC,CACzD,OAAO,IAAII,EAAWJ,EAAa,eAAe,CAAC,CACrD,CACF,EAEaO,EAAN,MAAMC,UACHxB,CAEV,CAKE,YAAYqB,EAAkB,CAC5B,MAAM,EACF,OAAOA,EAAU,KAAeA,IAAU,KAC5C,KAAK,IAAM,IAAIvB,EAAW,CAACuB,CAAK,CAAC,EAEjC,KAAK,IAAM,IAAIvB,EAAW,CAAC,CAAC,EAG9B,CAAC,KAAK,KAAK,EAAI,KAAK,IAAI,MAC1B,CAEA,0BAA0BI,EAA8B,CACtD,IAAMC,EAAW,KAAK,WAAW,EACjCD,EAAW,eAAeC,CAAQ,CACpC,CAkBA,QAAY,CACV,GAAK,KAAK,OAAO,EAGf,OAAO,KAAK,IAAI,OAAO,CAAC,EAFxB,MAAM,IAAI,MAAM,6CAA6C,CAIjE,CAGA,QAAkB,CAChB,OAAO,KAAK,IAAI,OAAO,SAAW,CACpC,CAEA,UAAUD,EAA8B,CAGtC,KAAK,IAAI,UAAUA,CAAU,CAC/B,CAaA,OAAO,GAAGmB,EAAuC,CAC/C,OAAO,IAAIG,EAAeH,GAAU,KAA8B,IAAIjB,EAAGiB,CAAK,EAAI,MAAS,CAC7F,CAaA,OAAO,IAAIA,EAAwC,CACjD,OAAO,IAAIG,EAAgBH,GAAU,KAA8B,IAAIZ,EAAIY,CAAK,EAAI,MAAS,CAC/F,CAaA,OAAO,IAAIA,EAAwC,CACjD,OAAO,IAAIG,EAAgBH,GAAU,KAA8B,IAAIX,EAAIW,CAAK,EAAI,MAAS,CAC/F,CAaA,OAAO,IAAIA,EAA2C,CACpD,OAAO,IAAIG,EAAgBH,GAAU,KAA8B,IAAIV,EAAIU,CAAK,EAAI,MAAS,CAC/F,CAaA,OAAO,KAAKA,EAA4C,CACtD,OAAO,IAAIG,EAAiBH,GAAU,KAA8B,IAAIT,EAAKS,CAAK,EAAI,MAAS,CACjG,CAaA,OAAO,KAAKA,EAA4C,CACtD,OAAO,IAAIG,EAAiBH,GAAU,KAA8B,IAAIR,EAAKQ,CAAK,EAAI,MAAS,CACjG,CAaA,OAAO,KAAKA,EAA0C,CACpD,OAAO,IAAIG,EAAiBH,GAAU,KAA8B,IAAIP,EAAKO,CAAK,EAAI,MAAS,CACjG,CAcA,OAAO,WAAWA,EAA+C,CAC/D,OAAO,IAAIG,EAAuBH,GAAU,KAA8B,IAAIN,EAAWM,CAAK,EAAI,MAAS,CAC7G,CAEA,OAAO,YACLL,EACAC,EACe,CACf,IAAMQ,EAAS3B,EAAW,YAAYkB,EAAcC,CAAG,EACvD,OAAO,IAAIO,EAAWC,EAAO,OAAO,CAAC,CAAC,CACxC,CACF","names":["MoveVector","_MoveVector","Serializable","values","serializer","bcsBytes","U8","numbers","hex","Hex","v","U16","U32","U64","U128","U256","Bool","MoveString","deserializer","cls","length","i","_MoveString","value","fixedStringBytes","MoveOption","_MoveOption","vector"]}
@@ -1,2 +1,2 @@
1
- import{a as g,f as d,g as b,i as S}from"./chunk-XQM7P7PK.mjs";import{a as C}from"./chunk-MIEL2ZWA.mjs";import{a as P}from"./chunk-O5IXBRSF.mjs";import{a as w}from"./chunk-HZCFCP4P.mjs";import{a as I}from"./chunk-IYZMBB6Z.mjs";import{d as l}from"./chunk-5YKVCBMZ.mjs";import{a as T}from"./chunk-6RI3QGKV.mjs";import{c as f,m as s}from"./chunk-42XI3HFJ.mjs";import{b as p}from"./chunk-TYS55ZIF.mjs";import{b as A}from"./chunk-IPBKWCHZ.mjs";import{a as r}from"./chunk-XAISUKMY.mjs";import{b as y}from"./chunk-6QGVRNV6.mjs";async function h(t){let a=await D(t);return G(t,a)}async function D(t){let{aptosConfig:a,data:n}=t,e,o;return"bytecode"in n?o=await g(n):"multisigAddress"in n?(e={aptosConfig:a,multisigAddress:n.multisigAddress,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},o=await g(e)):(e={aptosConfig:a,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},o=await g(e)),o}async function G(t,a){let{aptosConfig:n,sender:e,options:o}=t,i;if(K(t)&&(i=p.ZERO.toString()),U(t)){let{secondarySignerAddresses:c}=t;return d({aptosConfig:n,sender:e,payload:a,options:o,secondarySignerAddresses:c,feePayerAddress:i})}return d({aptosConfig:n,sender:e,payload:a,options:o,feePayerAddress:i})}function K(t){return t.withFeePayer===!0}function U(t){return"secondarySignerAddresses"in t}function Y(t){let{transaction:a}=t;return l(a)}function _(t){let{signer:a,transaction:n}=t;return a.signTransactionWithAuthenticator(n)}async function $(t){let{aptosConfig:a,transaction:n,signerPublicKey:e,secondarySignersPublicKeys:o,feePayerPublicKey:i,options:c}=t,u=b({transaction:n,signerPublicKey:e,secondarySignersPublicKeys:o,feePayerPublicKey:i,options:c}),{data:m}=await A({aptosConfig:a,body:u,path:"transactions/simulate",params:{estimate_gas_unit_price:t.options?.estimateGasUnitPrice??!1,estimate_max_gas_amount:t.options?.estimateMaxGasAmount??!1,estimate_prioritized_gas_unit_price:t.options?.estimatePrioritizedGasUnitPrice??!1},originMethod:"simulateTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return m}async function B(t){let{aptosConfig:a}=t,n=S({...t}),{data:e}=await A({aptosConfig:a,body:n,path:"transactions",originMethod:"submitTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return e}async function M(t){let{aptosConfig:a,signer:n,transaction:e}=t;(n instanceof I||n instanceof w)&&await n.waitForProofFetch();let o=_({signer:n,transaction:e});return B({aptosConfig:a,transaction:e,senderAuthenticator:o})}var N={typeParameters:[],parameters:[s.u8(),new s(s.u8())]};async function nn(t){let{aptosConfig:a,account:n,metadataBytes:e,moduleBytecode:o,options:i}=t,c=o.map(u=>r.U8(u));return h({aptosConfig:a,sender:p.from(n),data:{function:"0x1::code::publish_package_txn",functionArguments:[r.U8(e),new r(c)],abi:N},options:i})}var F={typeParameters:[],parameters:[new f,s.u8(),new f,s.u8(),s.u8(),s.u8()]};async function tn(t){let{aptosConfig:a,fromAccount:n,toNewPrivateKey:e}=t,o=await C({aptosConfig:a,accountAddress:n.accountAddress}),i=P.fromPrivateKey({privateKey:e,legacy:!0}),u=new T({sequenceNumber:BigInt(o.sequence_number),originator:n.accountAddress,currentAuthKey:p.from(o.authentication_key),newPublicKey:i.publicKey}).bcsToBytes(),m=n.sign(u),R=i.sign(u),x=await h({aptosConfig:a,sender:n.accountAddress,data:{function:"0x1::account::rotate_authentication_key",functionArguments:[new y(n.signingScheme),r.U8(n.publicKey.toUint8Array()),new y(i.signingScheme),r.U8(i.publicKey.toUint8Array()),r.U8(m.toUint8Array()),r.U8(R.toUint8Array())],abi:F}});return M({aptosConfig:a,signer:n,transaction:x})}export{h as a,D as b,G as c,Y as d,_ as e,$ as f,B as g,M as h,nn as i,tn as j};
2
- //# sourceMappingURL=chunk-6AO7XFMJ.mjs.map
1
+ import{a as g,f as d,g as b,i as S}from"./chunk-ZQUDGZIZ.mjs";import{a as C}from"./chunk-GRZVD45M.mjs";import{a as P}from"./chunk-VRSZLJVR.mjs";import{a as w}from"./chunk-ICE6OL3A.mjs";import{a as I}from"./chunk-WUWJLSGN.mjs";import{d as l}from"./chunk-HACVLK5I.mjs";import{a as T}from"./chunk-GCPWPGCS.mjs";import{c as f,m as s}from"./chunk-RFA7BIDN.mjs";import{b as p}from"./chunk-BF46IXHH.mjs";import{b as A}from"./chunk-GMHGYDZQ.mjs";import{a as r}from"./chunk-KMJ6TF6Y.mjs";import{b as y}from"./chunk-YPHH6CAO.mjs";async function h(t){let a=await D(t);return G(t,a)}async function D(t){let{aptosConfig:a,data:n}=t,e,o;return"bytecode"in n?o=await g(n):"multisigAddress"in n?(e={aptosConfig:a,multisigAddress:n.multisigAddress,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},o=await g(e)):(e={aptosConfig:a,function:n.function,functionArguments:n.functionArguments,typeArguments:n.typeArguments,abi:n.abi},o=await g(e)),o}async function G(t,a){let{aptosConfig:n,sender:e,options:o}=t,i;if(K(t)&&(i=p.ZERO.toString()),U(t)){let{secondarySignerAddresses:c}=t;return d({aptosConfig:n,sender:e,payload:a,options:o,secondarySignerAddresses:c,feePayerAddress:i})}return d({aptosConfig:n,sender:e,payload:a,options:o,feePayerAddress:i})}function K(t){return t.withFeePayer===!0}function U(t){return"secondarySignerAddresses"in t}function Y(t){let{transaction:a}=t;return l(a)}function _(t){let{signer:a,transaction:n}=t;return a.signTransactionWithAuthenticator(n)}async function $(t){let{aptosConfig:a,transaction:n,signerPublicKey:e,secondarySignersPublicKeys:o,feePayerPublicKey:i,options:c}=t,u=b({transaction:n,signerPublicKey:e,secondarySignersPublicKeys:o,feePayerPublicKey:i,options:c}),{data:m}=await A({aptosConfig:a,body:u,path:"transactions/simulate",params:{estimate_gas_unit_price:t.options?.estimateGasUnitPrice??!1,estimate_max_gas_amount:t.options?.estimateMaxGasAmount??!1,estimate_prioritized_gas_unit_price:t.options?.estimatePrioritizedGasUnitPrice??!1},originMethod:"simulateTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return m}async function B(t){let{aptosConfig:a}=t,n=S({...t}),{data:e}=await A({aptosConfig:a,body:n,path:"transactions",originMethod:"submitTransaction",contentType:"application/x.aptos.signed_transaction+bcs"});return e}async function M(t){let{aptosConfig:a,signer:n,transaction:e}=t;(n instanceof I||n instanceof w)&&await n.waitForProofFetch();let o=_({signer:n,transaction:e});return B({aptosConfig:a,transaction:e,senderAuthenticator:o})}var N={typeParameters:[],parameters:[s.u8(),new s(s.u8())]};async function nn(t){let{aptosConfig:a,account:n,metadataBytes:e,moduleBytecode:o,options:i}=t,c=o.map(u=>r.U8(u));return h({aptosConfig:a,sender:p.from(n),data:{function:"0x1::code::publish_package_txn",functionArguments:[r.U8(e),new r(c)],abi:N},options:i})}var F={typeParameters:[],parameters:[new f,s.u8(),new f,s.u8(),s.u8(),s.u8()]};async function tn(t){let{aptosConfig:a,fromAccount:n,toNewPrivateKey:e}=t,o=await C({aptosConfig:a,accountAddress:n.accountAddress}),i=P.fromPrivateKey({privateKey:e,legacy:!0}),u=new T({sequenceNumber:BigInt(o.sequence_number),originator:n.accountAddress,currentAuthKey:p.from(o.authentication_key),newPublicKey:i.publicKey}).bcsToBytes(),m=n.sign(u),R=i.sign(u),x=await h({aptosConfig:a,sender:n.accountAddress,data:{function:"0x1::account::rotate_authentication_key",functionArguments:[new y(n.signingScheme),r.U8(n.publicKey.toUint8Array()),new y(i.signingScheme),r.U8(i.publicKey.toUint8Array()),r.U8(m.toUint8Array()),r.U8(R.toUint8Array())],abi:F}});return M({aptosConfig:a,signer:n,transaction:x})}export{h as a,D as b,G as c,Y as d,_ as e,$ as f,B as g,M as h,nn as i,tn as j};
2
+ //# sourceMappingURL=chunk-KUAN2WZF.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t,b as n,c as o,d as r}from"./chunk-GXLFQEPR.mjs";import{a as s}from"./chunk-FD2VCIZG.mjs";import{b as i}from"./chunk-BF46IXHH.mjs";var a=class{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),t({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),(await t({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetMetadataByCreatorAddress(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),await t({aptosConfig:this.config,options:{where:{creator_address:{_eq:i.from(e.creatorAddress).toStringLong()}}}})}async getFungibleAssetActivities(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),n({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),o({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return r({aptosConfig:this.config,...e})}};export{a};
2
+ //# sourceMappingURL=chunk-LAZTLEXF.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/api/fungibleAsset.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n AnyNumber,\n GetCurrentFungibleAssetBalancesResponse,\n GetFungibleAssetActivitiesResponse,\n GetFungibleAssetMetadataResponse,\n PaginationArgs,\n WhereArg,\n} from \"../types\";\nimport {\n getCurrentFungibleAssetBalances,\n getFungibleAssetActivities,\n getFungibleAssetMetadata,\n transferFungibleAsset,\n} from \"../internal/fungibleAsset\";\nimport {\n CurrentFungibleAssetBalancesBoolExp,\n FungibleAssetActivitiesBoolExp,\n FungibleAssetMetadataBoolExp,\n} from \"../types/generated/types\";\nimport { ProcessorType } from \"../utils/const\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\nimport { Account } from \"../account\";\nimport { AccountAddress, AccountAddressInput } from \"../core\";\nimport { InputGenerateTransactionOptions } from \"../transactions\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\n\n/**\n * A class to query all `FungibleAsset` related queries on Aptos.\n */\nexport class FungibleAsset {\n constructor(readonly config: AptosConfig) {}\n\n /**\n * Queries all fungible asset metadata.\n *\n * @example\n * const fungibleAsset = await aptos.getFungibleAssetMetadata()\n *\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.options Optional configuration for pagination and filtering\n *\n * @returns A list of fungible asset metadata\n */\n async getFungibleAssetMetadata(args?: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<FungibleAssetMetadataBoolExp>;\n }): Promise<GetFungibleAssetMetadataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getFungibleAssetMetadata({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries a fungible asset metadata by the asset type\n *\n * This query returns the fungible asset metadata for a specific fungible asset.\n *\n * @example\n * const fungibleAsset = await aptos.getFungibleAssetMetadataByAssetType({assetType:\"0x123::test_coin::TestCoin\"})\n *\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.assetType The asset type of the fungible asset.\n * e.g\n * \"0x1::aptos_coin::AptosCoin\" for Aptos Coin\n * \"0xc2948283c2ce03aafbb294821de7ee684b06116bb378ab614fa2de07a99355a8\" - address format if this is fungible asset\n *\n * @returns A fungible asset metadata item\n */\n async getFungibleAssetMetadataByAssetType(args: {\n assetType: string;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<GetFungibleAssetMetadataResponse[0]> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n const data = await getFungibleAssetMetadata({\n aptosConfig: this.config,\n options: {\n where: {\n asset_type: { _eq: args.assetType },\n },\n },\n });\n\n return data[0];\n }\n\n /**\n * Queries a fungible asset metadata by the creator address\n *\n * This query returns the fungible asset metadata for a specific fungible asset.\n *\n * @example\n * const fungibleAsset = await aptos.getFungibleAssetMetadataByCreatorAddress({creatorAddress:\"0x123\"})\n *\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.creatorAddress The creator address of the fungible asset.\n *\n * @returns A fungible asset metadata item\n */\n async getFungibleAssetMetadataByCreatorAddress(args: {\n creatorAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<GetFungibleAssetMetadataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n const data = await getFungibleAssetMetadata({\n aptosConfig: this.config,\n options: {\n where: {\n creator_address: { _eq: AccountAddress.from(args.creatorAddress).toStringLong() },\n },\n },\n });\n\n return data;\n }\n\n /**\n * Queries all fungible asset activities\n *\n * @example\n * const fungibleAssetActivities = await aptos.getFungibleAssetActivities()\n *\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.options Optional configuration for pagination and filtering\n *\n * @returns A list of fungible asset metadata\n */\n async getFungibleAssetActivities(args?: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<FungibleAssetActivitiesBoolExp>;\n }): Promise<GetFungibleAssetActivitiesResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getFungibleAssetActivities({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries all fungible asset balances\n *\n * @example\n * const fungibleAssetBalances = await aptos.getCurrentFungibleAssetBalances()\n *\n * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying\n * @param args.options Optional configuration for pagination and filtering\n *\n * @returns A list of fungible asset metadata\n */\n async getCurrentFungibleAssetBalances(args?: {\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & WhereArg<CurrentFungibleAssetBalancesBoolExp>;\n }): Promise<GetCurrentFungibleAssetBalancesResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args?.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getCurrentFungibleAssetBalances({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Transfer `amount` of fungible asset from sender's primary store to recipient's primary store.\n *\n * Use this method to transfer any fungible asset including fungible token.\n *\n * @example\n * const transaction = await aptos.transferFungibleAsset({\n * sender: alice,\n * fungibleAssetMetadataAddress: \"0x123\",\n * recipient: \"0x456\",\n * amount: 5\n * })\n *\n * @param sender The sender account\n * @param fungibleAssetMetadataAddress The fungible asset account address.\n * For example if you’re transferring USDT this would be the USDT address\n * @param recipient The recipient account address\n * @param amount Number of assets to transfer\n *\n * @returns A SimpleTransaction that can be simulated or submitted to chain.\n */\n async transferFungibleAsset(args: {\n sender: Account;\n fungibleAssetMetadataAddress: AccountAddressInput;\n recipient: AccountAddressInput;\n amount: AnyNumber;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return transferFungibleAsset({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"gJAiCO,IAAMA,EAAN,KAAoB,CACzB,YAAqBC,EAAqB,CAArB,YAAAA,CAAsB,CAa3C,MAAM,yBAAyBC,EAGe,CAC5C,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,GAAM,qBAC5B,wCACF,CAAC,EACME,EAAyB,CAAE,YAAa,KAAK,OAAQ,GAAGF,CAAK,CAAC,CACvE,CAkBA,MAAM,oCAAoCA,EAGO,CAC/C,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,GAAM,qBAC5B,wCACF,CAAC,GACY,MAAME,EAAyB,CAC1C,YAAa,KAAK,OAClB,QAAS,CACP,MAAO,CACL,WAAY,CAAE,IAAKF,EAAK,SAAU,CACpC,CACF,CACF,CAAC,GAEW,CAAC,CACf,CAeA,MAAM,yCAAyCA,EAGD,CAC5C,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,GAAM,qBAC5B,wCACF,CAAC,EACY,MAAME,EAAyB,CAC1C,YAAa,KAAK,OAClB,QAAS,CACP,MAAO,CACL,gBAAiB,CAAE,IAAKC,EAAe,KAAKH,EAAK,cAAc,EAAE,aAAa,CAAE,CAClF,CACF,CACF,CAAC,CAGH,CAaA,MAAM,2BAA2BA,EAGe,CAC9C,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,GAAM,qBAC5B,wCACF,CAAC,EACMI,EAA2B,CAAE,YAAa,KAAK,OAAQ,GAAGJ,CAAK,CAAC,CACzE,CAaA,MAAM,gCAAgCA,EAGe,CACnD,aAAMC,EAAwB,CAC5B,OAAQ,KAAK,OACb,qBAAsBD,GAAM,qBAC5B,wCACF,CAAC,EACMK,EAAgC,CAAE,YAAa,KAAK,OAAQ,GAAGL,CAAK,CAAC,CAC9E,CAuBA,MAAM,sBAAsBA,EAMG,CAC7B,OAAOM,EAAsB,CAAE,YAAa,KAAK,OAAQ,GAAGN,CAAK,CAAC,CACpE,CACF","names":["FungibleAsset","config","args","waitForIndexerOnVersion","getFungibleAssetMetadata","AccountAddress","getFungibleAssetActivities","getCurrentFungibleAssetBalances","transferFungibleAsset"]}
@@ -1,2 +1,2 @@
1
- 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-MIEL2ZWA.mjs";import{a as n}from"./chunk-FDVU4LJF.mjs";import{e as o}from"./chunk-YE5B2S5L.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-RQ7N6FTV.mjs.map
1
+ 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-GRZVD45M.mjs";import{a as n}from"./chunk-FD2VCIZG.mjs";import{e as o}from"./chunk-YE5B2S5L.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-LLLINNAG.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d,b}from"./chunk-DIJ7EEXC.mjs";import{a as h,b as z}from"./chunk-YLDLEASQ.mjs";import{a as p,b as g}from"./chunk-CR2SYJYG.mjs";import{a as o,c as y}from"./chunk-B3UIFT2G.mjs";import{a as c}from"./chunk-HPZ2S4FE.mjs";var r=class extends c{static deserialize(i){let e=i.deserializeUleb128AsU32();switch(e){case 0:return u.load(i);case 1:return l.load(i);case 2:return n.load(i);case 3:return a.load(i);default:throw new Error(`Unknown variant index for AccountAuthenticator: ${e}`)}}isEd25519(){return this instanceof u}isMultiEd25519(){return this instanceof l}isSingleKey(){return this instanceof n}isMultiKey(){return this instanceof a}},u=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(0),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=o.deserialize(i),s=y.deserialize(i);return new t(e,s)}},l=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(1),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=d.deserialize(i),s=b.deserialize(i);return new t(e,s)}},n=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(2),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=p.deserialize(i),s=g.deserialize(i);return new t(e,s)}},a=class t extends r{constructor(i,e){super(),this.public_keys=i,this.signatures=e}serialize(i){i.serializeU32AsUleb128(3),this.public_keys.serialize(i),this.signatures.serialize(i)}static load(i){let e=h.deserialize(i),s=z.deserialize(i);return new t(e,s)}};export{r as a,u as b,l as c,n as d,a as e};
2
- //# sourceMappingURL=chunk-DBDIEGAX.mjs.map
1
+ import{a as d,b}from"./chunk-4EPLOSKY.mjs";import{a as h,b as z}from"./chunk-MUAV4P6C.mjs";import{a as p,b as g}from"./chunk-V5JJHVMP.mjs";import{a as o,c as y}from"./chunk-A2Z7I2EY.mjs";import{a as c}from"./chunk-A63SMUOU.mjs";var r=class extends c{static deserialize(i){let e=i.deserializeUleb128AsU32();switch(e){case 0:return u.load(i);case 1:return l.load(i);case 2:return n.load(i);case 3:return a.load(i);default:throw new Error(`Unknown variant index for AccountAuthenticator: ${e}`)}}isEd25519(){return this instanceof u}isMultiEd25519(){return this instanceof l}isSingleKey(){return this instanceof n}isMultiKey(){return this instanceof a}},u=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(0),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=o.deserialize(i),s=y.deserialize(i);return new t(e,s)}},l=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(1),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=d.deserialize(i),s=b.deserialize(i);return new t(e,s)}},n=class t extends r{constructor(i,e){super(),this.public_key=i,this.signature=e}serialize(i){i.serializeU32AsUleb128(2),this.public_key.serialize(i),this.signature.serialize(i)}static load(i){let e=p.deserialize(i),s=g.deserialize(i);return new t(e,s)}},a=class t extends r{constructor(i,e){super(),this.public_keys=i,this.signatures=e}serialize(i){i.serializeU32AsUleb128(3),this.public_keys.serialize(i),this.signatures.serialize(i)}static load(i){let e=h.deserialize(i),s=z.deserialize(i);return new t(e,s)}};export{r as a,u as b,l as c,n as d,a as e};
2
+ //# sourceMappingURL=chunk-LWFSV3OA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t,c as n}from"./chunk-B3UIFT2G.mjs";import{a as l}from"./chunk-IMGLHDIA.mjs";import{a as u}from"./chunk-BF4ZE37Q.mjs";import{a as s}from"./chunk-DZXM2MQY.mjs";import{b as o}from"./chunk-BCUSI3N6.mjs";var c=class i extends l{constructor(e){super();let r=e.constructor.name;switch(r){case t.name:this.publicKey=e,this.variant=0;break;default:throw new Error(`Unsupported key for EphemeralPublicKey - ${r}`)}}toUint8Array(){return this.bcsToBytes()}verifySignature(e){let{message:r,signature:a}=e;return this.publicKey.verifySignature({message:r,signature:a})}serialize(e){if(this.publicKey instanceof t)e.serializeU32AsUleb128(0),this.publicKey.serialize(e);else throw new Error("Unknown public key type")}static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return new i(t.deserialize(e));default:throw new Error(`Unknown variant index for EphemeralPublicKey: ${r}`)}}static isPublicKey(e){return e instanceof i}},p=class i extends u{constructor(e){super();let r=e.constructor.name;switch(r){case n.name:this.signature=e;break;default:throw new Error(`Unsupported signature for EphemeralSignature - ${r}`)}}toUint8Array(){return this.bcsToBytes()}static fromHex(e){let r=o.fromHexInput(e),a=new s(r.toUint8Array());return i.deserialize(a)}serialize(e){if(this.signature instanceof n)e.serializeU32AsUleb128(0),this.signature.serialize(e);else throw new Error("Unknown signature type")}static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return new i(n.deserialize(e));default:throw new Error(`Unknown variant index for EphemeralSignature: ${r}`)}}};export{c as a,p as b};
2
- //# sourceMappingURL=chunk-VJZVCHIS.mjs.map
1
+ import{a as t,c as n}from"./chunk-A2Z7I2EY.mjs";import{a as l}from"./chunk-76OH2Z4Q.mjs";import{a as u}from"./chunk-MLDQ2TY2.mjs";import{b as o}from"./chunk-BCUSI3N6.mjs";import{a as s}from"./chunk-DZXM2MQY.mjs";var c=class i extends l{constructor(e){super();let r=e.constructor.name;switch(r){case t.name:this.publicKey=e,this.variant=0;break;default:throw new Error(`Unsupported key for EphemeralPublicKey - ${r}`)}}toUint8Array(){return this.bcsToBytes()}verifySignature(e){let{message:r,signature:a}=e;return this.publicKey.verifySignature({message:r,signature:a})}serialize(e){if(this.publicKey instanceof t)e.serializeU32AsUleb128(0),this.publicKey.serialize(e);else throw new Error("Unknown public key type")}static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return new i(t.deserialize(e));default:throw new Error(`Unknown variant index for EphemeralPublicKey: ${r}`)}}static isPublicKey(e){return e instanceof i}},p=class i extends u{constructor(e){super();let r=e.constructor.name;switch(r){case n.name:this.signature=e;break;default:throw new Error(`Unsupported signature for EphemeralSignature - ${r}`)}}toUint8Array(){return this.bcsToBytes()}static fromHex(e){let r=o.fromHexInput(e),a=new s(r.toUint8Array());return i.deserialize(a)}serialize(e){if(this.signature instanceof n)e.serializeU32AsUleb128(0),this.signature.serialize(e);else throw new Error("Unknown signature type")}static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return new i(n.deserialize(e));default:throw new Error(`Unknown variant index for EphemeralSignature: ${r}`)}}};export{c as a,p as b};
2
+ //# sourceMappingURL=chunk-MH6HIFMG.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as r}from"./chunk-XQM7P7PK.mjs";import{b as i}from"./chunk-IPBKWCHZ.mjs";import{b as t}from"./chunk-HPZ2S4FE.mjs";async function v(a){let{aptosConfig:o,payload:n,options:s}=a,p=await r({...n,aptosConfig:o}),e=new t;p.serialize(e);let l=e.toUint8Array(),{data:d}=await i({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-4435A7EV.mjs.map
1
+ import{c as r}from"./chunk-ZQUDGZIZ.mjs";import{b as i}from"./chunk-GMHGYDZQ.mjs";import{b as t}from"./chunk-A63SMUOU.mjs";async function v(a){let{aptosConfig:o,payload:n,options:s}=a,p=await r({...n,aptosConfig:o}),e=new t;p.serialize(e);let l=e.toUint8Array(),{data:d}=await i({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-MKOIEX4B.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-HPZ2S4FE.mjs";import{b as t}from"./chunk-BCUSI3N6.mjs";var o=class extends r{toString(){let i=this.toUint8Array();return t.fromHexInput(i).toString()}};export{o as a};
2
- //# sourceMappingURL=chunk-BF4ZE37Q.mjs.map
1
+ import{a as r}from"./chunk-A63SMUOU.mjs";import{b as t}from"./chunk-BCUSI3N6.mjs";var o=class extends r{toString(){let i=this.toUint8Array();return t.fromHexInput(i).toString()}};export{o as a};
2
+ //# sourceMappingURL=chunk-MLDQ2TY2.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-HPZ2S4FE.mjs";import{b as t}from"./chunk-BCUSI3N6.mjs";var e=class extends r{toString(){let s=this.bcsToBytes();return t.fromHexInput(s).toString()}};export{e as a};
2
- //# sourceMappingURL=chunk-M2QV232A.mjs.map
1
+ import{a as r}from"./chunk-A63SMUOU.mjs";import{b as t}from"./chunk-BCUSI3N6.mjs";var e=class extends r{toString(){let s=this.bcsToBytes();return t.fromHexInput(s).toString()}};export{e as a};
2
+ //# sourceMappingURL=chunk-MQGW234H.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o,b as h}from"./chunk-CR2SYJYG.mjs";import{b as m}from"./chunk-IMGLHDIA.mjs";import{a as g}from"./chunk-BF4ZE37Q.mjs";import{a as b}from"./chunk-XAFM4JZX.mjs";function d(l){let e=l;return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}var f=class l extends m{constructor(e){super();let{publicKeys:r,signaturesRequired:t}=e;if(t<1)throw new Error("The number of required signatures needs to be greater than 0");if(r.length<t)throw new Error(`Provided ${r.length} public keys is smaller than the ${t} required signatures`);this.publicKeys=r.map(i=>i instanceof o?i:new o(i)),this.signaturesRequired=t}verifySignature(e){throw new Error("not implemented")}authKey(){return b.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let r=e.deserializeVector(o),t=e.deserializeU8();return new l({publicKeys:r,signaturesRequired:t})}createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach((n,u)=>{if(u+1>this.publicKeys.length)throw new Error(`Signature index ${u+1} is out of public keys range, ${this.publicKeys.length}.`);if(a.has(n))throw new Error(`Duplicate bit ${n} detected.`);a.add(n);let c=Math.floor(n/8),y=i[c];y|=t>>n%8,i[c]=y}),i}getIndex(e){let r=e instanceof o?e:new o(e),t=this.publicKeys.findIndex(i=>i.toString()===r.toString());if(t!==-1)return t;throw new Error("Public key not found in MultiKey")}},s=class s extends g{constructor(e){super();let{signatures:r,bitmap:t}=e;if(r.length>s.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${s.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=r.map(a=>a instanceof h?a:new h(a)),!(t instanceof Uint8Array))this.bitmap=s.createBitmap({bits:t});else{if(t.length!==s.BITMAP_LEN)throw new Error(`"bitmap" length should be ${s.BITMAP_LEN}`);this.bitmap=t}let i=this.bitmap.reduce((a,n)=>a+d(n),0);if(i!==this.signatures.length)throw new Error(`Expecting ${i} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach(n=>{if(n>=s.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${s.MAX_SIGNATURES_SUPPORTED-1}.`);if(a.has(n))throw new Error("Duplicate bits detected.");a.add(n);let u=Math.floor(n/8),c=i[u];c|=t>>n%8,i[u]=c}),i}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let r=e.deserializeVector(h),t=e.deserializeBytes();return new s({signatures:r,bitmap:t})}};s.BITMAP_LEN=4,s.MAX_SIGNATURES_SUPPORTED=s.BITMAP_LEN*8;var p=s;export{f as a,p as b};
2
- //# sourceMappingURL=chunk-YLDLEASQ.mjs.map
1
+ import{a as o,b as h}from"./chunk-V5JJHVMP.mjs";import{b as m}from"./chunk-76OH2Z4Q.mjs";import{a as g}from"./chunk-MLDQ2TY2.mjs";import{a as b}from"./chunk-77NXCSLY.mjs";function d(l){let e=l;return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}var f=class l extends m{constructor(e){super();let{publicKeys:r,signaturesRequired:t}=e;if(t<1)throw new Error("The number of required signatures needs to be greater than 0");if(r.length<t)throw new Error(`Provided ${r.length} public keys is smaller than the ${t} required signatures`);this.publicKeys=r.map(i=>i instanceof o?i:new o(i)),this.signaturesRequired=t}verifySignature(e){throw new Error("not implemented")}authKey(){return b.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let r=e.deserializeVector(o),t=e.deserializeU8();return new l({publicKeys:r,signaturesRequired:t})}createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach((n,u)=>{if(u+1>this.publicKeys.length)throw new Error(`Signature index ${u+1} is out of public keys range, ${this.publicKeys.length}.`);if(a.has(n))throw new Error(`Duplicate bit ${n} detected.`);a.add(n);let c=Math.floor(n/8),y=i[c];y|=t>>n%8,i[c]=y}),i}getIndex(e){let r=e instanceof o?e:new o(e),t=this.publicKeys.findIndex(i=>i.toString()===r.toString());if(t!==-1)return t;throw new Error("Public key not found in MultiKey")}},s=class s extends g{constructor(e){super();let{signatures:r,bitmap:t}=e;if(r.length>s.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${s.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=r.map(a=>a instanceof h?a:new h(a)),!(t instanceof Uint8Array))this.bitmap=s.createBitmap({bits:t});else{if(t.length!==s.BITMAP_LEN)throw new Error(`"bitmap" length should be ${s.BITMAP_LEN}`);this.bitmap=t}let i=this.bitmap.reduce((a,n)=>a+d(n),0);if(i!==this.signatures.length)throw new Error(`Expecting ${i} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach(n=>{if(n>=s.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${s.MAX_SIGNATURES_SUPPORTED-1}.`);if(a.has(n))throw new Error("Duplicate bits detected.");a.add(n);let u=Math.floor(n/8),c=i[u];c|=t>>n%8,i[u]=c}),i}toUint8Array(){return this.bcsToBytes()}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let r=e.deserializeVector(h),t=e.deserializeBytes();return new s({signatures:r,bitmap:t})}};s.BITMAP_LEN=4,s.MAX_SIGNATURES_SUPPORTED=s.BITMAP_LEN*8;var p=s;export{f as a,p as b};
2
+ //# sourceMappingURL=chunk-MUAV4P6C.mjs.map
@@ -1,2 +1,2 @@
1
- import{f as e,g as s,h as t,i as o,j as r,k as i,l as a,m,n as c,o as g,p as u,q as p,r as d}from"./chunk-EPYUPOEE.mjs";var A=class{constructor(n){this.config=n}async getOwnerAddress(n){return e({aptosConfig:this.config,...n})}async getExpiration(n){return t({aptosConfig:this.config,...n})}async getTargetAddress(n){return i({aptosConfig:this.config,...n})}async setTargetAddress(n){return a({aptosConfig:this.config,...n})}async getPrimaryName(n){return o({aptosConfig:this.config,...n})}async setPrimaryName(n){return r({aptosConfig:this.config,...n})}async registerName(n){return s({aptosConfig:this.config,...n})}async renewDomain(n){return d({aptosConfig:this.config,...n})}async getName(n){return m({aptosConfig:this.config,...n})}async getAccountNames(n){return c({aptosConfig:this.config,...n})}async getAccountDomains(n){return g({aptosConfig:this.config,...n})}async getAccountSubdomains(n){return u({aptosConfig:this.config,...n})}async getDomainSubdomains(n){return p({aptosConfig:this.config,...n})}};export{A as a};
2
- //# sourceMappingURL=chunk-774QDXM7.mjs.map
1
+ import{f as e,g as s,h as t,i as o,j as r,k as i,l as a,m,n as c,o as g,p as u,q as p,r as d}from"./chunk-HJT2Q5NL.mjs";var A=class{constructor(n){this.config=n}async getOwnerAddress(n){return e({aptosConfig:this.config,...n})}async getExpiration(n){return t({aptosConfig:this.config,...n})}async getTargetAddress(n){return i({aptosConfig:this.config,...n})}async setTargetAddress(n){return a({aptosConfig:this.config,...n})}async getPrimaryName(n){return o({aptosConfig:this.config,...n})}async setPrimaryName(n){return r({aptosConfig:this.config,...n})}async registerName(n){return s({aptosConfig:this.config,...n})}async renewDomain(n){return d({aptosConfig:this.config,...n})}async getName(n){return m({aptosConfig:this.config,...n})}async getAccountNames(n){return c({aptosConfig:this.config,...n})}async getAccountDomains(n){return g({aptosConfig:this.config,...n})}async getAccountSubdomains(n){return u({aptosConfig:this.config,...n})}async getDomainSubdomains(n){return p({aptosConfig:this.config,...n})}};export{A as a};
2
+ //# sourceMappingURL=chunk-N5A4L6Z6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-6AO7XFMJ.mjs";import{f as M}from"./chunk-DKEUYXWU.mjs";import{c as V}from"./chunk-MRYNASDY.mjs";import{c as b}from"./chunk-OFERLF6R.mjs";import{A as q,n as x,y as E,z as G}from"./chunk-HIHKTLLM.mjs";import{b as w,f as v,i as h,l as A,m as f,n as s,q as p,s as g}from"./chunk-42XI3HFJ.mjs";import{b as u}from"./chunk-TYS55ZIF.mjs";import{a as I,b as c}from"./chunk-XAISUKMY.mjs";import{a as T,e as S}from"./chunk-6QGVRNV6.mjs";import{d as O}from"./chunk-56CNRT2K.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 It(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:u.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:q,variables:{where_condition:e}},originMethod:"getDigitalAssetData"})).current_token_datas_v2[0]}async function _t(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:u.from(n).toStringLong()},amount:{_gt:0}};return(await b({aptosConfig:o,query:{query:G,variables:{where_condition:e}},originMethod:"getCurrentDigitalAssetOwnership"})).current_token_ownerships_v2[0]}async function Pt(t){let{aptosConfig:o,ownerAddress:n,options:e}=t,r={owner_address:{_eq:u.from(n).toStringLong()},amount:{_gt:0}},i={query:G,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 kt(t){let{aptosConfig:o,digitalAssetAddress:n,options:e}=t,r={token_data_id:{_eq:u.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 Dt(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 c(t.description),new S(t.maxSupply??O),new c(t.name),new c(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=u.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:x,variables:{where_condition:a}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function St(t){let{aptosConfig:o,collectionId:n}=t,r={collection_id:{_eq:u.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:x,variables:{where_condition:r}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function vt(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 ht(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 c(r),new c(i),new c(a),new c(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 h]};async function xt(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:[u.from(e),u.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 h]};async function Gt(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 Bt(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:[u.from(e)],abi:z},options:i})}var L={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::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 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::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 qt(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:[u.from(r),new c(e)],abi:X},options:a})}var H={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Vt(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:[u.from(r),new c(e)],abi:H},options:a})}var J={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Mt(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:[u.from(r),new c(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 Rt(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:[u.from(a),new c(e),new c(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 Kt(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:[u.from(r),new c(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 Qt(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:[u.from(a),new c(e),new c(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 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::add_typed_property",typeArguments:[l??m,C[r]],functionArguments:[u.from(a),new c(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 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::update_typed_property",typeArguments:[l??m,C[r]],functionArguments:[u.from(a),new c(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{It as a,_t as b,Pt as c,kt as d,Dt as e,U as f,St as g,vt as h,ht as i,xt as j,Gt as k,Bt as l,Ot as m,Et as n,qt as o,Vt as p,Mt as q,Rt as r,Kt as s,Qt as t,Ut as u,Ft as v};
2
- //# sourceMappingURL=chunk-S2FOCEY3.mjs.map
1
+ import{a as d}from"./chunk-KUAN2WZF.mjs";import{f as M}from"./chunk-E2JEBCSY.mjs";import{c as V}from"./chunk-3VUSIKCF.mjs";import{c as b}from"./chunk-GPZEPKKD.mjs";import{A as q,n as x,y as E,z as G}from"./chunk-HIHKTLLM.mjs";import{b as w,f as v,i as h,l as A,m as f,n as s,q as p,s as g}from"./chunk-RFA7BIDN.mjs";import{b as u}from"./chunk-BF46IXHH.mjs";import{a as I,b as c}from"./chunk-KMJ6TF6Y.mjs";import{a as T,e as S}from"./chunk-YPHH6CAO.mjs";import{d as O}from"./chunk-56CNRT2K.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 It(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:u.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:q,variables:{where_condition:e}},originMethod:"getDigitalAssetData"})).current_token_datas_v2[0]}async function _t(t){let{aptosConfig:o,digitalAssetAddress:n}=t,e={token_data_id:{_eq:u.from(n).toStringLong()},amount:{_gt:0}};return(await b({aptosConfig:o,query:{query:G,variables:{where_condition:e}},originMethod:"getCurrentDigitalAssetOwnership"})).current_token_ownerships_v2[0]}async function Pt(t){let{aptosConfig:o,ownerAddress:n,options:e}=t,r={owner_address:{_eq:u.from(n).toStringLong()},amount:{_gt:0}},i={query:G,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 kt(t){let{aptosConfig:o,digitalAssetAddress:n,options:e}=t,r={token_data_id:{_eq:u.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 Dt(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 c(t.description),new S(t.maxSupply??O),new c(t.name),new c(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=u.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:x,variables:{where_condition:a}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function St(t){let{aptosConfig:o,collectionId:n}=t,r={collection_id:{_eq:u.from(n).toStringLong()}};return(await b({aptosConfig:o,query:{query:x,variables:{where_condition:r}},originMethod:"getCollectionData"})).current_collections_v2[0]}async function vt(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 ht(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 c(r),new c(i),new c(a),new c(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 h]};async function xt(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:[u.from(e),u.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 h]};async function Gt(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 Bt(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:[u.from(e)],abi:z},options:i})}var L={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::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 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::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 qt(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:[u.from(r),new c(e)],abi:X},options:a})}var H={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Vt(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:[u.from(r),new c(e)],abi:H},options:a})}var J={typeParameters:[{constraints:["key"]}],parameters:[new s(g(new A(0))),new s(p())]};async function Mt(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:[u.from(r),new c(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 Rt(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:[u.from(a),new c(e),new c(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 Kt(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:[u.from(r),new c(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 Qt(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:[u.from(a),new c(e),new c(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 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::add_typed_property",typeArguments:[l??m,C[r]],functionArguments:[u.from(a),new c(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 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::update_typed_property",typeArguments:[l??m,C[r]],functionArguments:[u.from(a),new c(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{It as a,_t as b,Pt as c,kt as d,Dt as e,U as f,St as g,vt as h,ht as i,xt as j,Gt as k,Bt as l,Ot as m,Et as n,qt as o,Vt as p,Mt as q,Rt as r,Kt as s,Qt as t,Ut as u,Ft as v};
2
+ //# sourceMappingURL=chunk-NBGXHLM4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-DBDIEGAX.mjs";import{a as b,b as g}from"./chunk-DIJ7EEXC.mjs";import{a as h,c as p}from"./chunk-B3UIFT2G.mjs";import{b as a}from"./chunk-TYS55ZIF.mjs";import{a as y}from"./chunk-HPZ2S4FE.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-772PPMHG.mjs.map
1
+ import{a as i}from"./chunk-LWFSV3OA.mjs";import{a as b,b as g}from"./chunk-4EPLOSKY.mjs";import{a as h,c as p}from"./chunk-A2Z7I2EY.mjs";import{b as a}from"./chunk-BF46IXHH.mjs";import{a as y}from"./chunk-A63SMUOU.mjs";var n=class extends y{static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return o.load(e);case 1:return d.load(e);case 2:return u.load(e);case 3:return l.load(e);case 4:return A.load(e);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${r}`)}}},o=class s extends n{constructor(e,r){super(),this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=h.deserialize(e),t=p.deserialize(e);return new s(r,t)}},d=class s extends n{constructor(e,r){super(),this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=b.deserialize(e),t=g.deserialize(e);return new s(r,t)}},u=class s extends n{constructor(e,r,t){super(),this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=t}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let r=i.deserialize(e),t=e.deserializeVector(a),c=e.deserializeVector(i);return new s(r,t,c)}},l=class s extends n{constructor(e,r,t,c){super(),this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=t,this.fee_payer=c}serialize(e){e.serializeU32AsUleb128(3),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){let r=i.deserialize(e),t=e.deserializeVector(a),c=e.deserializeVector(i),_=a.deserialize(e),z=i.deserialize(e),S={address:_,authenticator:z};return new s(r,t,c,S)}},A=class s extends n{constructor(e){super(),this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let r=i.deserialize(e);return new s(r)}};export{n as a,o as b,d as c,u as d,l as e,A as f};
2
+ //# sourceMappingURL=chunk-OKLLJQM4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-6AO7XFMJ.mjs";import{f as t,i as o}from"./chunk-42XI3HFJ.mjs";import{e as n}from"./chunk-YE5B2S5L.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-4OMMO2ZM.mjs.map
1
+ import{a as r}from"./chunk-KUAN2WZF.mjs";import{f as t,i as o}from"./chunk-RFA7BIDN.mjs";import{e as n}from"./chunk-YE5B2S5L.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-OLVNRYGT.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-TYS55ZIF.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-GBCAP4Z5.mjs.map
1
+ import{b as c}from"./chunk-BF46IXHH.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-OPGMT27G.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-MS4MRLGA.mjs";import{a as r}from"./chunk-HPZ2S4FE.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-YJCZU6PR.mjs.map
1
+ import{a as i}from"./chunk-H6YNXJNF.mjs";import{a as r}from"./chunk-A63SMUOU.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-P5V7OZNN.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-ANH2FYMX.mjs";import{a as e}from"./chunk-772PPMHG.mjs";import{a as r}from"./chunk-HPZ2S4FE.mjs";var n=class o extends r{constructor(t,a){super(),this.raw_txn=t,this.authenticator=a}serialize(t){this.raw_txn.serialize(t),this.authenticator.serialize(t)}static deserialize(t){let a=i.deserialize(t),s=e.deserialize(t);return new o(a,s)}};export{n as a};
2
- //# sourceMappingURL=chunk-4TODRUKS.mjs.map
1
+ import{a as i}from"./chunk-YDXU6ALO.mjs";import{a as e}from"./chunk-OKLLJQM4.mjs";import{a as r}from"./chunk-A63SMUOU.mjs";var n=class o extends r{constructor(t,a){super(),this.raw_txn=t,this.authenticator=a}serialize(t){this.raw_txn.serialize(t),this.authenticator.serialize(t)}static deserialize(t){let a=i.deserialize(t),s=e.deserialize(t);return new o(a,s)}};export{n as a};
2
+ //# sourceMappingURL=chunk-PS7L2TLP.mjs.map