@aptos-labs/ts-sdk 1.34.0 → 1.35.0-zeta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (909) hide show
  1. package/README.md +8 -9
  2. package/dist/common/{accountAddress-CDtCLtJA.d.ts → accountAddress-Ce4Cv60D.d.ts} +118 -11
  3. package/dist/common/chunk-JMOQXLED.js +1305 -0
  4. package/dist/common/chunk-JMOQXLED.js.map +1 -0
  5. package/dist/common/cli/index.d.ts +1 -1
  6. package/dist/common/cli/index.js +486 -1
  7. package/dist/common/cli/index.js.map +1 -1
  8. package/dist/common/index.d.ts +533 -238
  9. package/dist/common/index.js +18297 -418
  10. package/dist/common/index.js.map +1 -1
  11. package/dist/esm/account/AbstractKeylessAccount.mjs +75 -1
  12. package/dist/esm/account/AbstractedAccount.mjs +74 -1
  13. package/dist/esm/account/Account.d.mts +1 -1
  14. package/dist/esm/account/Account.mjs +72 -1
  15. package/dist/esm/account/AccountUtils.mjs +78 -1
  16. package/dist/esm/account/Ed25519Account.d.mts +2 -2
  17. package/dist/esm/account/Ed25519Account.mjs +70 -1
  18. package/dist/esm/account/EphemeralKeyPair.mjs +50 -1
  19. package/dist/esm/account/FederatedKeylessAccount.mjs +72 -1
  20. package/dist/esm/account/KeylessAccount.mjs +72 -1
  21. package/dist/esm/account/MultiEd25519Account.d.mts +108 -0
  22. package/dist/esm/account/MultiEd25519Account.mjs +71 -0
  23. package/dist/esm/account/MultiKeyAccount.d.mts +1 -2
  24. package/dist/esm/account/MultiKeyAccount.mjs +74 -1
  25. package/dist/esm/account/SingleKeyAccount.mjs +72 -1
  26. package/dist/esm/account/index.d.mts +1 -0
  27. package/dist/esm/account/index.mjs +119 -1
  28. package/dist/esm/account/utils.mjs +54 -1
  29. package/dist/esm/api/account/abstraction.mjs +101 -1
  30. package/dist/esm/api/account.d.mts +18 -2
  31. package/dist/esm/api/account.mjs +103 -1
  32. package/dist/esm/api/ans.mjs +101 -1
  33. package/dist/esm/api/aptos.d.mts +4 -1
  34. package/dist/esm/api/aptos.mjs +136 -1
  35. package/dist/esm/api/aptosConfig.mjs +9 -1
  36. package/dist/esm/api/coin.mjs +99 -1
  37. package/dist/esm/api/digitalAsset.mjs +101 -1
  38. package/dist/esm/api/event.mjs +59 -1
  39. package/dist/esm/api/experimental.d.mts +83 -0
  40. package/dist/esm/api/experimental.mjs +100 -0
  41. package/dist/esm/api/faucet.mjs +58 -1
  42. package/dist/esm/api/fungibleAsset.mjs +101 -1
  43. package/dist/esm/api/general.mjs +99 -1
  44. package/dist/esm/api/index.d.mts +2 -0
  45. package/dist/esm/api/index.mjs +140 -1
  46. package/dist/esm/api/keyless.d.mts +1 -1
  47. package/dist/esm/api/keyless.mjs +100 -1
  48. package/dist/esm/api/object.mjs +59 -1
  49. package/dist/esm/api/staking.mjs +59 -1
  50. package/dist/esm/api/table.mjs +38 -1
  51. package/dist/esm/api/transaction.d.mts +15 -6
  52. package/dist/esm/api/transaction.mjs +108 -1
  53. package/dist/esm/api/transactionSubmission/build.mjs +99 -1
  54. package/dist/esm/api/transactionSubmission/helpers.mjs +9 -1
  55. package/dist/esm/api/transactionSubmission/management.mjs +103 -1
  56. package/dist/esm/api/transactionSubmission/sign.mjs +218 -1
  57. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  58. package/dist/esm/api/transactionSubmission/simulate.mjs +100 -1
  59. package/dist/esm/api/transactionSubmission/submit.mjs +100 -1
  60. package/dist/esm/api/utils.mjs +36 -1
  61. package/dist/esm/bcs/consts.mjs +17 -1
  62. package/dist/esm/bcs/deserializer.mjs +10 -1
  63. package/dist/esm/bcs/index.mjs +60 -1
  64. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +12 -1
  65. package/dist/esm/bcs/serializable/fixedBytes.mjs +11 -1
  66. package/dist/esm/bcs/serializable/movePrimitives.mjs +26 -1
  67. package/dist/esm/bcs/serializable/moveStructs.mjs +22 -1
  68. package/dist/esm/bcs/serializer.mjs +18 -1
  69. package/dist/esm/chunk-2JLHWA2G.mjs +79 -0
  70. package/dist/esm/{chunk-X24PSWCX.mjs.map → chunk-2JLHWA2G.mjs.map} +1 -1
  71. package/dist/esm/chunk-2SIDNRJH.mjs +219 -0
  72. package/dist/esm/{chunk-DNJQWGB7.mjs.map → chunk-2SIDNRJH.mjs.map} +1 -1
  73. package/dist/esm/chunk-2WTIMHGC.mjs +84 -0
  74. package/dist/esm/{chunk-4776UXL6.mjs.map → chunk-2WTIMHGC.mjs.map} +1 -1
  75. package/dist/esm/chunk-2ZX5PHCY.mjs +177 -0
  76. package/dist/esm/{chunk-2GIPNLDO.mjs.map → chunk-2ZX5PHCY.mjs.map} +1 -1
  77. package/dist/esm/chunk-32UQAST6.mjs +296 -0
  78. package/dist/esm/{chunk-BUTMGMSD.mjs.map → chunk-32UQAST6.mjs.map} +1 -1
  79. package/dist/esm/chunk-3E2SXJXZ.mjs +195 -0
  80. package/dist/esm/{chunk-D6T3NYOA.mjs.map → chunk-3E2SXJXZ.mjs.map} +1 -1
  81. package/dist/esm/chunk-3IWV2Q3K.mjs +12 -0
  82. package/dist/esm/{chunk-XJJVJOX5.mjs.map → chunk-3IWV2Q3K.mjs.map} +1 -1
  83. package/dist/esm/chunk-3T7G4OUL.mjs +40 -0
  84. package/dist/esm/chunk-3T7G4OUL.mjs.map +1 -0
  85. package/dist/esm/chunk-54XJAHWK.mjs +829 -0
  86. package/dist/esm/chunk-54XJAHWK.mjs.map +1 -0
  87. package/dist/esm/chunk-56UCIGTO.mjs +21 -0
  88. package/dist/esm/{chunk-XAPQNCTN.mjs.map → chunk-56UCIGTO.mjs.map} +1 -1
  89. package/dist/esm/chunk-5QHMFYVL.mjs +42 -0
  90. package/dist/esm/chunk-5QHMFYVL.mjs.map +1 -0
  91. package/dist/esm/chunk-6ASWESA2.mjs +77 -0
  92. package/dist/esm/{chunk-TOBQ5UE6.mjs.map → chunk-6ASWESA2.mjs.map} +1 -1
  93. package/dist/esm/chunk-6DJZITWL.mjs +177 -0
  94. package/dist/esm/{chunk-PR3W2QEH.mjs.map → chunk-6DJZITWL.mjs.map} +1 -1
  95. package/dist/esm/chunk-6I37A76G.mjs +29 -0
  96. package/dist/esm/{chunk-BI3BTSUB.mjs.map → chunk-6I37A76G.mjs.map} +1 -1
  97. package/dist/esm/chunk-6T3V5LXK.mjs +119 -0
  98. package/dist/esm/chunk-6T3V5LXK.mjs.map +1 -0
  99. package/dist/esm/chunk-7J37IHNP.mjs +70 -0
  100. package/dist/esm/{chunk-CSG67JHZ.mjs.map → chunk-7J37IHNP.mjs.map} +1 -1
  101. package/dist/esm/chunk-AEMQUDMU.mjs +239 -0
  102. package/dist/esm/{chunk-O37BZP2G.mjs.map → chunk-AEMQUDMU.mjs.map} +1 -1
  103. package/dist/esm/chunk-AKXCFBYF.mjs +49 -0
  104. package/dist/esm/{chunk-DBIZE7G6.mjs.map → chunk-AKXCFBYF.mjs.map} +1 -1
  105. package/dist/esm/chunk-APM7OSLS.mjs +122 -0
  106. package/dist/esm/{chunk-GOXRBEIJ.mjs.map → chunk-APM7OSLS.mjs.map} +1 -1
  107. package/dist/esm/chunk-BADWWRLN.mjs +250 -0
  108. package/dist/esm/{chunk-EGZI6EJ2.mjs.map → chunk-BADWWRLN.mjs.map} +1 -1
  109. package/dist/esm/chunk-BDM6FBUO.mjs +198 -0
  110. package/dist/esm/chunk-BDM6FBUO.mjs.map +1 -0
  111. package/dist/esm/chunk-BEYIOC2H.mjs +34 -0
  112. package/dist/esm/{chunk-YOZBVVKL.mjs.map → chunk-BEYIOC2H.mjs.map} +1 -1
  113. package/dist/esm/chunk-BMM72IIP.mjs +250 -0
  114. package/dist/esm/{chunk-AZWVCBK2.mjs.map → chunk-BMM72IIP.mjs.map} +1 -1
  115. package/dist/esm/chunk-BVBIBMAE.mjs +50 -0
  116. package/dist/esm/chunk-BVBIBMAE.mjs.map +1 -0
  117. package/dist/esm/chunk-C7T6GW5P.mjs +376 -0
  118. package/dist/esm/{chunk-EBMEXURY.mjs.map → chunk-C7T6GW5P.mjs.map} +1 -1
  119. package/dist/esm/chunk-CDJNQ7CS.mjs +604 -0
  120. package/dist/esm/chunk-CDJNQ7CS.mjs.map +1 -0
  121. package/dist/esm/chunk-CPZPXG7O.mjs +355 -0
  122. package/dist/esm/{chunk-GQX5KMF7.mjs.map → chunk-CPZPXG7O.mjs.map} +1 -1
  123. package/dist/esm/chunk-CXLXUSCG.mjs +417 -0
  124. package/dist/esm/{chunk-Q4C4U6I4.mjs.map → chunk-CXLXUSCG.mjs.map} +1 -1
  125. package/dist/esm/chunk-D3IWXA33.mjs +415 -0
  126. package/dist/esm/chunk-D3IWXA33.mjs.map +1 -0
  127. package/dist/esm/chunk-DDZGHA66.mjs +495 -0
  128. package/dist/esm/{chunk-G4O6FXCF.mjs.map → chunk-DDZGHA66.mjs.map} +1 -1
  129. package/dist/esm/chunk-EBFKT35C.mjs +66 -0
  130. package/dist/esm/{chunk-KEJAUCQF.mjs.map → chunk-EBFKT35C.mjs.map} +1 -1
  131. package/dist/esm/chunk-EPTUAWRA.mjs +895 -0
  132. package/dist/esm/chunk-EPTUAWRA.mjs.map +1 -0
  133. package/dist/esm/chunk-ESGBNVCA.mjs +51 -0
  134. package/dist/esm/chunk-ESGBNVCA.mjs.map +1 -0
  135. package/dist/esm/chunk-F2EFNUWD.mjs +61 -0
  136. package/dist/esm/{chunk-SCBYJU6K.mjs.map → chunk-F2EFNUWD.mjs.map} +1 -1
  137. package/dist/esm/chunk-F4VI7BNX.mjs +58 -0
  138. package/dist/esm/{chunk-V2EXS6TM.mjs.map → chunk-F4VI7BNX.mjs.map} +1 -1
  139. package/dist/esm/chunk-F65QGYVD.mjs +305 -0
  140. package/dist/esm/chunk-F65QGYVD.mjs.map +1 -0
  141. package/dist/esm/chunk-F7W7KS5C.mjs +52 -0
  142. package/dist/esm/{chunk-C3Q23D22.mjs.map → chunk-F7W7KS5C.mjs.map} +1 -1
  143. package/dist/esm/chunk-FMNMYKYH.mjs +71 -0
  144. package/dist/esm/{chunk-N4DM5FYH.mjs.map → chunk-FMNMYKYH.mjs.map} +1 -1
  145. package/dist/esm/chunk-G34CJDST.mjs +139 -0
  146. package/dist/esm/chunk-G34CJDST.mjs.map +1 -0
  147. package/dist/esm/chunk-G4NBRMZ2.mjs +7 -0
  148. package/dist/esm/{chunk-3OLFJ65O.mjs.map → chunk-G4NBRMZ2.mjs.map} +1 -1
  149. package/dist/esm/chunk-GFPEB22G.mjs +1 -0
  150. package/dist/esm/chunk-GFPEB22G.mjs.map +1 -0
  151. package/dist/esm/chunk-GUA5YTIK.mjs +362 -0
  152. package/dist/esm/{chunk-35DKMW7Q.mjs.map → chunk-GUA5YTIK.mjs.map} +1 -1
  153. package/dist/esm/chunk-GUEJH55K.mjs +281 -0
  154. package/dist/esm/{chunk-Y3Y4DVCK.mjs.map → chunk-GUEJH55K.mjs.map} +1 -1
  155. package/dist/esm/chunk-HRUI6AWF.mjs +415 -0
  156. package/dist/esm/{chunk-TM6IKHMX.mjs.map → chunk-HRUI6AWF.mjs.map} +1 -1
  157. package/dist/esm/chunk-HTC3Q5JN.mjs +188 -0
  158. package/dist/esm/{chunk-XH3BEKII.mjs.map → chunk-HTC3Q5JN.mjs.map} +1 -1
  159. package/dist/esm/chunk-I25AX6PQ.mjs +7 -0
  160. package/dist/esm/{chunk-EY2JUXEC.mjs.map → chunk-I25AX6PQ.mjs.map} +1 -1
  161. package/dist/esm/chunk-IARAGRKO.mjs +130 -0
  162. package/dist/esm/{chunk-DMS7K76O.mjs.map → chunk-IARAGRKO.mjs.map} +1 -1
  163. package/dist/esm/chunk-IEM26R5Q.mjs +45 -0
  164. package/dist/esm/{chunk-VOCI2675.mjs.map → chunk-IEM26R5Q.mjs.map} +1 -1
  165. package/dist/esm/chunk-IKEPH7D2.mjs +89 -0
  166. package/dist/esm/{chunk-AC3BISWL.mjs.map → chunk-IKEPH7D2.mjs.map} +1 -1
  167. package/dist/esm/chunk-IORAMQ2Y.mjs +207 -0
  168. package/dist/esm/chunk-IORAMQ2Y.mjs.map +1 -0
  169. package/dist/esm/chunk-IY2ASLSP.mjs +19 -0
  170. package/dist/esm/{chunk-JF66JS2R.mjs.map → chunk-IY2ASLSP.mjs.map} +1 -1
  171. package/dist/esm/chunk-J32AERDF.mjs +208 -0
  172. package/dist/esm/{chunk-6LGXFXXR.mjs.map → chunk-J32AERDF.mjs.map} +1 -1
  173. package/dist/esm/chunk-JJ6MU2DV.mjs +97 -0
  174. package/dist/esm/{chunk-HL2O3T57.mjs.map → chunk-JJ6MU2DV.mjs.map} +1 -1
  175. package/dist/esm/chunk-JQIRRM7G.mjs +195 -0
  176. package/dist/esm/{chunk-ABXES4FS.mjs.map → chunk-JQIRRM7G.mjs.map} +1 -1
  177. package/dist/esm/chunk-KK7SBRDQ.mjs +322 -0
  178. package/dist/esm/{chunk-XXHZQFYW.mjs.map → chunk-KK7SBRDQ.mjs.map} +1 -1
  179. package/dist/esm/chunk-KLUO6XPE.mjs +33 -0
  180. package/dist/esm/{chunk-WCMW2L3P.mjs.map → chunk-KLUO6XPE.mjs.map} +1 -1
  181. package/dist/esm/chunk-KSK3XIGF.mjs +502 -0
  182. package/dist/esm/{chunk-IDTLNF4M.mjs.map → chunk-KSK3XIGF.mjs.map} +1 -1
  183. package/dist/esm/chunk-KW64NP2F.mjs +71 -0
  184. package/dist/esm/{chunk-4UK4MUSD.mjs.map → chunk-KW64NP2F.mjs.map} +1 -1
  185. package/dist/esm/chunk-KZFQOE4N.mjs +100 -0
  186. package/dist/esm/chunk-KZFQOE4N.mjs.map +1 -0
  187. package/dist/esm/chunk-LJRNGZMY.mjs +10 -0
  188. package/dist/esm/{chunk-IMTC3J2M.mjs.map → chunk-LJRNGZMY.mjs.map} +1 -1
  189. package/dist/esm/chunk-LK4HGGAJ.mjs +513 -0
  190. package/dist/esm/{chunk-S47HA7O7.mjs.map → chunk-LK4HGGAJ.mjs.map} +1 -1
  191. package/dist/esm/chunk-MC4OOX6X.mjs +475 -0
  192. package/dist/esm/chunk-MC4OOX6X.mjs.map +1 -0
  193. package/dist/esm/chunk-MD4TZ4HA.mjs +125 -0
  194. package/dist/esm/{chunk-CRFLR3ZY.mjs.map → chunk-MD4TZ4HA.mjs.map} +1 -1
  195. package/dist/esm/chunk-MFFBZ43D.mjs +45 -0
  196. package/dist/esm/{chunk-N6YTF76Q.mjs.map → chunk-MFFBZ43D.mjs.map} +1 -1
  197. package/dist/esm/chunk-MLGROHE6.mjs +192 -0
  198. package/dist/esm/chunk-MLGROHE6.mjs.map +1 -0
  199. package/dist/esm/chunk-MWXBQ6HR.mjs +15 -0
  200. package/dist/esm/{chunk-4YLUM62M.mjs.map → chunk-MWXBQ6HR.mjs.map} +1 -1
  201. package/dist/esm/chunk-MX2R6BBJ.mjs +150 -0
  202. package/dist/esm/{chunk-6PBMD2BQ.mjs.map → chunk-MX2R6BBJ.mjs.map} +1 -1
  203. package/dist/esm/chunk-MYEYZ7PF.mjs +46 -0
  204. package/dist/esm/{chunk-XKUIMGKU.mjs.map → chunk-MYEYZ7PF.mjs.map} +1 -1
  205. package/dist/esm/chunk-NFBLI3BS.mjs +286 -0
  206. package/dist/esm/chunk-NFBLI3BS.mjs.map +1 -0
  207. package/dist/esm/chunk-NUT2VOX2.mjs +317 -0
  208. package/dist/esm/{chunk-XTOIL6MB.mjs.map → chunk-NUT2VOX2.mjs.map} +1 -1
  209. package/dist/esm/chunk-OFUNBTK4.mjs +169 -0
  210. package/dist/esm/chunk-OFUNBTK4.mjs.map +1 -0
  211. package/dist/esm/chunk-OOQS6BEP.mjs +379 -0
  212. package/dist/esm/{chunk-HEAWDTLG.mjs.map → chunk-OOQS6BEP.mjs.map} +1 -1
  213. package/dist/esm/chunk-OVZOE4GS.mjs +121 -0
  214. package/dist/esm/chunk-OVZOE4GS.mjs.map +1 -0
  215. package/dist/esm/chunk-PGFEUN7K.mjs +129 -0
  216. package/dist/esm/{chunk-ZCEBDPBJ.mjs.map → chunk-PGFEUN7K.mjs.map} +1 -1
  217. package/dist/esm/chunk-PITSYZA7.mjs +66 -0
  218. package/dist/esm/{chunk-33CBJFX2.mjs.map → chunk-PITSYZA7.mjs.map} +1 -1
  219. package/dist/esm/chunk-PKUXOBIV.mjs +138 -0
  220. package/dist/esm/{chunk-FN4C3CKC.mjs.map → chunk-PKUXOBIV.mjs.map} +1 -1
  221. package/dist/esm/chunk-PP2U5UMC.mjs +689 -0
  222. package/dist/esm/{chunk-U2SJIG2T.mjs.map → chunk-PP2U5UMC.mjs.map} +1 -1
  223. package/dist/esm/chunk-PT2QHUB6.mjs +96 -0
  224. package/dist/esm/{chunk-A5L76YP7.mjs.map → chunk-PT2QHUB6.mjs.map} +1 -1
  225. package/dist/esm/chunk-PYLTV3KI.mjs +288 -0
  226. package/dist/esm/{chunk-OURSLL3I.mjs.map → chunk-PYLTV3KI.mjs.map} +1 -1
  227. package/dist/esm/chunk-QJ6CGH7N.mjs +71 -0
  228. package/dist/esm/{chunk-DWJ3PGWE.mjs.map → chunk-QJ6CGH7N.mjs.map} +1 -1
  229. package/dist/esm/chunk-QPT4BSAB.mjs +20 -0
  230. package/dist/esm/{chunk-IF4UU2MT.mjs.map → chunk-QPT4BSAB.mjs.map} +1 -1
  231. package/dist/esm/chunk-QSYWLSSN.mjs +216 -0
  232. package/dist/esm/{chunk-ORMOQWWH.mjs.map → chunk-QSYWLSSN.mjs.map} +1 -1
  233. package/dist/esm/chunk-R4JTQQBX.mjs +37 -0
  234. package/dist/esm/{chunk-EMURYYVO.mjs.map → chunk-R4JTQQBX.mjs.map} +1 -1
  235. package/dist/esm/chunk-RGHKUKOX.mjs +248 -0
  236. package/dist/esm/{chunk-UTXEW2FT.mjs.map → chunk-RGHKUKOX.mjs.map} +1 -1
  237. package/dist/esm/chunk-RQS33JAS.mjs +77 -0
  238. package/dist/esm/{chunk-42T3UGSW.mjs.map → chunk-RQS33JAS.mjs.map} +1 -1
  239. package/dist/esm/chunk-RTNVJKNX.mjs +128 -0
  240. package/dist/esm/{chunk-HFCWJ6QL.mjs.map → chunk-RTNVJKNX.mjs.map} +1 -1
  241. package/dist/esm/chunk-S5JIXUS6.mjs +90 -0
  242. package/dist/esm/{chunk-L6FONDPA.mjs.map → chunk-S5JIXUS6.mjs.map} +1 -1
  243. package/dist/esm/chunk-SAWN7RJP.mjs +15 -0
  244. package/dist/esm/chunk-SAWN7RJP.mjs.map +1 -0
  245. package/dist/esm/chunk-SBB4YEPT.mjs +17 -0
  246. package/dist/esm/{chunk-56CNRT2K.mjs.map → chunk-SBB4YEPT.mjs.map} +1 -1
  247. package/dist/esm/chunk-SFF4FJUD.mjs +1014 -0
  248. package/dist/esm/{chunk-QBFGY74I.mjs.map → chunk-SFF4FJUD.mjs.map} +1 -1
  249. package/dist/esm/chunk-SFLQPB72.mjs +63 -0
  250. package/dist/esm/{chunk-4RXKALLC.mjs.map → chunk-SFLQPB72.mjs.map} +1 -1
  251. package/dist/esm/chunk-SQNS4SFV.mjs +232 -0
  252. package/dist/esm/chunk-SQNS4SFV.mjs.map +1 -0
  253. package/dist/esm/chunk-SW4ASQPY.mjs +407 -0
  254. package/dist/esm/{chunk-4T75XRI2.mjs.map → chunk-SW4ASQPY.mjs.map} +1 -1
  255. package/dist/esm/chunk-TFDBSPIQ.mjs +276 -0
  256. package/dist/esm/{chunk-H4GZWYIG.mjs.map → chunk-TFDBSPIQ.mjs.map} +1 -1
  257. package/dist/esm/chunk-THWEBWUC.mjs +20 -0
  258. package/dist/esm/{chunk-DPW6ELCQ.mjs.map → chunk-THWEBWUC.mjs.map} +1 -1
  259. package/dist/esm/chunk-TQLOZKH4.mjs +168 -0
  260. package/dist/esm/{chunk-X6IHNXWY.mjs.map → chunk-TQLOZKH4.mjs.map} +1 -1
  261. package/dist/esm/chunk-TZZZNGQI.mjs +53 -0
  262. package/dist/esm/{chunk-DLLDRANJ.mjs.map → chunk-TZZZNGQI.mjs.map} +1 -1
  263. package/dist/esm/chunk-U7K7AJMC.mjs +70 -0
  264. package/dist/esm/{chunk-BBUN4IO4.mjs.map → chunk-U7K7AJMC.mjs.map} +1 -1
  265. package/dist/esm/chunk-UGKZQUGE.mjs +367 -0
  266. package/dist/esm/{chunk-J7HRQ2IH.mjs.map → chunk-UGKZQUGE.mjs.map} +1 -1
  267. package/dist/esm/chunk-UKYATVYK.mjs +58 -0
  268. package/dist/esm/{chunk-5BSMF22B.mjs.map → chunk-UKYATVYK.mjs.map} +1 -1
  269. package/dist/esm/chunk-V66UC6YI.mjs +74 -0
  270. package/dist/esm/{chunk-Q7RG7KQS.mjs.map → chunk-V66UC6YI.mjs.map} +1 -1
  271. package/dist/esm/chunk-VJ2Z7GO3.mjs +162 -0
  272. package/dist/esm/{chunk-BYHCW7MI.mjs.map → chunk-VJ2Z7GO3.mjs.map} +1 -1
  273. package/dist/esm/chunk-WPJUSJJQ.mjs +147 -0
  274. package/dist/esm/{chunk-XDIX7NIP.mjs.map → chunk-WPJUSJJQ.mjs.map} +1 -1
  275. package/dist/esm/chunk-WSI6NVQD.mjs +219 -0
  276. package/dist/esm/{chunk-HLJE5XGE.mjs.map → chunk-WSI6NVQD.mjs.map} +1 -1
  277. package/dist/esm/chunk-XB4SVKZP.mjs +43 -0
  278. package/dist/esm/{chunk-3HFZN7L5.mjs.map → chunk-XB4SVKZP.mjs.map} +1 -1
  279. package/dist/esm/chunk-XHQMSKZP.mjs +167 -0
  280. package/dist/esm/{chunk-CXNF73OX.mjs.map → chunk-XHQMSKZP.mjs.map} +1 -1
  281. package/dist/esm/chunk-XQFUKBY7.mjs +136 -0
  282. package/dist/esm/chunk-XQFUKBY7.mjs.map +1 -0
  283. package/dist/esm/chunk-XX6C2QGI.mjs +160 -0
  284. package/dist/esm/{chunk-P7SE5LQE.mjs.map → chunk-XX6C2QGI.mjs.map} +1 -1
  285. package/dist/esm/chunk-Y25NJOOO.mjs +420 -0
  286. package/dist/esm/{chunk-WXDA4CCR.mjs.map → chunk-Y25NJOOO.mjs.map} +1 -1
  287. package/dist/esm/chunk-Y3ENAKRC.mjs +73 -0
  288. package/dist/esm/{chunk-MT2RJ7H3.mjs.map → chunk-Y3ENAKRC.mjs.map} +1 -1
  289. package/dist/esm/chunk-YD3KHXBD.mjs +91 -0
  290. package/dist/esm/{chunk-DNWFDS7F.mjs.map → chunk-YD3KHXBD.mjs.map} +1 -1
  291. package/dist/esm/chunk-YGFWUFZY.mjs +741 -0
  292. package/dist/esm/chunk-YGFWUFZY.mjs.map +1 -0
  293. package/dist/esm/chunk-YMHFUSKX.mjs +86 -0
  294. package/dist/esm/{chunk-L2AQG3G3.mjs.map → chunk-YMHFUSKX.mjs.map} +1 -1
  295. package/dist/esm/chunk-YU65LNIC.mjs +72 -0
  296. package/dist/esm/{chunk-ROT6S6BM.mjs.map → chunk-YU65LNIC.mjs.map} +1 -1
  297. package/dist/esm/chunk-ZAPXD4FC.mjs +63 -0
  298. package/dist/esm/{chunk-HT2WC3QV.mjs.map → chunk-ZAPXD4FC.mjs.map} +1 -1
  299. package/dist/esm/chunk-ZATMRCFV.mjs +86 -0
  300. package/dist/esm/{chunk-7CYCKCVU.mjs.map → chunk-ZATMRCFV.mjs.map} +1 -1
  301. package/dist/esm/chunk-ZWCTF3NQ.mjs +25 -0
  302. package/dist/esm/{chunk-W4BSN6SK.mjs.map → chunk-ZWCTF3NQ.mjs.map} +1 -1
  303. package/dist/esm/chunk-ZZWD23YW.mjs +700 -0
  304. package/dist/esm/{chunk-G6RLN6ET.mjs.map → chunk-ZZWD23YW.mjs.map} +1 -1
  305. package/dist/esm/cli/index.mjs +20 -1
  306. package/dist/esm/cli/localNode.mjs +16 -1
  307. package/dist/esm/cli/move.mjs +7 -1
  308. package/dist/esm/client/core.d.mts +36 -1
  309. package/dist/esm/client/core.mjs +34 -1
  310. package/dist/esm/client/get.d.mts +35 -1
  311. package/dist/esm/client/get.mjs +41 -1
  312. package/dist/esm/client/index.d.mts +3 -3
  313. package/dist/esm/client/index.mjs +69 -1
  314. package/dist/esm/client/post.d.mts +34 -1
  315. package/dist/esm/client/post.mjs +43 -1
  316. package/dist/esm/core/account/index.mjs +21 -1
  317. package/dist/esm/core/account/utils/address.mjs +19 -1
  318. package/dist/esm/core/account/utils/index.mjs +20 -1
  319. package/dist/esm/core/accountAddress.mjs +16 -1
  320. package/dist/esm/core/authenticationKey.mjs +15 -1
  321. package/dist/esm/core/common.mjs +7 -1
  322. package/dist/esm/core/crypto/abstraction.mjs +26 -1
  323. package/dist/esm/core/crypto/ed25519.mjs +33 -1
  324. package/dist/esm/core/crypto/ephemeral.mjs +30 -1
  325. package/dist/esm/core/crypto/federatedKeyless.mjs +44 -1
  326. package/dist/esm/core/crypto/hdKey.mjs +25 -1
  327. package/dist/esm/core/crypto/index.d.mts +1 -1
  328. package/dist/esm/core/crypto/index.mjs +173 -1
  329. package/dist/esm/core/crypto/keyless.mjs +83 -1
  330. package/dist/esm/core/crypto/multiEd25519.d.mts +17 -2
  331. package/dist/esm/core/crypto/multiEd25519.mjs +50 -1
  332. package/dist/esm/core/crypto/multiKey.d.mts +33 -15
  333. package/dist/esm/core/crypto/multiKey.mjs +51 -1
  334. package/dist/esm/core/crypto/poseidon.mjs +15 -1
  335. package/dist/esm/core/crypto/privateKey.mjs +12 -1
  336. package/dist/esm/core/crypto/proof.mjs +20 -1
  337. package/dist/esm/core/crypto/publicKey.mjs +22 -1
  338. package/dist/esm/core/crypto/secp256k1.mjs +29 -1
  339. package/dist/esm/core/crypto/signature.mjs +20 -1
  340. package/dist/esm/core/crypto/singleKey.mjs +48 -1
  341. package/dist/esm/core/crypto/utils.mjs +9 -1
  342. package/dist/esm/core/hex.mjs +12 -1
  343. package/dist/esm/core/index.d.mts +1 -1
  344. package/dist/esm/core/index.mjs +202 -1
  345. package/dist/esm/errors/index.mjs +25 -1
  346. package/dist/esm/index.d.mts +9 -7
  347. package/dist/esm/index.mjs +795 -1
  348. package/dist/esm/internal/abstraction.mjs +103 -1
  349. package/dist/esm/internal/account.d.mts +22 -5
  350. package/dist/esm/internal/account.mjs +128 -1
  351. package/dist/esm/internal/ans.mjs +138 -1
  352. package/dist/esm/internal/coin.mjs +98 -1
  353. package/dist/esm/internal/digitalAsset.mjs +145 -1
  354. package/dist/esm/internal/event.mjs +62 -1
  355. package/dist/esm/internal/experimental.d.mts +52 -0
  356. package/dist/esm/internal/experimental.mjs +99 -0
  357. package/dist/esm/internal/experimental.mjs.map +1 -0
  358. package/dist/esm/internal/faucet.mjs +57 -1
  359. package/dist/esm/internal/fungibleAsset.mjs +105 -1
  360. package/dist/esm/internal/general.mjs +43 -1
  361. package/dist/esm/internal/keyless.d.mts +12 -1
  362. package/dist/esm/internal/keyless.mjs +105 -1
  363. package/dist/esm/internal/object.mjs +58 -1
  364. package/dist/esm/internal/staking.mjs +60 -1
  365. package/dist/esm/internal/table.mjs +38 -1
  366. package/dist/esm/internal/transaction.mjs +57 -1
  367. package/dist/esm/internal/transactionSubmission.d.mts +20 -9
  368. package/dist/esm/internal/transactionSubmission.mjs +124 -1
  369. package/dist/esm/internal/view.mjs +100 -1
  370. package/dist/esm/transactions/authenticator/account.mjs +67 -1
  371. package/dist/esm/transactions/authenticator/index.mjs +82 -1
  372. package/dist/esm/transactions/authenticator/transaction.mjs +66 -1
  373. package/dist/esm/transactions/index.mjs +310 -1
  374. package/dist/esm/transactions/instances/chainId.mjs +11 -1
  375. package/dist/esm/transactions/instances/identifier.mjs +11 -1
  376. package/dist/esm/transactions/instances/index.mjs +114 -1
  377. package/dist/esm/transactions/instances/moduleId.mjs +55 -1
  378. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +60 -1
  379. package/dist/esm/transactions/instances/rawTransaction.mjs +65 -1
  380. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +21 -1
  381. package/dist/esm/transactions/instances/signedTransaction.mjs +63 -1
  382. package/dist/esm/transactions/instances/simpleTransaction.mjs +60 -1
  383. package/dist/esm/transactions/instances/transactionArgument.mjs +1 -1
  384. package/dist/esm/transactions/instances/transactionPayload.mjs +73 -1
  385. package/dist/esm/transactions/management/accountSequenceNumber.mjs +89 -1
  386. package/dist/esm/transactions/management/asyncQueue.mjs +9 -1
  387. package/dist/esm/transactions/management/index.mjs +109 -1
  388. package/dist/esm/transactions/management/transactionWorker.mjs +105 -1
  389. package/dist/esm/transactions/scriptComposer/index.mjs +94 -1
  390. package/dist/esm/transactions/transactionBuilder/helpers.mjs +92 -1
  391. package/dist/esm/transactions/transactionBuilder/index.mjs +180 -1
  392. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +105 -1
  393. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +75 -1
  394. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +2 -2
  395. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +112 -1
  396. package/dist/esm/transactions/typeTag/index.mjs +91 -1
  397. package/dist/esm/transactions/typeTag/parser.mjs +60 -1
  398. package/dist/esm/transactions/types.mjs +1 -1
  399. package/dist/esm/types/abstraction.mjs +7 -1
  400. package/dist/esm/types/generated/operations.d.mts +63 -10
  401. package/dist/esm/types/generated/queries.d.mts +10 -2
  402. package/dist/esm/types/generated/queries.mjs +69 -1
  403. package/dist/esm/types/generated/types.d.mts +821 -1051
  404. package/dist/esm/types/generated/types.mjs +774 -1
  405. package/dist/esm/types/generated/types.mjs.map +1 -1
  406. package/dist/esm/types/index.d.mts +2 -2
  407. package/dist/esm/types/index.mjs +82 -1
  408. package/dist/esm/types/indexer.d.mts +14 -2
  409. package/dist/esm/types/indexer.mjs +1 -1
  410. package/dist/esm/types/types.d.mts +77 -3
  411. package/dist/esm/types/types.mjs +77 -1
  412. package/dist/esm/utils/apiEndpoints.mjs +21 -1
  413. package/dist/esm/utils/const.d.mts +1 -1
  414. package/dist/esm/utils/const.mjs +25 -1
  415. package/dist/esm/utils/helpers.d.mts +20 -1
  416. package/dist/esm/utils/helpers.mjs +37 -1
  417. package/dist/esm/utils/index.d.mts +1 -1
  418. package/dist/esm/utils/index.mjs +88 -1
  419. package/dist/esm/utils/memoize.mjs +9 -1
  420. package/dist/esm/utils/normalizeBundle.mjs +20 -1
  421. package/dist/esm/version.d.mts +1 -1
  422. package/dist/esm/version.mjs +7 -1
  423. package/package.json +2 -7
  424. package/src/account/MultiEd25519Account.ts +154 -0
  425. package/src/account/MultiKeyAccount.ts +1 -2
  426. package/src/account/index.ts +1 -0
  427. package/src/api/account.ts +57 -3
  428. package/src/api/aptos.ts +6 -0
  429. package/src/api/aptosConfig.ts +2 -2
  430. package/src/api/experimental.ts +64 -0
  431. package/src/api/transaction.ts +22 -2
  432. package/src/client/core.ts +120 -0
  433. package/src/client/get.ts +73 -1
  434. package/src/client/post.ts +70 -1
  435. package/src/core/crypto/multiEd25519.ts +19 -3
  436. package/src/core/crypto/multiKey.ts +76 -52
  437. package/src/core/hex.ts +3 -1
  438. package/src/internal/account.ts +396 -2
  439. package/src/internal/experimental.ts +55 -0
  440. package/src/internal/keyless.ts +17 -9
  441. package/src/internal/move/jwks/build/jwk/BuildInfo.yaml +56 -0
  442. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/account.mv +0 -0
  443. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aggregator.mv +0 -0
  444. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aggregator_factory.mv +0 -0
  445. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aggregator_v2.mv +0 -0
  446. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aptos_account.mv +0 -0
  447. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aptos_coin.mv +0 -0
  448. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/aptos_governance.mv +0 -0
  449. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/block.mv +0 -0
  450. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/chain_id.mv +0 -0
  451. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/chain_status.mv +0 -0
  452. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/code.mv +0 -0
  453. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/coin.mv +0 -0
  454. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/config_buffer.mv +0 -0
  455. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/consensus_config.mv +0 -0
  456. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/create_signer.mv +0 -0
  457. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/delegation_pool.mv +0 -0
  458. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/dispatchable_fungible_asset.mv +0 -0
  459. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/dkg.mv +0 -0
  460. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/event.mv +0 -0
  461. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/execution_config.mv +0 -0
  462. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/function_info.mv +0 -0
  463. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/fungible_asset.mv +0 -0
  464. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/gas_schedule.mv +0 -0
  465. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/genesis.mv +0 -0
  466. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/governance_proposal.mv +0 -0
  467. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/guid.mv +0 -0
  468. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/jwk_consensus_config.mv +0 -0
  469. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/jwks.mv +0 -0
  470. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/keyless_account.mv +0 -0
  471. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/managed_coin.mv +0 -0
  472. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/multisig_account.mv +0 -0
  473. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/object.mv +0 -0
  474. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/object_code_deployment.mv +0 -0
  475. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/optional_aggregator.mv +0 -0
  476. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/primary_fungible_store.mv +0 -0
  477. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness.mv +0 -0
  478. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness_api_v0_config.mv +0 -0
  479. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness_config.mv +0 -0
  480. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/randomness_config_seqnum.mv +0 -0
  481. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/reconfiguration.mv +0 -0
  482. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/reconfiguration_state.mv +0 -0
  483. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/reconfiguration_with_dkg.mv +0 -0
  484. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/resource_account.mv +0 -0
  485. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/stake.mv +0 -0
  486. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/staking_config.mv +0 -0
  487. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/staking_contract.mv +0 -0
  488. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/staking_proxy.mv +0 -0
  489. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/state_storage.mv +0 -0
  490. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/storage_gas.mv +0 -0
  491. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/system_addresses.mv +0 -0
  492. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/timestamp.mv +0 -0
  493. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/transaction_context.mv +0 -0
  494. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/transaction_fee.mv +0 -0
  495. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/transaction_validation.mv +0 -0
  496. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/util.mv +0 -0
  497. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/validator_consensus_info.mv +0 -0
  498. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/version.mv +0 -0
  499. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/vesting.mv +0 -0
  500. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosFramework/voting.mv +0 -0
  501. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/any.mv +0 -0
  502. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/aptos_hash.mv +0 -0
  503. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/big_vector.mv +0 -0
  504. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/bls12381.mv +0 -0
  505. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/bls12381_algebra.mv +0 -0
  506. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/bn254_algebra.mv +0 -0
  507. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/capability.mv +0 -0
  508. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/comparator.mv +0 -0
  509. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/copyable_any.mv +0 -0
  510. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/crypto_algebra.mv +0 -0
  511. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/debug.mv +0 -0
  512. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ed25519.mv +0 -0
  513. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/fixed_point64.mv +0 -0
  514. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/from_bcs.mv +0 -0
  515. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math128.mv +0 -0
  516. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math64.mv +0 -0
  517. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math_fixed.mv +0 -0
  518. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/math_fixed64.mv +0 -0
  519. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/multi_ed25519.mv +0 -0
  520. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/pool_u64.mv +0 -0
  521. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/pool_u64_unbound.mv +0 -0
  522. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255.mv +0 -0
  523. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255_bulletproofs.mv +0 -0
  524. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255_elgamal.mv +0 -0
  525. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/ristretto255_pedersen.mv +0 -0
  526. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/secp256k1.mv +0 -0
  527. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/simple_map.mv +0 -0
  528. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/smart_table.mv +0 -0
  529. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/smart_vector.mv +0 -0
  530. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/string_utils.mv +0 -0
  531. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/table.mv +0 -0
  532. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/table_with_length.mv +0 -0
  533. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/AptosStdlib/type_info.mv +0 -0
  534. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/acl.mv +0 -0
  535. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/bcs.mv +0 -0
  536. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/bit_vector.mv +0 -0
  537. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/error.mv +0 -0
  538. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/features.mv +0 -0
  539. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/fixed_point32.mv +0 -0
  540. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/hash.mv +0 -0
  541. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/option.mv +0 -0
  542. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/signer.mv +0 -0
  543. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/string.mv +0 -0
  544. package/src/internal/move/jwks/build/jwk/bytecode_modules/dependencies/MoveStdlib/vector.mv +0 -0
  545. package/src/internal/move/jwks/build/jwk/bytecode_scripts/main.mv +0 -0
  546. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/account.mvsm +0 -0
  547. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aggregator.mvsm +0 -0
  548. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aggregator_factory.mvsm +0 -0
  549. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aggregator_v2.mvsm +0 -0
  550. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aptos_account.mvsm +0 -0
  551. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aptos_coin.mvsm +0 -0
  552. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/aptos_governance.mvsm +0 -0
  553. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/block.mvsm +0 -0
  554. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/chain_id.mvsm +0 -0
  555. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/chain_status.mvsm +0 -0
  556. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/code.mvsm +0 -0
  557. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/coin.mvsm +0 -0
  558. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/config_buffer.mvsm +0 -0
  559. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/consensus_config.mvsm +0 -0
  560. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/create_signer.mvsm +0 -0
  561. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/delegation_pool.mvsm +0 -0
  562. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/dispatchable_fungible_asset.mvsm +0 -0
  563. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/dkg.mvsm +0 -0
  564. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/event.mvsm +0 -0
  565. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/execution_config.mvsm +0 -0
  566. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/function_info.mvsm +0 -0
  567. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/fungible_asset.mvsm +0 -0
  568. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/gas_schedule.mvsm +0 -0
  569. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/genesis.mvsm +0 -0
  570. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/governance_proposal.mvsm +0 -0
  571. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/guid.mvsm +0 -0
  572. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/jwk_consensus_config.mvsm +0 -0
  573. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/jwks.mvsm +0 -0
  574. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/keyless_account.mvsm +0 -0
  575. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/managed_coin.mvsm +0 -0
  576. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/multisig_account.mvsm +0 -0
  577. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/object.mvsm +0 -0
  578. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/object_code_deployment.mvsm +0 -0
  579. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/optional_aggregator.mvsm +0 -0
  580. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/primary_fungible_store.mvsm +0 -0
  581. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness.mvsm +0 -0
  582. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness_api_v0_config.mvsm +0 -0
  583. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness_config.mvsm +0 -0
  584. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/randomness_config_seqnum.mvsm +0 -0
  585. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/reconfiguration.mvsm +0 -0
  586. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/reconfiguration_state.mvsm +0 -0
  587. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/reconfiguration_with_dkg.mvsm +0 -0
  588. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/resource_account.mvsm +0 -0
  589. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/stake.mvsm +0 -0
  590. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/staking_config.mvsm +0 -0
  591. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/staking_contract.mvsm +0 -0
  592. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/staking_proxy.mvsm +0 -0
  593. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/state_storage.mvsm +0 -0
  594. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/storage_gas.mvsm +0 -0
  595. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/system_addresses.mvsm +0 -0
  596. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/timestamp.mvsm +0 -0
  597. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/transaction_context.mvsm +0 -0
  598. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/transaction_fee.mvsm +0 -0
  599. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/transaction_validation.mvsm +0 -0
  600. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/util.mvsm +0 -0
  601. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/validator_consensus_info.mvsm +0 -0
  602. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/version.mvsm +0 -0
  603. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/vesting.mvsm +0 -0
  604. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosFramework/voting.mvsm +0 -0
  605. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/any.mvsm +0 -0
  606. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/aptos_hash.mvsm +0 -0
  607. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/big_vector.mvsm +0 -0
  608. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/bls12381.mvsm +0 -0
  609. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/bls12381_algebra.mvsm +0 -0
  610. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/bn254_algebra.mvsm +0 -0
  611. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/capability.mvsm +0 -0
  612. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/comparator.mvsm +0 -0
  613. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/copyable_any.mvsm +0 -0
  614. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/crypto_algebra.mvsm +0 -0
  615. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/debug.mvsm +0 -0
  616. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ed25519.mvsm +0 -0
  617. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/fixed_point64.mvsm +0 -0
  618. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/from_bcs.mvsm +0 -0
  619. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math128.mvsm +0 -0
  620. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math64.mvsm +0 -0
  621. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math_fixed.mvsm +0 -0
  622. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/math_fixed64.mvsm +0 -0
  623. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/multi_ed25519.mvsm +0 -0
  624. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/pool_u64.mvsm +0 -0
  625. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/pool_u64_unbound.mvsm +0 -0
  626. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255.mvsm +0 -0
  627. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255_bulletproofs.mvsm +0 -0
  628. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255_elgamal.mvsm +0 -0
  629. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/ristretto255_pedersen.mvsm +0 -0
  630. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/secp256k1.mvsm +0 -0
  631. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/simple_map.mvsm +0 -0
  632. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/smart_table.mvsm +0 -0
  633. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/smart_vector.mvsm +0 -0
  634. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/string_utils.mvsm +0 -0
  635. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/table.mvsm +0 -0
  636. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/table_with_length.mvsm +0 -0
  637. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/AptosStdlib/type_info.mvsm +0 -0
  638. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/acl.mvsm +0 -0
  639. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/bcs.mvsm +0 -0
  640. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/bit_vector.mvsm +0 -0
  641. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/error.mvsm +0 -0
  642. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/features.mvsm +0 -0
  643. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/fixed_point32.mvsm +0 -0
  644. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/hash.mvsm +0 -0
  645. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/option.mvsm +0 -0
  646. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/signer.mvsm +0 -0
  647. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/string.mvsm +0 -0
  648. package/src/internal/move/jwks/build/jwk/source_maps/dependencies/MoveStdlib/vector.mvsm +0 -0
  649. package/src/internal/move/jwks/build/jwk/source_maps/main.mvsm +0 -0
  650. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/account.move +1533 -0
  651. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aggregator.move +48 -0
  652. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aggregator_factory.move +66 -0
  653. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aggregator_v2.move +280 -0
  654. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aptos_account.move +443 -0
  655. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aptos_coin.move +204 -0
  656. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/aptos_governance.move +1387 -0
  657. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/block.move +394 -0
  658. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/chain_id.move +41 -0
  659. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/chain_status.move +48 -0
  660. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/code.move +367 -0
  661. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/coin.move +2214 -0
  662. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/config_buffer.move +101 -0
  663. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/consensus_config.move +77 -0
  664. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/create_signer.move +21 -0
  665. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/delegation_pool.move +5568 -0
  666. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/dispatchable_fungible_asset.move +228 -0
  667. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/dkg.move +121 -0
  668. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/event.move +92 -0
  669. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/execution_config.move +66 -0
  670. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/function_info.move +100 -0
  671. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/fungible_asset.move +1566 -0
  672. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/gas_schedule.move +176 -0
  673. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/genesis.move +550 -0
  674. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/governance_proposal.move +23 -0
  675. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/guid.move +68 -0
  676. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/jwk_consensus_config.move +148 -0
  677. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/jwks.move +817 -0
  678. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/keyless_account.move +312 -0
  679. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/managed_coin.move +205 -0
  680. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/multisig_account.move +2477 -0
  681. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/object.move +1073 -0
  682. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/object_code_deployment.move +147 -0
  683. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/optional_aggregator.move +295 -0
  684. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/primary_fungible_store.move +405 -0
  685. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness.move +574 -0
  686. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness_api_v0_config.move +57 -0
  687. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness_config.move +153 -0
  688. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/randomness_config_seqnum.move +49 -0
  689. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/reconfiguration.move +237 -0
  690. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/reconfiguration_state.move +132 -0
  691. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/reconfiguration_with_dkg.move +69 -0
  692. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/resource_account.move +267 -0
  693. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/stake.move +3286 -0
  694. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/staking_config.move +686 -0
  695. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/staking_contract.move +1618 -0
  696. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/staking_proxy.move +228 -0
  697. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/state_storage.move +90 -0
  698. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/storage_gas.move +622 -0
  699. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/system_addresses.move +82 -0
  700. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/timestamp.move +88 -0
  701. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/transaction_context.move +262 -0
  702. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/transaction_fee.move +457 -0
  703. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/transaction_validation.move +501 -0
  704. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/util.move +16 -0
  705. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/validator_consensus_info.move +42 -0
  706. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/version.move +115 -0
  707. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/vesting.move +2183 -0
  708. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosFramework/voting.move +1279 -0
  709. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/any.move +57 -0
  710. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/aptos_hash.move +253 -0
  711. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/big_vector.move +469 -0
  712. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/bls12381.move +985 -0
  713. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/bls12381_algebra.move +802 -0
  714. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/bn254_algebra.move +855 -0
  715. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/capability.move +193 -0
  716. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/comparator.move +173 -0
  717. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/copyable_any.move +45 -0
  718. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/crypto_algebra.move +351 -0
  719. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/debug.move +278 -0
  720. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ed25519.move +262 -0
  721. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/fixed_point64.move +447 -0
  722. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/from_bcs.move +91 -0
  723. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math128.move +381 -0
  724. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math64.move +336 -0
  725. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math_fixed.move +139 -0
  726. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/math_fixed64.move +142 -0
  727. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/multi_ed25519.move +482 -0
  728. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/pool_u64.move +571 -0
  729. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/pool_u64_unbound.move +270 -0
  730. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255.move +1310 -0
  731. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255_bulletproofs.move +253 -0
  732. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255_elgamal.move +234 -0
  733. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/ristretto255_pedersen.move +158 -0
  734. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/secp256k1.move +114 -0
  735. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/simple_map.move +319 -0
  736. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/smart_table.move +769 -0
  737. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/smart_vector.move +766 -0
  738. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/string_utils.move +148 -0
  739. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/table.move +152 -0
  740. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/table_with_length.move +141 -0
  741. package/src/internal/move/jwks/build/jwk/sources/dependencies/AptosStdlib/type_info.move +351 -0
  742. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/acl.move +46 -0
  743. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/bcs.move +27 -0
  744. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/bit_vector.move +239 -0
  745. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/error.move +88 -0
  746. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/features.move +780 -0
  747. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/fixed_point32.move +295 -0
  748. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/hash.move +8 -0
  749. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/option.move +356 -0
  750. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/signer.move +21 -0
  751. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/string.move +93 -0
  752. package/src/internal/move/jwks/build/jwk/sources/dependencies/MoveStdlib/vector.move +669 -0
  753. package/src/internal/move/jwks/build/jwk/sources/main.move +20 -0
  754. package/src/internal/queries/getAccountAddressForAuthKey.graphql +8 -0
  755. package/src/internal/queries/getAuthKeysForPublicKey.graphql +9 -0
  756. package/src/internal/queries/getMultiKeyForAuthKey.graphql +9 -0
  757. package/src/internal/queries/getSignatures.graphql +13 -0
  758. package/src/internal/transactionSubmission.ts +125 -4
  759. package/src/internal/view.ts +4 -4
  760. package/src/transactions/transactionBuilder/transactionBuilder.ts +7 -0
  761. package/src/types/codegen.yaml +1 -1
  762. package/src/types/generated/operations.ts +69 -8
  763. package/src/types/generated/queries.ts +111 -0
  764. package/src/types/generated/types.ts +925 -1133
  765. package/src/types/indexer.ts +16 -0
  766. package/src/types/types.ts +82 -3
  767. package/src/utils/const.ts +1 -1
  768. package/src/utils/helpers.ts +22 -0
  769. package/src/version.ts +1 -1
  770. package/dist/common/chunk-ZYPBABLQ.js +0 -4
  771. package/dist/common/chunk-ZYPBABLQ.js.map +0 -1
  772. package/dist/esm/chunk-2FNFUTFJ.mjs +0 -2
  773. package/dist/esm/chunk-2FNFUTFJ.mjs.map +0 -1
  774. package/dist/esm/chunk-2GIPNLDO.mjs +0 -2
  775. package/dist/esm/chunk-33CBJFX2.mjs +0 -2
  776. package/dist/esm/chunk-35DKMW7Q.mjs +0 -2
  777. package/dist/esm/chunk-3EY7MT2M.mjs +0 -2
  778. package/dist/esm/chunk-3EY7MT2M.mjs.map +0 -1
  779. package/dist/esm/chunk-3HFZN7L5.mjs +0 -2
  780. package/dist/esm/chunk-3OLFJ65O.mjs +0 -2
  781. package/dist/esm/chunk-42T3UGSW.mjs +0 -2
  782. package/dist/esm/chunk-4776UXL6.mjs +0 -2
  783. package/dist/esm/chunk-4RXKALLC.mjs +0 -2
  784. package/dist/esm/chunk-4T75XRI2.mjs +0 -2
  785. package/dist/esm/chunk-4UK4MUSD.mjs +0 -2
  786. package/dist/esm/chunk-4YLUM62M.mjs +0 -2
  787. package/dist/esm/chunk-56CNRT2K.mjs +0 -2
  788. package/dist/esm/chunk-5BSMF22B.mjs +0 -2
  789. package/dist/esm/chunk-66HHRRIX.mjs +0 -2
  790. package/dist/esm/chunk-66HHRRIX.mjs.map +0 -1
  791. package/dist/esm/chunk-6JTNS5O6.mjs +0 -2
  792. package/dist/esm/chunk-6JTNS5O6.mjs.map +0 -1
  793. package/dist/esm/chunk-6LGXFXXR.mjs +0 -2
  794. package/dist/esm/chunk-6PBMD2BQ.mjs +0 -2
  795. package/dist/esm/chunk-7C2RDOWS.mjs +0 -1
  796. package/dist/esm/chunk-7CYCKCVU.mjs +0 -2
  797. package/dist/esm/chunk-7DPHPPMG.mjs +0 -2
  798. package/dist/esm/chunk-7DPHPPMG.mjs.map +0 -1
  799. package/dist/esm/chunk-A5L76YP7.mjs +0 -2
  800. package/dist/esm/chunk-ABXES4FS.mjs +0 -2
  801. package/dist/esm/chunk-AC3BISWL.mjs +0 -2
  802. package/dist/esm/chunk-AZWVCBK2.mjs +0 -2
  803. package/dist/esm/chunk-BBUN4IO4.mjs +0 -2
  804. package/dist/esm/chunk-BI3BTSUB.mjs +0 -2
  805. package/dist/esm/chunk-BUTMGMSD.mjs +0 -7
  806. package/dist/esm/chunk-BYHCW7MI.mjs +0 -2
  807. package/dist/esm/chunk-C3Q23D22.mjs +0 -2
  808. package/dist/esm/chunk-CRFLR3ZY.mjs +0 -2
  809. package/dist/esm/chunk-CSG67JHZ.mjs +0 -2
  810. package/dist/esm/chunk-CXNF73OX.mjs +0 -2
  811. package/dist/esm/chunk-D6T3NYOA.mjs +0 -2
  812. package/dist/esm/chunk-DBIZE7G6.mjs +0 -2
  813. package/dist/esm/chunk-DLLDRANJ.mjs +0 -2
  814. package/dist/esm/chunk-DMS7K76O.mjs +0 -2
  815. package/dist/esm/chunk-DNJQWGB7.mjs +0 -2
  816. package/dist/esm/chunk-DNWFDS7F.mjs +0 -2
  817. package/dist/esm/chunk-DPW6ELCQ.mjs +0 -2
  818. package/dist/esm/chunk-DWJ3PGWE.mjs +0 -2
  819. package/dist/esm/chunk-EBMEXURY.mjs +0 -2
  820. package/dist/esm/chunk-EGZI6EJ2.mjs +0 -2
  821. package/dist/esm/chunk-EMURYYVO.mjs +0 -2
  822. package/dist/esm/chunk-EY2JUXEC.mjs +0 -2
  823. package/dist/esm/chunk-F2ZTBAJJ.mjs +0 -2
  824. package/dist/esm/chunk-F2ZTBAJJ.mjs.map +0 -1
  825. package/dist/esm/chunk-FN4C3CKC.mjs +0 -2
  826. package/dist/esm/chunk-G4O6FXCF.mjs +0 -2
  827. package/dist/esm/chunk-G6RLN6ET.mjs +0 -2
  828. package/dist/esm/chunk-GOXRBEIJ.mjs +0 -2
  829. package/dist/esm/chunk-GQX5KMF7.mjs +0 -2
  830. package/dist/esm/chunk-H4GZWYIG.mjs +0 -2
  831. package/dist/esm/chunk-HEAWDTLG.mjs +0 -2
  832. package/dist/esm/chunk-HFCWJ6QL.mjs +0 -2
  833. package/dist/esm/chunk-HL2O3T57.mjs +0 -2
  834. package/dist/esm/chunk-HLJE5XGE.mjs +0 -2
  835. package/dist/esm/chunk-HT2WC3QV.mjs +0 -2
  836. package/dist/esm/chunk-I7YHK6ZF.mjs +0 -2
  837. package/dist/esm/chunk-I7YHK6ZF.mjs.map +0 -1
  838. package/dist/esm/chunk-IDTLNF4M.mjs +0 -2
  839. package/dist/esm/chunk-IF4UU2MT.mjs +0 -2
  840. package/dist/esm/chunk-IMTC3J2M.mjs +0 -2
  841. package/dist/esm/chunk-J7HRQ2IH.mjs +0 -2
  842. package/dist/esm/chunk-JF66JS2R.mjs +0 -2
  843. package/dist/esm/chunk-KDMSOCZY.mjs +0 -2
  844. package/dist/esm/chunk-KEJAUCQF.mjs +0 -2
  845. package/dist/esm/chunk-L2AQG3G3.mjs +0 -2
  846. package/dist/esm/chunk-L6FONDPA.mjs +0 -2
  847. package/dist/esm/chunk-MT2RJ7H3.mjs +0 -2
  848. package/dist/esm/chunk-N4DM5FYH.mjs +0 -2
  849. package/dist/esm/chunk-N6YTF76Q.mjs +0 -2
  850. package/dist/esm/chunk-N7C6LQPZ.mjs +0 -2
  851. package/dist/esm/chunk-N7C6LQPZ.mjs.map +0 -1
  852. package/dist/esm/chunk-O37BZP2G.mjs +0 -2
  853. package/dist/esm/chunk-ORMOQWWH.mjs +0 -2
  854. package/dist/esm/chunk-OURSLL3I.mjs +0 -2
  855. package/dist/esm/chunk-P7SE5LQE.mjs +0 -2
  856. package/dist/esm/chunk-PNSF3E67.mjs +0 -2
  857. package/dist/esm/chunk-PNSF3E67.mjs.map +0 -1
  858. package/dist/esm/chunk-PR3W2QEH.mjs +0 -2
  859. package/dist/esm/chunk-PWYJWTEM.mjs +0 -2
  860. package/dist/esm/chunk-PWYJWTEM.mjs.map +0 -1
  861. package/dist/esm/chunk-Q4C4U6I4.mjs +0 -4
  862. package/dist/esm/chunk-Q7RG7KQS.mjs +0 -2
  863. package/dist/esm/chunk-QBFGY74I.mjs +0 -2
  864. package/dist/esm/chunk-RJ7F4JDV.mjs +0 -2
  865. package/dist/esm/chunk-RJ7F4JDV.mjs.map +0 -1
  866. package/dist/esm/chunk-ROT6S6BM.mjs +0 -2
  867. package/dist/esm/chunk-S47HA7O7.mjs +0 -2
  868. package/dist/esm/chunk-SCBYJU6K.mjs +0 -2
  869. package/dist/esm/chunk-STY74NUA.mjs +0 -2
  870. package/dist/esm/chunk-STY74NUA.mjs.map +0 -1
  871. package/dist/esm/chunk-TDGUMBON.mjs +0 -4
  872. package/dist/esm/chunk-TDGUMBON.mjs.map +0 -1
  873. package/dist/esm/chunk-TM6IKHMX.mjs +0 -2
  874. package/dist/esm/chunk-TOBQ5UE6.mjs +0 -2
  875. package/dist/esm/chunk-U2SJIG2T.mjs +0 -2
  876. package/dist/esm/chunk-ULHOJ2BE.mjs +0 -2
  877. package/dist/esm/chunk-ULHOJ2BE.mjs.map +0 -1
  878. package/dist/esm/chunk-UTXEW2FT.mjs +0 -2
  879. package/dist/esm/chunk-V2EXS6TM.mjs +0 -2
  880. package/dist/esm/chunk-V7G2EDNR.mjs +0 -2
  881. package/dist/esm/chunk-V7G2EDNR.mjs.map +0 -1
  882. package/dist/esm/chunk-VHNX2NUR.mjs +0 -473
  883. package/dist/esm/chunk-VHNX2NUR.mjs.map +0 -1
  884. package/dist/esm/chunk-VKDTI6NX.mjs +0 -2
  885. package/dist/esm/chunk-VKDTI6NX.mjs.map +0 -1
  886. package/dist/esm/chunk-VOCI2675.mjs +0 -2
  887. package/dist/esm/chunk-W4BSN6SK.mjs +0 -2
  888. package/dist/esm/chunk-WCMW2L3P.mjs +0 -2
  889. package/dist/esm/chunk-WXDA4CCR.mjs +0 -2
  890. package/dist/esm/chunk-X24PSWCX.mjs +0 -2
  891. package/dist/esm/chunk-X2CPDUOS.mjs +0 -2
  892. package/dist/esm/chunk-X2CPDUOS.mjs.map +0 -1
  893. package/dist/esm/chunk-X6IHNXWY.mjs +0 -2
  894. package/dist/esm/chunk-XAPQNCTN.mjs +0 -2
  895. package/dist/esm/chunk-XDIX7NIP.mjs +0 -2
  896. package/dist/esm/chunk-XH3BEKII.mjs +0 -2
  897. package/dist/esm/chunk-XJJVJOX5.mjs +0 -2
  898. package/dist/esm/chunk-XKUIMGKU.mjs +0 -2
  899. package/dist/esm/chunk-XTOIL6MB.mjs +0 -2
  900. package/dist/esm/chunk-XXHZQFYW.mjs +0 -2
  901. package/dist/esm/chunk-Y3Y4DVCK.mjs +0 -2
  902. package/dist/esm/chunk-YIF242TF.mjs +0 -2
  903. package/dist/esm/chunk-YIF242TF.mjs.map +0 -1
  904. package/dist/esm/chunk-YOZBVVKL.mjs +0 -2
  905. package/dist/esm/chunk-ZCEBDPBJ.mjs +0 -2
  906. package/dist/esm/chunk-ZP5EBIBE.mjs +0 -2
  907. package/dist/esm/chunk-ZP5EBIBE.mjs.map +0 -1
  908. /package/dist/esm/{chunk-7C2RDOWS.mjs.map → account/MultiEd25519Account.mjs.map} +0 -0
  909. /package/dist/esm/{chunk-KDMSOCZY.mjs.map → api/experimental.mjs.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{a as c}from"./chunk-2FNFUTFJ.mjs";import{c as p}from"./chunk-AZWVCBK2.mjs";import{c as o}from"./chunk-AC3BISWL.mjs";import{n as u,q as g,r as A}from"./chunk-VHNX2NUR.mjs";import{f as a,i as r}from"./chunk-G4O6FXCF.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-HL2O3T57.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as u,b as d,c as p}from"./chunk-BBUN4IO4.mjs";import{a as r}from"./chunk-PWYJWTEM.mjs";import{i as a}from"./chunk-G4O6FXCF.mjs";import{j as s}from"./chunk-42T3UGSW.mjs";import{b as c}from"./chunk-Q4C4U6I4.mjs";var A=class{constructor(n){this.config=n;this.isAccountAbstractionEnabled=async n=>{let o=await this.getAuthenticationFunction(n),{moduleAddress:t,moduleName:i,functionName:m}=s(n.authenticationFunction);return o?.some(e=>c.fromString(t).equals(e.moduleAddress)&&i===e.moduleName&&m===e.functionName)??!1};this.enableAccountAbstractionTransaction=this.addAuthenticationFunctionTransaction;this.disableAccountAbstractionTransaction=async n=>{let{accountAddress:o,authenticationFunction:t,options:i}=n;return t?this.removeAuthenticationFunctionTransaction({accountAddress:o,authenticationFunction:t,options:i}):this.removeDispatchableAuthenticatorTransaction({accountAddress:o,options:i})}}async addAuthenticationFunctionTransaction(n){let{accountAddress:o,authenticationFunction:t,options:i}=n;return u({aptosConfig:this.config,authenticationFunction:t,sender:o,options:i})}async removeAuthenticationFunctionTransaction(n){let{accountAddress:o,authenticationFunction:t,options:i}=n;return d({aptosConfig:this.config,sender:o,authenticationFunction:t,options:i})}async removeDispatchableAuthenticatorTransaction(n){let{accountAddress:o,options:t}=n;return p({aptosConfig:this.config,sender:o,options:t})}async getAuthenticationFunction(n){let{accountAddress:o}=n,[{vec:t}]=await r({aptosConfig:this.config,payload:{function:"0x1::account_abstraction::dispatchable_authenticator",functionArguments:[c.from(o)],abi:{typeParameters:[],parameters:[new a],returnTypes:[]}}});if(t.length!==0)return t[0].map(i=>({moduleAddress:c.fromString(i.module_address),moduleName:i.module_name,functionName:i.function_name}))}};export{A as a};
2
- //# sourceMappingURL=chunk-HLJE5XGE.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as i}from"./chunk-W4BSN6SK.mjs";import{h as a}from"./chunk-2FNFUTFJ.mjs";import{a as o}from"./chunk-KDMSOCZY.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
- //# sourceMappingURL=chunk-HT2WC3QV.mjs.map
@@ -1,2 +0,0 @@
1
- import{b as h,d as l}from"./chunk-TM6IKHMX.mjs";import{b as E}from"./chunk-EMURYYVO.mjs";import{a as p}from"./chunk-WCMW2L3P.mjs";import{a as g}from"./chunk-FN4C3CKC.mjs";var o=class o extends E{constructor(r){super();let{publicKeys:e,threshold:t}=r;if(e.length>o.MAX_KEYS||e.length<o.MIN_KEYS)throw new Error(`Must have between ${o.MIN_KEYS} and ${o.MAX_KEYS} public keys, inclusive`);if(t<o.MIN_THRESHOLD||t>e.length)throw new Error(`Threshold must be between ${o.MIN_THRESHOLD} and ${e.length}, inclusive`);this.publicKeys=e,this.threshold=t}verifySignature(r){let{message:e,signature:t}=r;if(!(t instanceof y))return!1;let s=[];for(let i=0;i<4;i+=1)for(let n=0;n<8;n+=1)if((t.bitmap[i]&1<<7-n)!==0){let u=i*8+n;s.push(u)}if(s.length!==t.signatures.length)throw new Error("Bitmap and signatures length mismatch");if(s.length<this.threshold)throw new Error("Not enough signatures");for(let i=0;i<s.length;i+=1)if(!this.publicKeys[s[i]].verifySignature({message:e,signature:t.signatures[i]}))return!1;return!0}authKey(){return g.fromSchemeAndBytes({scheme:1,input:this.toUint8Array()})}toUint8Array(){let r=new Uint8Array(this.publicKeys.length*h.LENGTH+1);return this.publicKeys.forEach((e,t)=>{r.set(e.toUint8Array(),t*h.LENGTH)}),r[this.publicKeys.length*h.LENGTH]=this.threshold,r}serialize(r){r.serializeBytes(this.toUint8Array())}static deserialize(r){let e=r.deserializeBytes(),t=e[e.length-1],s=[];for(let i=0;i<e.length-1;i+=h.LENGTH){let n=i;s.push(new h(e.subarray(n,n+h.LENGTH)))}return new o({publicKeys:s,threshold:t})}};o.MAX_KEYS=32,o.MIN_KEYS=2,o.MIN_THRESHOLD=1;var d=o,a=class a extends p{constructor(r){super();let{signatures:e,bitmap:t}=r;if(e.length>a.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${a.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=e,!(t instanceof Uint8Array))this.bitmap=a.createBitmap({bits:t});else{if(t.length!==a.BITMAP_LEN)throw new Error(`"bitmap" length should be ${a.BITMAP_LEN}`);this.bitmap=t}}toUint8Array(){let r=new Uint8Array(this.signatures.length*l.LENGTH+a.BITMAP_LEN);return this.signatures.forEach((e,t)=>{r.set(e.toUint8Array(),t*l.LENGTH)}),r.set(this.bitmap,this.signatures.length*l.LENGTH),r}serialize(r){r.serializeBytes(this.toUint8Array())}static deserialize(r){let e=r.deserializeBytes(),t=e.subarray(e.length-4),s=[];for(let i=0;i<e.length-t.length;i+=l.LENGTH){let n=i;s.push(new l(e.subarray(n,n+l.LENGTH)))}return new a({signatures:s,bitmap:t})}static createBitmap(r){let{bits:e}=r,t=128,s=new Uint8Array([0,0,0,0]),i=new Set;return e.forEach((n,c)=>{if(n>=a.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${a.MAX_SIGNATURES_SUPPORTED-1}.`);if(i.has(n))throw new Error("Duplicate bits detected.");if(c>0&&n<=e[c-1])throw new Error("The bits need to be sorted in ascending order.");i.add(n);let u=Math.floor(n/8),b=s[u];b|=t>>n%8,s[u]=b}),s}};a.MAX_SIGNATURES_SUPPORTED=32,a.BITMAP_LEN=4;var y=a;export{d as a,y as b};
2
- //# sourceMappingURL=chunk-I7YHK6ZF.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/core/crypto/multiEd25519.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Deserializer, Serializer } from \"../../bcs\";\nimport { SigningScheme as AuthenticationKeyScheme } from \"../../types\";\nimport { AuthenticationKey } from \"../authenticationKey\";\nimport { Ed25519PublicKey, Ed25519Signature } from \"./ed25519\";\nimport { AccountPublicKey, VerifySignatureArgs } from \"./publicKey\";\nimport { Signature } from \"./signature\";\n\n/**\n * Represents the public key of a K-of-N Ed25519 multi-sig transaction.\n *\n * A K-of-N multi-sig transaction requires at least K out of N authorized signers to sign the transaction\n * for it to be executed. This class encapsulates the logic for managing the public keys and the threshold\n * for valid signatures.\n *\n * @see {@link https://aptos.dev/integration/creating-a-signed-transaction/ | Creating a Signed Transaction}\n * @group Implementation\n * @category Serialization\n */\nexport class MultiEd25519PublicKey extends AccountPublicKey {\n /**\n * Maximum number of public keys supported\n * @group Implementation\n * @category Serialization\n */\n static readonly MAX_KEYS = 32;\n\n /**\n * Minimum number of public keys needed\n * @group Implementation\n * @category Serialization\n */\n static readonly MIN_KEYS = 2;\n\n /**\n * Minimum threshold for the number of valid signatures required\n * @group Implementation\n * @category Serialization\n */\n static readonly MIN_THRESHOLD = 1;\n\n /**\n * List of Ed25519 public keys for this LegacyMultiEd25519PublicKey\n * @group Implementation\n * @category Serialization\n */\n public readonly publicKeys: Ed25519PublicKey[];\n\n /**\n * The minimum number of valid signatures required, for the number of public keys specified\n * @group Implementation\n * @category Serialization\n */\n public readonly threshold: number;\n\n /**\n * Public key for a K-of-N multi-sig transaction. A K-of-N multi-sig transaction means that for such a\n * transaction to be executed, at least K out of the N authorized signers have signed the transaction\n * and passed the check conducted by the chain.\n *\n * @see {@link\n * https://aptos.dev/integration/creating-a-signed-transaction/ | Creating a Signed Transaction}\n * @param args - A wrapper to let you choose the param order.\n * @param args.publicKeys A list of public keys\n * @param args.threshold At least \"threshold\" signatures must be valid\n * @group Implementation\n * @category Serialization\n */\n constructor(args: { publicKeys: Ed25519PublicKey[]; threshold: number }) {\n super();\n const { publicKeys, threshold } = args;\n\n // Validate number of public keys\n if (publicKeys.length > MultiEd25519PublicKey.MAX_KEYS || publicKeys.length < MultiEd25519PublicKey.MIN_KEYS) {\n throw new Error(\n `Must have between ${MultiEd25519PublicKey.MIN_KEYS} and ` +\n `${MultiEd25519PublicKey.MAX_KEYS} public keys, inclusive`,\n );\n }\n\n // Validate threshold: must be between 1 and the number of public keys, inclusive\n if (threshold < MultiEd25519PublicKey.MIN_THRESHOLD || threshold > publicKeys.length) {\n throw new Error(\n `Threshold must be between ${MultiEd25519PublicKey.MIN_THRESHOLD} and ${publicKeys.length}, inclusive`,\n );\n }\n\n this.publicKeys = publicKeys;\n this.threshold = threshold;\n }\n\n // region AccountPublicKey\n\n /**\n * Verifies a multi-signature against a given message.\n * This function ensures that the provided signatures meet the required threshold and are valid for the given message.\n *\n * @param args - The arguments for verifying the signature.\n * @param args.message - The message that was signed.\n * @param args.signature - The multi-signature containing multiple signatures and a bitmap indicating which signatures are valid.\n * @returns True if the signature is valid; otherwise, false.\n * @throws Error if the bitmap and signatures length mismatch or if there are not enough valid signatures.\n * @group Implementation\n * @category Serialization\n */\n verifySignature(args: VerifySignatureArgs): boolean {\n const { message, signature } = args;\n if (!(signature instanceof MultiEd25519Signature)) {\n return false;\n }\n\n const indices: number[] = [];\n for (let i = 0; i < 4; i += 1) {\n for (let j = 0; j < 8; j += 1) {\n // eslint-disable-next-line no-bitwise\n const bitIsSet = (signature.bitmap[i] & (1 << (7 - j))) !== 0;\n if (bitIsSet) {\n const index = i * 8 + j;\n indices.push(index);\n }\n }\n }\n\n if (indices.length !== signature.signatures.length) {\n throw new Error(\"Bitmap and signatures length mismatch\");\n }\n\n if (indices.length < this.threshold) {\n throw new Error(\"Not enough signatures\");\n }\n\n for (let i = 0; i < indices.length; i += 1) {\n const publicKey = this.publicKeys[indices[i]];\n if (!publicKey.verifySignature({ message, signature: signature.signatures[i] })) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Generates an authentication key based on the current instance's byte representation.\n * This function is essential for creating a secure authentication key that can be used for various cryptographic operations.\n *\n * @returns {AuthenticationKey} The generated authentication key.\n * @group Implementation\n * @category Serialization\n */\n authKey(): AuthenticationKey {\n return AuthenticationKey.fromSchemeAndBytes({\n scheme: AuthenticationKeyScheme.MultiEd25519,\n input: this.toUint8Array(),\n });\n }\n\n /**\n * Converts a PublicKeys into Uint8Array (bytes) with: bytes = p1_bytes | ... | pn_bytes | threshold\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n const bytes = new Uint8Array(this.publicKeys.length * Ed25519PublicKey.LENGTH + 1);\n this.publicKeys.forEach((k: Ed25519PublicKey, i: number) => {\n bytes.set(k.toUint8Array(), i * Ed25519PublicKey.LENGTH);\n });\n\n bytes[this.publicKeys.length * Ed25519PublicKey.LENGTH] = this.threshold;\n\n return bytes;\n }\n\n // endregion\n\n // region Serializable\n\n /**\n * Serializes the current instance into bytes using the provided serializer.\n * This allows for the conversion of the instance's data into a format suitable for transmission or storage.\n *\n * @param serializer - The serializer used to convert the instance into bytes.\n * @group Implementation\n * @category Serialization\n */\n serialize(serializer: Serializer): void {\n serializer.serializeBytes(this.toUint8Array());\n }\n\n /**\n * Deserializes a MultiEd25519Signature from the provided deserializer.\n * This function helps in reconstructing a MultiEd25519Signature object from its serialized byte representation.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Serialization\n */\n static deserialize(deserializer: Deserializer): MultiEd25519PublicKey {\n const bytes = deserializer.deserializeBytes();\n const threshold = bytes[bytes.length - 1];\n\n const keys: Ed25519PublicKey[] = [];\n\n for (let i = 0; i < bytes.length - 1; i += Ed25519PublicKey.LENGTH) {\n const begin = i;\n keys.push(new Ed25519PublicKey(bytes.subarray(begin, begin + Ed25519PublicKey.LENGTH)));\n }\n return new MultiEd25519PublicKey({ publicKeys: keys, threshold });\n }\n\n // endregion\n}\n\n/**\n * Represents the signature of a K-of-N Ed25519 multi-sig transaction.\n *\n * @see {@link https://aptos.dev/integration/creating-a-signed-transaction/#multisignature-transactions | Creating a Signed Transaction}\n * @group Implementation\n * @category Serialization\n */\nexport class MultiEd25519Signature extends Signature {\n /**\n * Maximum number of Ed25519 signatures supported\n * @group Implementation\n * @category Serialization\n */\n static MAX_SIGNATURES_SUPPORTED = 32;\n\n /**\n * Number of bytes in the bitmap representing who signed the transaction (32-bits)\n * @group Implementation\n * @category Serialization\n */\n static BITMAP_LEN: number = 4;\n\n /**\n * The list of underlying Ed25519 signatures\n * @group Implementation\n * @category Serialization\n */\n public readonly signatures: Ed25519Signature[];\n\n /**\n * 32-bit Bitmap representing who signed the transaction\n *\n * This is represented where each public key can be masked to determine whether the message was signed by that key.\n * @group Implementation\n * @category Serialization\n */\n public readonly bitmap: Uint8Array;\n\n /**\n * Signature for a K-of-N multi-sig transaction.\n *\n * @see {@link\n * https://aptos.dev/integration/creating-a-signed-transaction/#multisignature-transactions | Creating a Signed Transaction}\n *\n * @param args.signatures A list of signatures\n * @param args.bitmap 4 bytes, at most 32 signatures are supported. If Nth bit value is `1`, the Nth\n * signature should be provided in `signatures`. Bits are read from left to right.\n * Alternatively, you can specify an array of bitmap positions.\n * Valid position should range between 0 and 31.\n * @see MultiEd25519Signature.createBitmap\n * @group Implementation\n * @category Serialization\n */\n constructor(args: { signatures: Ed25519Signature[]; bitmap: Uint8Array | number[] }) {\n super();\n const { signatures, bitmap } = args;\n\n if (signatures.length > MultiEd25519Signature.MAX_SIGNATURES_SUPPORTED) {\n throw new Error(\n `The number of signatures cannot be greater than ${MultiEd25519Signature.MAX_SIGNATURES_SUPPORTED}`,\n );\n }\n this.signatures = signatures;\n\n if (!(bitmap instanceof Uint8Array)) {\n this.bitmap = MultiEd25519Signature.createBitmap({ bits: bitmap });\n } else if (bitmap.length !== MultiEd25519Signature.BITMAP_LEN) {\n throw new Error(`\"bitmap\" length should be ${MultiEd25519Signature.BITMAP_LEN}`);\n } else {\n this.bitmap = bitmap;\n }\n }\n\n // region AccountSignature\n\n /**\n * Converts a MultiSignature into Uint8Array (bytes) with `bytes = s1_bytes | ... | sn_bytes | bitmap`\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n const bytes = new Uint8Array(this.signatures.length * Ed25519Signature.LENGTH + MultiEd25519Signature.BITMAP_LEN);\n this.signatures.forEach((k: Ed25519Signature, i: number) => {\n bytes.set(k.toUint8Array(), i * Ed25519Signature.LENGTH);\n });\n\n bytes.set(this.bitmap, this.signatures.length * Ed25519Signature.LENGTH);\n\n return bytes;\n }\n\n // endregion\n\n // region Serializable\n\n serialize(serializer: Serializer): void {\n serializer.serializeBytes(this.toUint8Array());\n }\n\n static deserialize(deserializer: Deserializer): MultiEd25519Signature {\n const bytes = deserializer.deserializeBytes();\n const bitmap = bytes.subarray(bytes.length - 4);\n\n const signatures: Ed25519Signature[] = [];\n\n for (let i = 0; i < bytes.length - bitmap.length; i += Ed25519Signature.LENGTH) {\n const begin = i;\n signatures.push(new Ed25519Signature(bytes.subarray(begin, begin + Ed25519Signature.LENGTH)));\n }\n return new MultiEd25519Signature({ signatures, bitmap });\n }\n\n // endregion\n\n /**\n * Helper method to create a bitmap out of the specified bit positions.\n * This function allows you to set specific bits in a 32-bit long bitmap based on the provided positions.\n *\n * @param args The arguments for creating the bitmap.\n * @param args.bits The bitmap positions that should be set. A position starts at index 0. Valid positions should range between 0 and 31.\n *\n * @example\n * Here's an example of valid `bits`\n * ```\n * [0, 2, 31]\n * ```\n * `[0, 2, 31]` means the 1st, 3rd and 32nd bits should be set in the bitmap.\n * The result bitmap should be 0b1010000000000000000000000000001\n *\n * @returns bitmap that is 32 bits long.\n * @group Implementation\n * @category Serialization\n */\n static createBitmap(args: { bits: number[] }): Uint8Array {\n const { bits } = args;\n // Bits are read from left to right. e.g. 0b10000000 represents the first bit is set in one byte.\n // The decimal value of 0b10000000 is 128.\n const firstBitInByte = 128;\n const bitmap = new Uint8Array([0, 0, 0, 0]);\n\n // Check if duplicates exist in bits\n const dupCheckSet = new Set();\n\n bits.forEach((bit: number, index) => {\n if (bit >= MultiEd25519Signature.MAX_SIGNATURES_SUPPORTED) {\n throw new Error(`Cannot have a signature larger than ${MultiEd25519Signature.MAX_SIGNATURES_SUPPORTED - 1}.`);\n }\n\n if (dupCheckSet.has(bit)) {\n throw new Error(\"Duplicate bits detected.\");\n }\n\n if (index > 0 && bit <= bits[index - 1]) {\n throw new Error(\"The bits need to be sorted in ascending order.\");\n }\n\n dupCheckSet.add(bit);\n\n const byteOffset = Math.floor(bit / 8);\n\n let byte = bitmap[byteOffset];\n\n // eslint-disable-next-line no-bitwise\n byte |= firstBitInByte >> bit % 8;\n\n bitmap[byteOffset] = byte;\n });\n\n return bitmap;\n }\n}\n"],"mappings":"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","names":["_MultiEd25519PublicKey","AccountPublicKey","args","publicKeys","threshold","message","signature","MultiEd25519Signature","indices","j","index","AuthenticationKey","bytes","Ed25519PublicKey","k","i","serializer","deserializer","keys","begin","MultiEd25519PublicKey","_MultiEd25519Signature","Signature","signatures","bitmap","Ed25519Signature","bits","firstBitInByte","dupCheckSet","bit","byteOffset","byte"]}
@@ -1,2 +0,0 @@
1
- import{a as c,b as o,c as d,d as z,e as m,f as U,g as y}from"./chunk-ORMOQWWH.mjs";import{a as s}from"./chunk-EBMEXURY.mjs";import{a as b}from"./chunk-XTOIL6MB.mjs";import{b as u}from"./chunk-STY74NUA.mjs";var t=class i extends s{constructor(e){super(),this.values=e}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){if(this.values[0]!==void 0&&!(this.values[0]instanceof o)){new p(this.bcsToBytes()).serializeForScriptFunction(e);return}e.serializeU32AsUleb128(4),e.serialize(this)}static U8(e){let r;if(Array.isArray(e)&&e.length===0)r=[];else if(Array.isArray(e)&&typeof e[0]=="number")r=e;else if(typeof e=="string"){let n=u.fromHexInput(e);r=Array.from(n.toUint8Array())}else if(e instanceof Uint8Array)r=Array.from(e);else throw new Error("Invalid input type, must be an number[], Uint8Array, or hex string");return new i(r.map(n=>new o(n)))}static U16(e){return new i(e.map(r=>new d(r)))}static U32(e){return new i(e.map(r=>new z(r)))}static U64(e){return new i(e.map(r=>new m(r)))}static U128(e){return new i(e.map(r=>new U(r)))}static U256(e){return new i(e.map(r=>new y(r)))}static Bool(e){return new i(e.map(r=>new c(r)))}static MoveString(e){return new i(e.map(r=>new a(r)))}serialize(e){e.serializeVector(this.values)}static deserialize(e,r){let n=e.deserializeUleb128AsU32(),l=new Array;for(let w=0;w<n;w+=1)l.push(r.deserialize(e));return new i(l)}},p=class i extends s{constructor(e){super(),this.value=u.fromHexInput(e).toUint8Array()}serialize(e){e.serializeBytes(this.value)}serializeForEntryFunction(e){this.serialize(e)}serializeForScriptFunction(e){e.serializeU32AsUleb128(9),this.serialize(e)}static deserialize(e){return new i(e.deserializeBytes())}toMoveVector(e){let r=new b(this.bcsToBytes());r.deserializeUleb128AsU32();let n=r.deserializeVector(e);return new t(n)}},a=class i extends s{constructor(e){super(),this.value=e}serialize(e){e.serializeStr(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){let n=new TextEncoder().encode(this.value);t.U8(n).serializeForScriptFunction(e)}static deserialize(e){return new i(e.deserializeStr())}},A=class i extends s{constructor(e){super(),typeof e<"u"&&e!==null?this.vec=new t([e]):this.vec=new t([]),[this.value]=this.vec.values}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}unwrap(){if(this.isSome())return this.vec.values[0];throw new Error("Called unwrap on a MoveOption with no value")}isSome(){return this.vec.values.length===1}serialize(e){this.vec.serialize(e)}static U8(e){return new i(e!=null?new o(e):void 0)}static U16(e){return new i(e!=null?new d(e):void 0)}static U32(e){return new i(e!=null?new z(e):void 0)}static U64(e){return new i(e!=null?new m(e):void 0)}static U128(e){return new i(e!=null?new U(e):void 0)}static U256(e){return new i(e!=null?new y(e):void 0)}static Bool(e){return new i(e!=null?new c(e):void 0)}static MoveString(e){return new i(e!=null?new a(e):void 0)}static deserialize(e,r){let n=t.deserialize(e,r);return new i(n.values[0])}};export{t as a,p as b,a as c,A as d};
2
- //# sourceMappingURL=chunk-IDTLNF4M.mjs.map
@@ -1,2 +0,0 @@
1
- var s=class extends Error{constructor(e,i){super(e),this.invalidReason=i}};export{s as a};
2
- //# sourceMappingURL=chunk-IF4UU2MT.mjs.map
@@ -1,2 +0,0 @@
1
- var m=(e=>(e[e.V1=0]="V1",e))(m||{});export{m as a};
2
- //# sourceMappingURL=chunk-IMTC3J2M.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as m}from"./chunk-G4O6FXCF.mjs";import{a as g}from"./chunk-N4DM5FYH.mjs";import{a as p}from"./chunk-N6YTF76Q.mjs";import{a as v,b as M}from"./chunk-IDTLNF4M.mjs";import{a as S}from"./chunk-TOBQ5UE6.mjs";import{a as F,b as d,c as T,d as x,e as E,f as _,g as w}from"./chunk-ORMOQWWH.mjs";import{b as y}from"./chunk-Q4C4U6I4.mjs";import{a as u}from"./chunk-EBMEXURY.mjs";function I(t){let e=t.deserializeUleb128AsU32();switch(e){case 0:return d.deserialize(t);case 1:return E.deserialize(t);case 2:return _.deserialize(t);case 3:return y.deserialize(t);case 4:return v.deserialize(t,d);case 5:return F.deserialize(t);case 6:return T.deserialize(t);case 7:return x.deserialize(t);case 8:return w.deserialize(t);case 9:return M.deserialize(t);default:throw new Error(`Unknown variant index for ScriptTransactionArgument: ${e}`)}}var a=class extends u{static deserialize(e){let r=e.deserializeUleb128AsU32();switch(r){case 0:return A.load(e);case 2:return z.load(e);case 3:return h.load(e);default:throw new Error(`Unknown variant index for TransactionPayload: ${r}`)}}},A=class t extends a{constructor(e){super(),this.script=e}serialize(e){e.serializeU32AsUleb128(0),this.script.serialize(e)}static load(e){let r=U.deserialize(e);return new t(r)}},z=class t extends a{constructor(e){super(),this.entryFunction=e}serialize(e){e.serializeU32AsUleb128(2),this.entryFunction.serialize(e)}static load(e){let r=l.deserialize(e);return new t(r)}},h=class t extends a{constructor(e){super(),this.multiSig=e}serialize(e){e.serializeU32AsUleb128(3),this.multiSig.serialize(e)}static load(e){let r=f.deserialize(e);return new t(r)}},l=class t{constructor(e,r,i,n){this.module_name=e,this.function_name=r,this.type_args=i,this.args=n}static build(e,r,i,n){return new t(g.fromStr(e),new p(r),i,n)}serialize(e){this.module_name.serialize(e),this.function_name.serialize(e),e.serializeVector(this.type_args),e.serializeU32AsUleb128(this.args.length),this.args.forEach(r=>{r.serializeForEntryFunction(e)})}static deserialize(e){let r=g.deserialize(e),i=p.deserialize(e),n=e.deserializeVector(m),o=e.deserializeUleb128AsU32(),s=new Array;for(let c=0;c<o;c+=1){let B=e.deserializeUleb128AsU32(),D=S.deserialize(e,B);s.push(D)}return new t(r,i,n,s)}},U=class t{constructor(e,r,i){this.bytecode=e,this.type_args=r,this.args=i}serialize(e){e.serializeBytes(this.bytecode),e.serializeVector(this.type_args),e.serializeU32AsUleb128(this.args.length),this.args.forEach(r=>{r.serializeForScriptFunction(e)})}static deserialize(e){let r=e.deserializeBytes(),i=e.deserializeVector(m),n=e.deserializeUleb128AsU32(),o=new Array;for(let s=0;s<n;s+=1){let c=I(e);o.push(c)}return new t(r,i,o)}},f=class t{constructor(e,r){this.multisig_address=e,this.transaction_payload=r}serialize(e){this.multisig_address.serialize(e),this.transaction_payload===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.transaction_payload.serialize(e))}static deserialize(e){let r=y.deserialize(e),i=e.deserializeBool(),n;return i&&(n=b.deserialize(e)),new t(r,n)}},b=class t extends u{constructor(e){super(),this.transaction_payload=e}serialize(e){e.serializeU32AsUleb128(0),this.transaction_payload.serialize(e)}static deserialize(e){return e.deserializeUleb128AsU32(),new t(l.deserialize(e))}};export{I as a,a as b,A as c,z as d,h as e,l as f,U as g,f as h,b as i};
2
- //# sourceMappingURL=chunk-J7HRQ2IH.mjs.map
@@ -1,2 +0,0 @@
1
- import{h as e}from"./chunk-Y3Y4DVCK.mjs";async function i(o){o.minimumLedgerVersion!==void 0&&await e({aptosConfig:o.config,minimumLedgerVersion:o.minimumLedgerVersion,processorType:o.processorType})}export{i as a};
2
- //# sourceMappingURL=chunk-JF66JS2R.mjs.map
@@ -1,2 +0,0 @@
1
- var h=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var j=(g,b,d,c)=>{for(var a=c>1?void 0:c?i(b,d):b,e=g.length-1,f;e>=0;e--)(f=g[e])&&(a=(c?f(b,d,a):f(a))||a);return c&&a&&h(b,d,a),a};export{j as a};
2
- //# sourceMappingURL=chunk-KDMSOCZY.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as n}from"./chunk-P7SE5LQE.mjs";import{b as a}from"./chunk-Q4C4U6I4.mjs";import{a as i}from"./chunk-EBMEXURY.mjs";var o=class t extends i{constructor(e,r){super(),this.rawTransaction=e,this.feePayerAddress=r}serialize(e){this.rawTransaction.serialize(e),this.feePayerAddress===void 0?e.serializeBool(!1):(e.serializeBool(!0),this.feePayerAddress.serialize(e))}static deserialize(e){let r=n.deserialize(e),d=e.deserializeBool(),s;return d&&(s=a.deserialize(e)),new t(r,s)}};export{o as a};
2
- //# sourceMappingURL=chunk-KEJAUCQF.mjs.map
@@ -1,2 +0,0 @@
1
- import{b as o}from"./chunk-3HFZN7L5.mjs";import{a as r}from"./chunk-JF66JS2R.mjs";var t=class{constructor(e){this.config=e}async getObjectDataByObjectAddress(e){return await r({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"objects_processor"}),o({aptosConfig:this.config,...e})}};export{t as a};
2
- //# sourceMappingURL=chunk-L2AQG3G3.mjs.map
@@ -1,2 +0,0 @@
1
- import{b as c}from"./chunk-CXNF73OX.mjs";import{a}from"./chunk-HFCWJ6QL.mjs";import{c as i}from"./chunk-TM6IKHMX.mjs";var o=class{static generate(e={}){let{scheme:t=0,legacy:r=!0}=e;return t===0&&r?a.generate():c.generate({scheme:t})}static fromPrivateKey(e){let{privateKey:t,address:r,legacy:n=!0}=e;return t instanceof i&&n?new a({privateKey:t,address:r}):new c({privateKey:t,address:r})}static fromPrivateKeyAndAddress(e){return this.fromPrivateKey(e)}static fromDerivationPath(e){let{scheme:t=0,mnemonic:r,path:n,legacy:s=!0}=e;return t===0&&s?a.fromDerivationPath({mnemonic:r,path:n}):c.fromDerivationPath({scheme:t,mnemonic:r,path:n})}static authKey(e){let{publicKey:t}=e;return t.authKey()}verifySignature(e){return this.publicKey.verifySignature(e)}};export{o as a};
2
- //# sourceMappingURL=chunk-L6FONDPA.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as r}from"./chunk-EBMEXURY.mjs";import{b as i}from"./chunk-STY74NUA.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-MT2RJ7H3.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as s}from"./chunk-N6YTF76Q.mjs";import{b as i}from"./chunk-Q4C4U6I4.mjs";import{a as d}from"./chunk-EBMEXURY.mjs";var o=class t extends d{constructor(e,r){super(),this.address=e,this.name=r}static fromStr(e){let r=e.split("::");if(r.length!==2)throw new Error("Invalid module id.");return new t(i.fromString(r[0]),new s(r[1]))}serialize(e){this.address.serialize(e),this.name.serialize(e)}static deserialize(e){let r=i.deserialize(e),n=s.deserialize(e);return new t(r,n)}};export{o as a};
2
- //# sourceMappingURL=chunk-N4DM5FYH.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as e}from"./chunk-EBMEXURY.mjs";var r=class t extends e{constructor(i){super(),this.identifier=i}serialize(i){i.serializeStr(this.identifier)}static deserialize(i){let s=i.deserializeStr();return new t(s)}};export{r as a};
2
- //# sourceMappingURL=chunk-N6YTF76Q.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as f}from"./chunk-DNJQWGB7.mjs";import{a as d}from"./chunk-D6T3NYOA.mjs";import{a as h}from"./chunk-5BSMF22B.mjs";import{a as T}from"./chunk-HT2WC3QV.mjs";import{d as c,e as u,f as g,i as m,j as p,k as y,l as A}from"./chunk-2FNFUTFJ.mjs";import{a,b as o,c as i,d as s,e,g as r}from"./chunk-Y3Y4DVCK.mjs";var P=class{constructor(n){this.config=n,this.build=new f(this.config),this.simulate=new h(this.config),this.submit=new T(this.config),this.batch=new d(this.config)}async getTransactions(n){return a({aptosConfig:this.config,...n})}async getTransactionByVersion(n){return i({aptosConfig:this.config,...n})}async getTransactionByHash(n){return s({aptosConfig:this.config,...n})}async isPendingTransaction(n){return e({aptosConfig:this.config,...n})}async waitForTransaction(n){return r({aptosConfig:this.config,...n})}async getGasPriceEstimation(){return o({aptosConfig:this.config})}getSigningMessage(n){return c(n)}async publishPackageTransaction(n){return y({aptosConfig:this.config,...n})}async rotateAuthKey(n){return A({aptosConfig:this.config,...n})}sign(n){return u({...n})}signAsFeePayer(n){return g({...n})}async batchTransactionsForSingleAccount(n){try{let{sender:t,data:l,options:b}=n;this.batch.forSingleAccount({sender:t,data:l,options:b})}catch(t){throw new Error(`failed to submit transactions with error: ${t}`)}}async signAndSubmitTransaction(n){return m({aptosConfig:this.config,...n})}async signAndSubmitAsFeePayer(n){return p({aptosConfig:this.config,...n})}};export{P as a};
2
- //# sourceMappingURL=chunk-N7C6LQPZ.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/api/transaction.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { AptosConfig } from \"./aptosConfig\";\nimport {\n getGasPriceEstimation,\n getTransactionByHash,\n getTransactionByVersion,\n getTransactions,\n isTransactionPending,\n waitForTransaction,\n} from \"../internal/transaction\";\nimport {\n AnyNumber,\n CommittedTransactionResponse,\n GasEstimation,\n HexInput,\n PaginationArgs,\n PendingTransactionResponse,\n TransactionResponse,\n WaitForTransactionOptions,\n} from \"../types\";\nimport {\n FeePayerOrFeePayerAuthenticatorOrNeither,\n getSigningMessage,\n publicPackageTransaction,\n rotateAuthKey,\n signAndSubmitAsFeePayer,\n signAndSubmitTransaction,\n signAsFeePayer,\n signTransaction,\n} from \"../internal/transactionSubmission\";\nimport {\n AccountAuthenticator,\n AnyRawTransaction,\n InputGenerateTransactionOptions,\n InputGenerateTransactionPayloadData,\n} from \"../transactions\";\nimport { AccountAddressInput, PrivateKeyInput } from \"../core\";\nimport { Account } from \"../account\";\nimport { Build } from \"./transactionSubmission/build\";\nimport { Simulate } from \"./transactionSubmission/simulate\";\nimport { Submit } from \"./transactionSubmission/submit\";\nimport { TransactionManagement } from \"./transactionSubmission/management\";\nimport { SimpleTransaction } from \"../transactions/instances/simpleTransaction\";\n\n/**\n * Represents a transaction in the Aptos blockchain,\n * providing methods to build, simulate, submit, and manage transactions.\n * This class encapsulates functionalities for querying transaction details,\n * estimating gas prices, signing transactions, and handling transaction states.\n *\n * This class is used as part of the Aptos object, so should be called like so:\n * @example\n * ```typescript\n * import { Account, Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const APTOS_COIN = \"0x1::aptos_coin::AptosCoin\";\n * const COIN_STORE = `0x1::coin::CoinStore<${APTOS_COIN}>`;\n * const ALICE_INITIAL_BALANCE = 100_000_000;\n * const TRANSFER_AMOUNT = 100;\n *\n * async function example() {\n * console.log(\n * \"This example will create two accounts (Alice and Bob), fund them, and transfer between them.\",\n * );\n *\n * // Set up the client\n * const config = new AptosConfig({ network: Network.DEVNET });\n * const aptos = new Aptos(config);\n *\n * // Generate two account credentials\n * // Each account has a private key, a public key, and an address\n * const alice = Account.generate();\n * const bob = Account.generate();\n *\n * console.log(\"=== Addresses ===\\n\");\n * console.log(`Alice's address is: ${alice.accountAddress}`);\n * console.log(`Bob's address is: ${bob.accountAddress}`);\n *\n * // Fund the accounts using a faucet\n * console.log(\"\\n=== Funding accounts ===\\n\");\n *\n * await aptos.fundAccount({\n * accountAddress: alice.accountAddress,\n * amount: ALICE_INITIAL_BALANCE,\n * });\n *\n * // Send a transaction from Alice's account to Bob's account\n * const txn = await aptos.transaction.build.simple({\n * sender: alice.accountAddress,\n * data: {\n * // All transactions on Aptos are implemented via smart contracts.\n * function: \"0x1::aptos_account::transfer\",\n * functionArguments: [bob.accountAddress, 100],\n * },\n * });\n *\n * console.log(\"\\n=== Transfer transaction ===\\n\");\n * // Both signs and submits\n * const committedTxn = await aptos.signAndSubmitTransaction({\n * signer: alice,\n * transaction: txn,\n * });\n * // Waits for Aptos to verify and execute the transaction\n * const executedTransaction = await aptos.waitForTransaction({\n * transactionHash: committedTxn.hash,\n * });\n * console.log(\"Transaction hash:\", executedTransaction.hash);\n *\n * console.log(\"\\n=== Balances after transfer ===\\n\");\n * const newAliceAccountBalance = await aptos.getAccountResource({\n * accountAddress: alice.accountAddress,\n * resourceType: COIN_STORE,\n * });\n * const newAliceBalance = Number(newAliceAccountBalance.coin.value);\n * console.log(`Alice's balance is: ${newAliceBalance}`);\n *\n * const newBobAccountBalance = await aptos.getAccountResource({\n * accountAddress: bob.accountAddress,\n * resourceType: COIN_STORE,\n * });\n * const newBobBalance = Number(newBobAccountBalance.coin.value);\n * console.log(`Bob's balance is: ${newBobBalance}`);\n * }\n *\n * example();\n * ```\n * @group Transaction\n */\nexport class Transaction {\n readonly config: AptosConfig;\n\n readonly build: Build;\n\n readonly simulate: Simulate;\n\n readonly submit: Submit;\n\n readonly batch: TransactionManagement;\n\n /**\n * Creates an instance of the Aptos client with the specified configuration.\n * This allows you to interact with the Aptos blockchain using the provided settings.\n *\n * @param config - The configuration settings for the Aptos client.\n * @param config.network - The network to connect to (e.g., Testnet, Mainnet).\n * @param config.nodeUrl - The URL of the Aptos node to connect to.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Create a new Aptos client instance\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify the network\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client created successfully:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n constructor(config: AptosConfig) {\n this.config = config;\n this.build = new Build(this.config);\n this.simulate = new Simulate(this.config);\n this.submit = new Submit(this.config);\n this.batch = new TransactionManagement(this.config);\n }\n\n /**\n * Queries on-chain transactions, excluding pending transactions.\n * Use this function to retrieve historical transactions from the blockchain.\n *\n * @param args Optional parameters for pagination.\n * @param args.options Optional pagination options.\n * @param args.options.offset The number of the transaction to start with.\n * @param args.options.limit The number of results to return.\n *\n * @returns An array of on-chain transactions.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetch transactions with pagination\n * const transactions = await aptos.getTransactions({\n * options: {\n * offset: 0, // Start from the first transaction\n * limit: 10, // Limit to 10 results\n * },\n * });\n *\n * console.log(transactions);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async getTransactions(args?: { options?: PaginationArgs }): Promise<TransactionResponse[]> {\n return getTransactions({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries on-chain transaction by version. This function will not return pending transactions.\n *\n * @param args - The arguments for querying the transaction.\n * @param args.ledgerVersion - Transaction version is an unsigned 64-bit number.\n * @returns On-chain transaction. Only on-chain transactions have versions, so this\n * function cannot be used to query pending transactions.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching a transaction by its version\n * const transaction = await aptos.getTransactionByVersion({ ledgerVersion: 1 }); // replace 1 with a real version\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async getTransactionByVersion(args: { ledgerVersion: AnyNumber }): Promise<TransactionResponse> {\n return getTransactionByVersion({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries on-chain transactions by their transaction hash, returning both pending and committed transactions.\n *\n * @param args - The arguments for querying the transaction.\n * @param args.transactionHash - The transaction hash should be a hex-encoded bytes string with a 0x prefix.\n * @returns The transaction from the mempool (pending) or the on-chain (committed) transaction.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetch a transaction by its hash\n * const transaction = await aptos.getTransactionByHash({ transactionHash: \"0x123\" }); // replace with a real transaction hash\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async getTransactionByHash(args: { transactionHash: HexInput }): Promise<TransactionResponse> {\n return getTransactionByHash({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Defines if the specified transaction is currently in a pending state.\n * This function helps you determine the status of a transaction using its hash.\n *\n * @param args - The arguments for the function.\n * @param args.transactionHash - A hash of the transaction in hexadecimal format.\n * @returns `true` if the transaction is in a pending state and `false` otherwise.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Check if the transaction is pending using its hash\n * const isPendingTransaction = await aptos.isPendingTransaction({ transactionHash: \"0x123\" }); // replace with a real transaction hash\n * console.log(\"Is the transaction pending?\", isPendingTransaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async isPendingTransaction(args: { transactionHash: HexInput }): Promise<boolean> {\n return isTransactionPending({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Waits for a transaction to move past the pending state and provides the transaction response.\n * There are 4 cases.\n * 1. Transaction is successfully processed and committed to the chain.\n * - The function will resolve with the transaction response from the API.\n * 2. Transaction is rejected for some reason, and is therefore not committed to the blockchain.\n * - The function will throw an AptosApiError with an HTTP status code indicating some problem with the request.\n * 3. Transaction is committed but execution failed, meaning no changes were\n * written to the blockchain state.\n * - If `checkSuccess` is true, the function will throw a FailedTransactionError\n * If `checkSuccess` is false, the function will resolve with the transaction response where the `success` field is false.\n * 4. Transaction does not move past the pending state within `args.options.timeoutSecs` seconds.\n * - The function will throw a WaitForTransactionError\n *\n * @param args.transactionHash - The hash of a transaction previously submitted to the blockchain.\n * @param args.options - Optional parameters for waiting behavior.\n * @param args.options.timeoutSecs - Timeout in seconds. Defaults to 20 seconds.\n * @param args.options.checkSuccess - A boolean which controls whether the function will error if the transaction failed.\n * Defaults to true.\n * @returns The transaction on-chain response.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Wait for a transaction to complete using its hash\n * const transactionHash = \"0x123\"; // replace with a real transaction hash\n * const transactionResponse = await aptos.waitForTransaction({\n * transactionHash,\n * options: {\n * timeoutSecs: 30, // specify your own timeout if needed\n * checkSuccess: true,\n * },\n * });\n *\n * console.log(transactionResponse);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async waitForTransaction(args: {\n transactionHash: HexInput;\n options?: WaitForTransactionOptions;\n }): Promise<CommittedTransactionResponse> {\n return waitForTransaction({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Estimates the gas unit price required to process a transaction on the Aptos blockchain in a timely manner.\n * This helps users to understand the cost associated with their transactions.\n * {@link https://api.mainnet.aptoslabs.com/v1/spec#/operations/estimate_gas_price}\n *\n * @returns An object containing the estimated gas price.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET }); // Specify your network\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Getting the gas price estimation\n * const gasPriceEstimation = await aptos.getGasPriceEstimation();\n *\n * console.log(\"Estimated Gas Price:\", gasPriceEstimation);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async getGasPriceEstimation(): Promise<GasEstimation> {\n return getGasPriceEstimation({\n aptosConfig: this.config,\n });\n }\n\n /**\n * Returns a signing message for a transaction, allowing a user to sign it using their preferred method before submission to the network.\n *\n * @param args - The arguments for obtaining the signing message.\n * @param args.transaction - A raw transaction for signing elsewhere.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const transaction = await aptos.transaction.build.simple({\n * sender: \"0x1\", // replace with a real sender address\n * data: {\n * function: \"0x1::aptos_account::transfer\",\n * functionArguments: [\"0x2\", 100], // replace with a real destination address\n * },\n * });\n *\n * const message = await aptos.getSigningMessage({ transaction });\n * console.log(message);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n // eslint-disable-next-line class-methods-use-this\n getSigningMessage(args: { transaction: AnyRawTransaction }): Uint8Array {\n return getSigningMessage(args);\n }\n\n /**\n * Generates a transaction to publish a Move package to the blockchain.\n * This function helps you create a transaction that can be simulated or submitted to the chain for publishing a package.\n *\n * To get the `metadataBytes` and `byteCode`, can compile using Aptos CLI with command\n * `aptos move compile --save-metadata ...`,\n *\n * {@link https://aptos.dev/tutorials/your-first-dapp/#step-4-publish-a-move-module}\n *\n * @param args The arguments for publishing the package.\n * @param args.account The publisher account.\n * @param args.metadataBytes The package metadata bytes.\n * @param args.moduleBytecode An array of the bytecode of each module in the package in compiler output order.\n * @param args.options Optional settings for generating the transaction.\n *\n * @returns A SimpleTransaction that can be simulated or submitted to the chain.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Replace with a real account address\n * const account = \"0x1\";\n * const metadataBytes = \"0x...\"; // replace with real metadata bytes\n * const byteCode = \"0x...\"; // replace with real module bytecode\n *\n * const transaction = await aptos.publishPackageTransaction({\n * account,\n * metadataBytes,\n * moduleBytecode: [byteCode],\n * });\n *\n * console.log(transaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async publishPackageTransaction(args: {\n account: AccountAddressInput;\n metadataBytes: HexInput;\n moduleBytecode: Array<HexInput>;\n options?: InputGenerateTransactionOptions;\n }): Promise<SimpleTransaction> {\n return publicPackageTransaction({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Rotate an account's authentication key. After rotation, only the new private key can be used to sign transactions for the account.\n * Note: Only legacy Ed25519 scheme is supported for now.\n * More info: {@link https://aptos.dev/guides/account-management/key-rotation/}\n *\n * @param args The arguments for rotating the auth key.\n * @param args.fromAccount The account to rotate the auth key for.\n * @param args.toNewPrivateKey The new private key to rotate to.\n *\n * @returns PendingTransactionResponse\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Account, PrivateKey } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Rotate the authentication key for an account\n * const response = await aptos.rotateAuthKey({\n * // replace with a real account\n * fromAccount: Account.generate(),\n * // replace with a real private key\n * toNewPrivateKey: new PrivateKey(\"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\"),\n * });\n *\n * console.log(response);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async rotateAuthKey(args: { fromAccount: Account; toNewPrivateKey: PrivateKeyInput }): Promise<TransactionResponse> {\n return rotateAuthKey({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Sign a transaction that can later be submitted to the chain.\n * This function is essential for ensuring the authenticity of the transaction by using the provided account's signing capabilities.\n *\n * @param args - The arguments for signing the transaction.\n * @param args.signer - The account that will sign the transaction.\n * @param args.transaction - A raw transaction to sign.\n *\n * @returns AccountAuthenticator - The authenticator for the signed transaction.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const sender = Account.generate(); // Generate a new account for signing\n * const transaction = await aptos.transaction.build.simple({\n * sender: sender.accountAddress,\n * data: {\n * function: \"0x1::aptos_account::transfer\",\n * functionArguments: [ \"0x1\", 100 ], // replace with a real account address and amount\n * },\n * });\n *\n * const signedTransaction = await aptos.transaction.sign({\n * signer: sender,\n * transaction,\n * }); // Sign the transaction\n *\n * console.log(\"Signed Transaction:\", signedTransaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n // eslint-disable-next-line class-methods-use-this\n sign(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n return signTransaction({\n ...args,\n });\n }\n\n /**\n * Sign a transaction as a fee payer that can later be submitted to the chain.\n * This function ensures that the transaction is marked with the fee payer's address, allowing it to be processed correctly.\n *\n * @param args - The arguments for signing the transaction.\n * @param args.signer - The fee payer signer account.\n * @param args.transaction - A raw transaction to sign on. This transaction must include a `feePayerAddress` property.\n *\n * @returns AccountAuthenticator - The authenticator for the signed transaction.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const sender = Account.generate(); // Generate a new account for the fee payer\n * const transaction = await aptos.transaction.build.simple({\n * // All transactions on Aptos are implemented via smart contracts.\n * function: \"0x1::aptos_account::transfer\",\n * functionArguments: [sender.accountAddress, 100],\n * feePayerAddress: sender.accountAddress, // Set the fee payer address\n * });\n *\n * const signedTransaction = await aptos.transaction.signAsFeePayer({\n * signer: sender,\n * transaction,\n * });\n *\n * console.log(\"Signed transaction as fee payer:\", signedTransaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n // eslint-disable-next-line class-methods-use-this\n signAsFeePayer(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n return signAsFeePayer({\n ...args,\n });\n }\n\n // TRANSACTION SUBMISSION //\n\n /**\n * @deprecated Prefer to use `aptos.transaction.batch.forSingleAccount()`\n *\n * Batch transactions for a single account by submitting multiple transaction payloads.\n * This function is useful for efficiently processing and submitting transactions that do not depend on each other, such as\n * batch funding or batch token minting.\n *\n * @param args - The arguments for batching transactions.\n * @param args.sender - The sender account to sign and submit the transactions.\n * @param args.data - An array of transaction payloads to be processed.\n * @param args.options - Optional. Transaction generation configurations (excluding accountSequenceNumber).\n *\n * @throws Error if any worker failure occurs during submission.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Account } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n * const sender = Account.generate(); // Generate a new account for sending transactions\n *\n * async function runExample() {\n * const transactions = [\n * { }, // Build your first transaction payload\n * { }, // Build your second transaction payload\n * ];\n *\n * // Batch transactions for the single account\n * await aptos.batchTransactionsForSingleAccount({\n * sender,\n * data: transactions,\n * });\n *\n * console.log(\"Batch transactions submitted successfully.\");\n * }\n * runExample().catch(console.error);\n * ```\n * @group Transaction\n */\n async batchTransactionsForSingleAccount(args: {\n sender: Account;\n data: InputGenerateTransactionPayloadData[];\n options?: Omit<InputGenerateTransactionOptions, \"accountSequenceNumber\">;\n }): Promise<void> {\n try {\n const { sender, data, options } = args;\n this.batch.forSingleAccount({ sender, data, options });\n } catch (error: any) {\n throw new Error(`failed to submit transactions with error: ${error}`);\n }\n }\n\n /**\n * Sign and submit a single signer transaction to the blockchain.\n * This function allows you to execute a transaction after signing it with the specified account.\n *\n * @param args The arguments for signing and submitting the transaction.\n * @param args.signer The signer account to sign the transaction.\n * @param args.transaction An instance of a RawTransaction, plus optional secondary/fee payer addresses.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * const sender = Account.generate(); // Generate a new account for sending the transaction\n * const transaction = await aptos.transaction.build.simple({\n * sender: sender.accountAddress,\n * data: {\n * function: \"0x1::aptos_account::transfer\",\n * functionArguments: [ \"0x1\", 100 ], // replace with a real account address\n * },\n * });\n *\n * // Sign and submit the transaction\n * const pendingTransaction = await aptos.signAndSubmitTransaction({\n * signer: sender,\n * transaction,\n * });\n *\n * console.log(pendingTransaction);\n * }\n * runExample().catch(console.error);\n * ```\n * @return PendingTransactionResponse\n * @group Transaction\n */\n async signAndSubmitTransaction(\n args: FeePayerOrFeePayerAuthenticatorOrNeither & {\n signer: Account;\n transaction: AnyRawTransaction;\n },\n ): Promise<PendingTransactionResponse> {\n return signAndSubmitTransaction({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Sign and submit a single signer transaction as the fee payer to chain given an authenticator by the sender of the transaction.\n *\n * @param args.feePayer The fee payer account to sign the transaction\n * @param args.senderAuthenticator The AccountAuthenticator signed by the sender of the transaction\n * @param args.transaction An instance of a RawTransaction, plus optional secondary/fee payer addresses\n *\n * @example\n * const transaction = await aptos.transaction.build.simple({sender: alice.accountAddress, feePayer: true ...})\n * const senderAuthenticator = alice.signTransactionWithAuthenticator(transaction)\n * const pendingTransaction = await aptos.signAndSubmitAsFeePayer({\n * senderAuthenticator,\n * feePayer: bob,\n * transaction,\n * })\n *\n * @return PendingTransactionResponse\n * @group Transaction\n */\n async signAndSubmitAsFeePayer(args: {\n feePayer: Account;\n senderAuthenticator: AccountAuthenticator;\n transaction: AnyRawTransaction;\n }): Promise<PendingTransactionResponse> {\n return signAndSubmitAsFeePayer({\n aptosConfig: this.config,\n ...args,\n });\n }\n}\n"],"mappings":"yTAkIO,IAAMA,EAAN,KAAkB,CAkCvB,YAAYC,EAAqB,CAC/B,KAAK,OAASA,EACd,KAAK,MAAQ,IAAIC,EAAM,KAAK,MAAM,EAClC,KAAK,SAAW,IAAIC,EAAS,KAAK,MAAM,EACxC,KAAK,OAAS,IAAIC,EAAO,KAAK,MAAM,EACpC,KAAK,MAAQ,IAAIC,EAAsB,KAAK,MAAM,CACpD,CAmCA,MAAM,gBAAgBC,EAAqE,CACzF,OAAOC,EAAgB,CACrB,YAAa,KAAK,OAClB,GAAGD,CACL,CAAC,CACH,CA0BA,MAAM,wBAAwBA,EAAkE,CAC9F,OAAOE,EAAwB,CAC7B,YAAa,KAAK,OAClB,GAAGF,CACL,CAAC,CACH,CA0BA,MAAM,qBAAqBA,EAAmE,CAC5F,OAAOG,EAAqB,CAC1B,YAAa,KAAK,OAClB,GAAGH,CACL,CAAC,CACH,CA0BA,MAAM,qBAAqBA,EAAuD,CAChF,OAAOI,EAAqB,CAC1B,YAAa,KAAK,OAClB,GAAGJ,CACL,CAAC,CACH,CA+CA,MAAM,mBAAmBA,EAGiB,CACxC,OAAOK,EAAmB,CACxB,YAAa,KAAK,OAClB,GAAGL,CACL,CAAC,CACH,CA0BA,MAAM,uBAAgD,CACpD,OAAOM,EAAsB,CAC3B,YAAa,KAAK,MACpB,CAAC,CACH,CAgCA,kBAAkBN,EAAsD,CACtE,OAAOO,EAAkBP,CAAI,CAC/B,CA4CA,MAAM,0BAA0BA,EAKD,CAC7B,OAAOQ,EAAyB,CAAE,YAAa,KAAK,OAAQ,GAAGR,CAAK,CAAC,CACvE,CAmCA,MAAM,cAAcA,EAAgG,CAClH,OAAOS,EAAc,CAAE,YAAa,KAAK,OAAQ,GAAGT,CAAK,CAAC,CAC5D,CAyCA,KAAKA,EAAiF,CACpF,OAAOU,EAAgB,CACrB,GAAGV,CACL,CAAC,CACH,CAwCA,eAAeA,EAAiF,CAC9F,OAAOW,EAAe,CACpB,GAAGX,CACL,CAAC,CACH,CA4CA,MAAM,kCAAkCA,EAItB,CAChB,GAAI,CACF,GAAM,CAAE,OAAAY,EAAQ,KAAAC,EAAM,QAAAC,CAAQ,EAAId,EAClC,KAAK,MAAM,iBAAiB,CAAE,OAAAY,EAAQ,KAAAC,EAAM,QAAAC,CAAQ,CAAC,CACvD,OAASC,EAAY,CACnB,MAAM,IAAI,MAAM,6CAA6CA,CAAK,EAAE,CACtE,CACF,CAwCA,MAAM,yBACJf,EAIqC,CACrC,OAAOgB,EAAyB,CAC9B,YAAa,KAAK,OAClB,GAAGhB,CACL,CAAC,CACH,CAqBA,MAAM,wBAAwBA,EAIU,CACtC,OAAOiB,EAAwB,CAC7B,YAAa,KAAK,OAClB,GAAGjB,CACL,CAAC,CACH,CACF","names":["Transaction","config","Build","Simulate","Submit","TransactionManagement","args","getTransactions","getTransactionByVersion","getTransactionByHash","isTransactionPending","waitForTransaction","getGasPriceEstimation","getSigningMessage","publicPackageTransaction","rotateAuthKey","signTransaction","signAsFeePayer","sender","data","options","error","signAndSubmitTransaction","signAndSubmitAsFeePayer"]}
@@ -1,2 +0,0 @@
1
- import{a as w}from"./chunk-DMS7K76O.mjs";import{a as g}from"./chunk-CRFLR3ZY.mjs";import{a as S}from"./chunk-VKDTI6NX.mjs";import{a as P}from"./chunk-XAPQNCTN.mjs";import{a as m,b as f}from"./chunk-CXNF73OX.mjs";import{a as d}from"./chunk-HFCWJ6QL.mjs";import{a as I}from"./chunk-X6IHNXWY.mjs";import{a as k}from"./chunk-PNSF3E67.mjs";import{b}from"./chunk-GQX5KMF7.mjs";import{n as F,r as K}from"./chunk-G6RLN6ET.mjs";import{c as p}from"./chunk-TM6IKHMX.mjs";import{b as U}from"./chunk-Q4C4U6I4.mjs";import{b as H}from"./chunk-EBMEXURY.mjs";import{a as v}from"./chunk-XTOIL6MB.mjs";import{b as A}from"./chunk-STY74NUA.mjs";function D(n,s){if(s.serializeStr(n.jwt),s.serializeStr(n.uidKey),s.serializeFixedBytes(n.pepper),n.ephemeralKeyPair.serialize(s),n.proof===void 0)throw new Error("Cannot serialize - proof undefined");n.proof.serialize(s),s.serializeOption(n.verificationKeyHash,32)}function B(n){let s=n.deserializeStr(),h=n.deserializeStr(),u=n.deserializeFixedBytes(31),x=I.deserialize(n),z=F.deserialize(n),E=n.deserializeOption("fixedBytes",32);return{jwt:s,uidKey:h,pepper:u,ephemeralKeyPair:x,proof:z,verificationKeyHash:E}}var M;($=>{function n(e){let t=new H;switch(t.serializeU32AsUleb128(e.signingScheme),e.accountAddress.serialize(t),e.signingScheme){case 0:return e.privateKey.serialize(t),t.toUint8Array();case 2:{if(!m(e))throw new Error("Account is not a SingleKeySigner");let o=e.getAnyPublicKey();switch(t.serializeU32AsUleb128(o.variant),o.variant){case 3:return D(e,t),t.toUint8Array();case 4:{let r=e;return D(r,t),r.publicKey.jwkAddress.serialize(t),t.serializeBool(r.audless),t.toUint8Array()}case 1:case 0:return e.privateKey.serialize(t),t.toUint8Array();default:throw new Error(`Invalid public key variant: ${o.variant}`)}}case 3:{let o=e;return o.publicKey.serialize(t),t.serializeU32AsUleb128(o.signers.length),o.signers.forEach(r=>{t.serializeFixedBytes(n(r))}),t.toUint8Array()}default:throw new Error(`Deserialization of Account failed: invalid signingScheme value ${e.signingScheme}`)}}$.toBytes=n;function s(e){return A.hexInputToStringWithoutPrefix(n(e))}$.toHexStringWithoutPrefix=s;function h(e){return A.hexInputToString(n(e))}$.toHexString=h;function u(e){let{address:t,signingScheme:o}=P(e);switch(o){case 0:{let r=p.deserialize(e);return new d({privateKey:r,address:t})}case 2:{let r=e.deserializeUleb128AsU32();switch(r){case 0:{let i=p.deserialize(e);return new f({privateKey:i,address:t})}case 1:{let i=b.deserialize(e);return new f({privateKey:i,address:t})}case 3:{let i=B(e),a=K(i);return new g({...i,...a})}case 4:{let i=B(e),a=U.deserialize(e),y=e.deserializeBool(),l=K(i);return new w({...i,...l,jwkAddress:a,audless:y})}default:throw new Error(`Unsupported public key variant ${r}`)}}case 3:{let r=k.deserialize(e),i=e.deserializeUleb128AsU32(),a=new Array;for(let y=0;y<i;y+=1){let l=u(e);if(!m(l)&&!(l instanceof d))throw new Error("Deserialization of MultiKeyAccount failed. Signer is not a SingleKeySigner or Ed25519Account");a.push(l)}return new S({multiKey:r,signers:a,address:t})}default:throw new Error(`Deserialization of Account failed: invalid signingScheme value ${o}`)}}$.deserialize=u;function x(e){let t=c(e);if(!(t instanceof g))throw new Error("Deserialization of KeylessAccount failed");return t}$.keylessAccountFromHex=x;function z(e){let t=c(e);if(!(t instanceof w))throw new Error("Deserialization of FederatedKeylessAccount failed");return t}$.federatedKeylessAccountFromHex=z;function E(e){let t=c(e);if(!(t instanceof S))throw new Error("Deserialization of MultiKeyAccount failed");return t}$.multiKeyAccountFromHex=E;function j(e){let t=c(e);if(!(t instanceof f))throw new Error("Deserialization of SingleKeyAccount failed");return t}$.singleKeyAccountFromHex=j;function C(e){let t=c(e);if(!(t instanceof d))throw new Error("Deserialization of Ed25519Account failed");return t}$.ed25519AccountFromHex=C;function c(e){return u(v.fromHex(e))}$.fromHex=c;function O(e){return c(e)}$.fromBytes=O})(M||(M={}));export{M as a};
2
- //# sourceMappingURL=chunk-O37BZP2G.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as s,c as d,e as t}from"./chunk-EBMEXURY.mjs";import{a as l,b as n,c as o,d as z,e as c,f as u}from"./chunk-56CNRT2K.mjs";var U=class i extends s{constructor(e){super(),d(e),this.value=e}serialize(e){e.serializeBool(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(5),e.serialize(this)}deserialize(e){return new a(e.deserializeU256())}static deserialize(e){return new i(e.deserializeBool())}},p=class i extends s{constructor(e){super(),t(e,0,l),this.value=e}serialize(e){e.serializeU8(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(0),e.serialize(this)}static deserialize(e){return new i(e.deserializeU8())}},b=class i extends s{constructor(e){super(),t(e,0,n),this.value=e}serialize(e){e.serializeU16(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(6),e.serialize(this)}static deserialize(e){return new i(e.deserializeU16())}},y=class i extends s{constructor(e){super(),t(e,0,o),this.value=e}serialize(e){e.serializeU32(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(7),e.serialize(this)}static deserialize(e){return new i(e.deserializeU32())}},m=class i extends s{constructor(e){super(),t(e,BigInt(0),z),this.value=BigInt(e)}serialize(e){e.serializeU64(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(1),e.serialize(this)}static deserialize(e){return new i(e.deserializeU64())}},B=class i extends s{constructor(e){super(),t(e,BigInt(0),c),this.value=BigInt(e)}serialize(e){e.serializeU128(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(2),e.serialize(this)}static deserialize(e){return new i(e.deserializeU128())}},a=class i extends s{constructor(e){super(),t(e,BigInt(0),u),this.value=BigInt(e)}serialize(e){e.serializeU256(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(8),e.serialize(this)}static deserialize(e){return new i(e.deserializeU256())}};export{U as a,p as b,b as c,y as d,m as e,B as f,a as g};
2
- //# sourceMappingURL=chunk-ORMOQWWH.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as l}from"./chunk-BYHCW7MI.mjs";import{a as o,b as c}from"./chunk-A5L76YP7.mjs";import{a as h,i as d}from"./chunk-2FNFUTFJ.mjs";import{g as u}from"./chunk-Y3Y4DVCK.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-OURSLL3I.mjs.map
@@ -1,2 +0,0 @@
1
- import{b as h}from"./chunk-J7HRQ2IH.mjs";import{a as y}from"./chunk-XKUIMGKU.mjs";import{b as n}from"./chunk-Q4C4U6I4.mjs";import{a as _}from"./chunk-EBMEXURY.mjs";var t=class i extends _{constructor(e,s,a,r,c,d,l){super(),this.sender=e,this.sequence_number=s,this.payload=a,this.max_gas_amount=r,this.gas_unit_price=c,this.expiration_timestamp_secs=d,this.chain_id=l}serialize(e){this.sender.serialize(e),e.serializeU64(this.sequence_number),this.payload.serialize(e),e.serializeU64(this.max_gas_amount),e.serializeU64(this.gas_unit_price),e.serializeU64(this.expiration_timestamp_secs),this.chain_id.serialize(e)}static deserialize(e){let s=n.deserialize(e),a=e.deserializeU64(),r=h.deserialize(e),c=e.deserializeU64(),d=e.deserializeU64(),l=e.deserializeU64(),m=y.deserialize(e);return new i(s,a,r,c,d,l,m)}},o=class extends _{static deserialize(e){let s=e.deserializeUleb128AsU32();switch(s){case 0:return u.load(e);case 1:return p.load(e);default:throw new Error(`Unknown variant index for RawTransactionWithData: ${s}`)}}},u=class i extends o{constructor(e,s){super(),this.raw_txn=e,this.secondary_signer_addresses=s}serialize(e){e.serializeU32AsUleb128(0),this.raw_txn.serialize(e),e.serializeVector(this.secondary_signer_addresses)}static load(e){let s=t.deserialize(e),a=e.deserializeVector(n);return new i(s,a)}},p=class i extends o{constructor(e,s,a){super(),this.raw_txn=e,this.secondary_signer_addresses=s,this.fee_payer_address=a}serialize(e){e.serializeU32AsUleb128(1),this.raw_txn.serialize(e),e.serializeVector(this.secondary_signer_addresses),this.fee_payer_address.serialize(e)}static load(e){let s=t.deserialize(e),a=e.deserializeVector(n),r=n.deserialize(e);return new i(s,a,r)}};export{t as a,o as b,u as c,p as d};
2
- //# sourceMappingURL=chunk-P7SE5LQE.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as o,b as l}from"./chunk-UTXEW2FT.mjs";import{b as m}from"./chunk-EMURYYVO.mjs";import{a as g}from"./chunk-WCMW2L3P.mjs";import{a as y}from"./chunk-FN4C3CKC.mjs";function d(h){let e=h;return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>24}var p=class h extends m{constructor(e){super();let{publicKeys:r,signaturesRequired:t}=e;if(t<1)throw new Error("The number of required signatures needs to be greater than 0");if(r.length<t)throw new Error(`Provided ${r.length} public keys is smaller than the ${t} required signatures`);this.publicKeys=r.map(i=>i instanceof o?i:new o(i)),this.signaturesRequired=t}verifySignature(e){throw new Error("not implemented")}authKey(){return y.fromSchemeAndBytes({scheme:3,input:this.toUint8Array()})}serialize(e){e.serializeVector(this.publicKeys),e.serializeU8(this.signaturesRequired)}static deserialize(e){let r=e.deserializeVector(o),t=e.deserializeU8();return new h({publicKeys:r,signaturesRequired:t})}createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach((n,u)=>{if(u+1>this.publicKeys.length)throw new Error(`Signature index ${u+1} is out of public keys range, ${this.publicKeys.length}.`);if(a.has(n))throw new Error(`Duplicate bit ${n} detected.`);a.add(n);let c=Math.floor(n/8),b=i[c];b|=t>>n%8,i[c]=b}),i}getIndex(e){let r=e instanceof o?e:new o(e),t=this.publicKeys.findIndex(i=>i.toString()===r.toString());if(t!==-1)return t;throw new Error(`Public key ${e} not found in MultiKey ${this.publicKeys}`)}static isInstance(e){return"publicKeys"in e&&"signaturesRequired"in e}},s=class s extends g{constructor(e){super();let{signatures:r,bitmap:t}=e;if(r.length>s.MAX_SIGNATURES_SUPPORTED)throw new Error(`The number of signatures cannot be greater than ${s.MAX_SIGNATURES_SUPPORTED}`);if(this.signatures=r.map(a=>a instanceof l?a:new l(a)),!(t instanceof Uint8Array))this.bitmap=s.createBitmap({bits:t});else{if(t.length!==s.BITMAP_LEN)throw new Error(`"bitmap" length should be ${s.BITMAP_LEN}`);this.bitmap=t}let i=this.bitmap.reduce((a,n)=>a+d(n),0);if(i!==this.signatures.length)throw new Error(`Expecting ${i} signatures from the bitmap, but got ${this.signatures.length}`)}static createBitmap(e){let{bits:r}=e,t=128,i=new Uint8Array([0,0,0,0]),a=new Set;return r.forEach(n=>{if(n>=s.MAX_SIGNATURES_SUPPORTED)throw new Error(`Cannot have a signature larger than ${s.MAX_SIGNATURES_SUPPORTED-1}.`);if(a.has(n))throw new Error("Duplicate bits detected.");a.add(n);let u=Math.floor(n/8),c=i[u];c|=t>>n%8,i[u]=c}),i}serialize(e){e.serializeVector(this.signatures),e.serializeBytes(this.bitmap)}static deserialize(e){let r=e.deserializeVector(l),t=e.deserializeBytes();return new s({signatures:r,bitmap:t})}};s.BITMAP_LEN=4,s.MAX_SIGNATURES_SUPPORTED=s.BITMAP_LEN*8;var f=s;export{p as a,f as b};
2
- //# sourceMappingURL=chunk-PNSF3E67.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/core/crypto/multiKey.ts"],"sourcesContent":["import { SigningScheme as AuthenticationKeyScheme } from \"../../types\";\nimport { Deserializer } from \"../../bcs/deserializer\";\nimport { Serializer } from \"../../bcs/serializer\";\nimport { AuthenticationKey } from \"../authenticationKey\";\nimport { AccountPublicKey, PublicKey, VerifySignatureArgs } from \"./publicKey\";\nimport { Signature } from \"./signature\";\nimport { AnyPublicKey, AnySignature } from \"./singleKey\";\n\n/**\n * Counts the number of set bits (1s) in a byte.\n * This function can help you determine the population count of a given byte value.\n *\n * @param byte - The byte value for which to count the number of set bits.\n * @group Implementation\n * @category Serialization\n */\n/* eslint-disable no-bitwise */\nfunction bitCount(byte: number) {\n let n = byte;\n n -= (n >> 1) & 0x55555555;\n n = (n & 0x33333333) + ((n >> 2) & 0x33333333);\n return (((n + (n >> 4)) & 0xf0f0f0f) * 0x1010101) >> 24;\n}\n/* eslint-enable no-bitwise */\n\n/**\n * Represents a multi-key authentication scheme for accounts, allowing multiple public keys\n * to be associated with a single account. This class enforces a minimum number of valid signatures\n * required to authorize actions, ensuring enhanced security for multi-agent accounts.\n *\n * The public keys of each individual agent can be any type of public key supported by Aptos.\n * Since [AIP-55](https://github.com/aptos-foundation/AIPs/pull/263), Aptos supports\n * `Legacy` and `Unified` authentication keys.\n * @group Implementation\n * @category Serialization\n */\nexport class MultiKey extends AccountPublicKey {\n /**\n * List of any public keys\n * @group Implementation\n * @category Serialization\n */\n public readonly publicKeys: AnyPublicKey[];\n\n /**\n * The minimum number of valid signatures required, for the number of public keys specified\n * @group Implementation\n * @category Serialization\n */\n public readonly signaturesRequired: number;\n\n /**\n * Signature for a K-of-N multi-sig transaction.\n * This constructor initializes a multi-signature transaction with the provided signatures and bitmap.\n *\n * @param args An object containing the parameters for the multi-signature transaction.\n * @param args.signatures A list of signatures.\n * @param args.bitmap A bitmap represented as a Uint8Array or an array of numbers, where each bit indicates whether a\n * corresponding signature is present. A maximum of 32 signatures is supported, and the length of the bitmap must be 4 bytes.\n *\n * @throws Error if the number of signatures exceeds the maximum supported, if the bitmap length is incorrect, or if the number\n * of signatures does not match the bitmap.\n * @group Implementation\n * @category Serialization\n */\n // region Constructors\n constructor(args: { publicKeys: Array<PublicKey>; signaturesRequired: number }) {\n super();\n const { publicKeys, signaturesRequired } = args;\n\n // Validate number of public keys is greater than signature required\n if (signaturesRequired < 1) {\n throw new Error(\"The number of required signatures needs to be greater than 0\");\n }\n\n // Validate number of public keys is greater than signature required\n if (publicKeys.length < signaturesRequired) {\n throw new Error(\n `Provided ${publicKeys.length} public keys is smaller than the ${signaturesRequired} required signatures`,\n );\n }\n\n // Make sure that all keys are normalized to the SingleKey authentication scheme\n this.publicKeys = publicKeys.map((publicKey) =>\n publicKey instanceof AnyPublicKey ? publicKey : new AnyPublicKey(publicKey),\n );\n\n this.signaturesRequired = signaturesRequired;\n }\n\n // endregion\n\n // region AccountPublicKey\n\n /**\n * Verifies the provided signature against the given message.\n * This function helps ensure the integrity and authenticity of the message by checking if the signature is valid.\n *\n * @param args - The arguments for verifying the signature.\n * @param args.message - The message that was signed.\n * @param args.signature - The signature to verify.\n * @group Implementation\n * @category Serialization\n */\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n verifySignature(args: VerifySignatureArgs): boolean {\n throw new Error(\"not implemented\");\n }\n\n /**\n * Generates an authentication key based on the current instance's byte representation.\n * This key can be used for secure authentication processes within the system.\n *\n * @returns {AuthenticationKey} The generated authentication key.\n * @group Implementation\n * @category Serialization\n */\n authKey(): AuthenticationKey {\n return AuthenticationKey.fromSchemeAndBytes({\n scheme: AuthenticationKeyScheme.MultiKey,\n input: this.toUint8Array(),\n });\n }\n\n // endregion\n\n // region Serializable\n\n /**\n * Serializes the object by writing its signatures and bitmap to the provided serializer.\n * This allows the object to be converted into a format suitable for transmission or storage.\n *\n * @param serializer - The serializer instance used to perform the serialization.\n * @group Implementation\n * @category Serialization\n */\n serialize(serializer: Serializer): void {\n serializer.serializeVector(this.publicKeys);\n serializer.serializeU8(this.signaturesRequired);\n }\n\n /**\n * Deserializes a MultiKeySignature from the provided deserializer.\n * This function retrieves the signatures and bitmap necessary for creating a MultiKeySignature object.\n *\n * @param deserializer - The deserializer instance used to read the serialized data.\n * @group Implementation\n * @category Serialization\n */\n static deserialize(deserializer: Deserializer): MultiKey {\n const keys = deserializer.deserializeVector(AnyPublicKey);\n const signaturesRequired = deserializer.deserializeU8();\n\n return new MultiKey({ publicKeys: keys, signaturesRequired });\n }\n\n // endregion\n\n /**\n * Create a bitmap that holds the mapping from the original public keys\n * to the signatures passed in\n *\n * @param args.bits array of the index mapping to the matching public keys\n * @returns Uint8array bit map\n * @group Implementation\n * @category Serialization\n */\n createBitmap(args: { bits: number[] }): Uint8Array {\n const { bits } = args;\n // Bits are read from left to right. e.g. 0b10000000 represents the first bit is set in one byte.\n // The decimal value of 0b10000000 is 128.\n const firstBitInByte = 128;\n const bitmap = new Uint8Array([0, 0, 0, 0]);\n\n // Check if duplicates exist in bits\n const dupCheckSet = new Set();\n\n bits.forEach((bit: number, idx: number) => {\n if (idx + 1 > this.publicKeys.length) {\n throw new Error(`Signature index ${idx + 1} is out of public keys range, ${this.publicKeys.length}.`);\n }\n\n if (dupCheckSet.has(bit)) {\n throw new Error(`Duplicate bit ${bit} detected.`);\n }\n\n dupCheckSet.add(bit);\n\n const byteOffset = Math.floor(bit / 8);\n\n let byte = bitmap[byteOffset];\n\n // eslint-disable-next-line no-bitwise\n byte |= firstBitInByte >> bit % 8;\n\n bitmap[byteOffset] = byte;\n });\n\n return bitmap;\n }\n\n /**\n * Get the index of the provided public key.\n *\n * This function retrieves the index of a specified public key within the MultiKey.\n * If the public key does not exist, it throws an error.\n *\n * @param publicKey - The public key to find the index for.\n * @returns The corresponding index of the public key, if it exists.\n * @throws Error - If the public key is not found in the MultiKey.\n * @group Implementation\n * @category Serialization\n */\n getIndex(publicKey: PublicKey): number {\n const anyPublicKey = publicKey instanceof AnyPublicKey ? publicKey : new AnyPublicKey(publicKey);\n const index = this.publicKeys.findIndex((pk) => pk.toString() === anyPublicKey.toString());\n\n if (index !== -1) {\n return index;\n }\n throw new Error(`Public key ${publicKey} not found in MultiKey ${this.publicKeys}`);\n }\n\n public static isInstance(value: PublicKey): value is MultiKey {\n return \"publicKeys\" in value && \"signaturesRequired\" in value;\n }\n}\n\n/**\n * Represents a multi-signature transaction using Ed25519 signatures.\n * This class allows for the creation and management of a K-of-N multi-signature scheme,\n * where a specified number of signatures are required to authorize a transaction.\n *\n * It includes functionality to validate the number of signatures against a bitmap,\n * which indicates which public keys have signed the transaction.\n * @group Implementation\n * @category Serialization\n */\nexport class MultiKeySignature extends Signature {\n /**\n * Number of bytes in the bitmap representing who signed the transaction (32-bits)\n * @group Implementation\n * @category Serialization\n */\n static BITMAP_LEN: number = 4;\n\n /**\n * Maximum number of Ed25519 signatures supported\n * @group Implementation\n * @category Serialization\n */\n static MAX_SIGNATURES_SUPPORTED = MultiKeySignature.BITMAP_LEN * 8;\n\n /**\n * The list of underlying Ed25519 signatures\n * @group Implementation\n * @category Serialization\n */\n public readonly signatures: AnySignature[];\n\n /**\n * 32-bit Bitmap representing who signed the transaction\n *\n * This is represented where each public key can be masked to determine whether the message was signed by that key.\n * @group Implementation\n * @category Serialization\n */\n public readonly bitmap: Uint8Array;\n\n /**\n * Signature for a K-of-N multi-sig transaction.\n *\n * @see {@link\n * https://aptos.dev/integration/creating-a-signed-transaction/#multisignature-transactions | Creating a Signed Transaction}\n *\n * @param args.signatures A list of signatures\n * @param args.bitmap 4 bytes, at most 32 signatures are supported. If Nth bit value is `1`, the Nth\n * signature should be provided in `signatures`. Bits are read from left to right\n * @group Implementation\n * @category Serialization\n */\n constructor(args: { signatures: Array<Signature | AnySignature>; bitmap: Uint8Array | number[] }) {\n super();\n const { signatures, bitmap } = args;\n\n if (signatures.length > MultiKeySignature.MAX_SIGNATURES_SUPPORTED) {\n throw new Error(`The number of signatures cannot be greater than ${MultiKeySignature.MAX_SIGNATURES_SUPPORTED}`);\n }\n\n // Make sure that all signatures are normalized to the SingleKey authentication scheme\n this.signatures = signatures.map((signature) =>\n signature instanceof AnySignature ? signature : new AnySignature(signature),\n );\n\n if (!(bitmap instanceof Uint8Array)) {\n this.bitmap = MultiKeySignature.createBitmap({ bits: bitmap });\n } else if (bitmap.length !== MultiKeySignature.BITMAP_LEN) {\n throw new Error(`\"bitmap\" length should be ${MultiKeySignature.BITMAP_LEN}`);\n } else {\n this.bitmap = bitmap;\n }\n\n const nSignatures = this.bitmap.reduce((acc, byte) => acc + bitCount(byte), 0);\n if (nSignatures !== this.signatures.length) {\n throw new Error(`Expecting ${nSignatures} signatures from the bitmap, but got ${this.signatures.length}`);\n }\n }\n\n /**\n * Helper method to create a bitmap out of the specified bit positions\n * @param args.bits The bitmap positions that should be set. A position starts at index 0.\n * Valid position should range between 0 and 31.\n * @example\n * Here's an example of valid `bits`\n * ```\n * [0, 2, 31]\n * ```\n * `[0, 2, 31]` means the 1st, 3rd and 32nd bits should be set in the bitmap.\n * The result bitmap should be 0b1010000000000000000000000000001\n *\n * @returns bitmap that is 32bit long\n * @group Implementation\n * @category Serialization\n */\n static createBitmap(args: { bits: number[] }): Uint8Array {\n const { bits } = args;\n // Bits are read from left to right. e.g. 0b10000000 represents the first bit is set in one byte.\n // The decimal value of 0b10000000 is 128.\n const firstBitInByte = 128;\n const bitmap = new Uint8Array([0, 0, 0, 0]);\n\n // Check if duplicates exist in bits\n const dupCheckSet = new Set();\n\n bits.forEach((bit: number) => {\n if (bit >= MultiKeySignature.MAX_SIGNATURES_SUPPORTED) {\n throw new Error(`Cannot have a signature larger than ${MultiKeySignature.MAX_SIGNATURES_SUPPORTED - 1}.`);\n }\n\n if (dupCheckSet.has(bit)) {\n throw new Error(\"Duplicate bits detected.\");\n }\n\n dupCheckSet.add(bit);\n\n const byteOffset = Math.floor(bit / 8);\n\n let byte = bitmap[byteOffset];\n\n // eslint-disable-next-line no-bitwise\n byte |= firstBitInByte >> bit % 8;\n\n bitmap[byteOffset] = byte;\n });\n\n return bitmap;\n }\n\n // region Serializable\n\n serialize(serializer: Serializer): void {\n // Note: we should not need to serialize the vector length, as it can be derived from the bitmap\n serializer.serializeVector(this.signatures);\n serializer.serializeBytes(this.bitmap);\n }\n\n static deserialize(deserializer: Deserializer): MultiKeySignature {\n const signatures = deserializer.deserializeVector(AnySignature);\n const bitmap = deserializer.deserializeBytes();\n return new MultiKeySignature({ signatures, bitmap });\n }\n\n // endregion\n}\n"],"mappings":"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","names":["bitCount","byte","n","MultiKey","_MultiKey","AccountPublicKey","args","publicKeys","signaturesRequired","publicKey","AnyPublicKey","AuthenticationKey","serializer","deserializer","keys","bits","firstBitInByte","bitmap","dupCheckSet","bit","idx","byteOffset","anyPublicKey","index","pk","value","_MultiKeySignature","Signature","signatures","signature","AnySignature","nSignatures","acc","MultiKeySignature"]}
@@ -1,2 +0,0 @@
1
- import{a as r,b as t,c as o,d as s}from"./chunk-6JTNS5O6.mjs";var n=class{constructor(e){this.config=e}async getPepper(e){return r({aptosConfig:this.config,...e})}async getProof(e){return t({aptosConfig:this.config,...e})}async deriveKeylessAccount(e){return o({aptosConfig:this.config,...e})}async updateFederatedKeylessJwkSetTransaction(e){return s({aptosConfig:this.config,...e})}};export{n as a};
2
- //# sourceMappingURL=chunk-PR3W2QEH.mjs.map
@@ -1,2 +0,0 @@
1
- import{c as p}from"./chunk-7DPHPPMG.mjs";import{b as a}from"./chunk-ULHOJ2BE.mjs";import{b as s}from"./chunk-EBMEXURY.mjs";async function F(n){let{aptosConfig:e,payload:o,options:t}=n,i=await p({...o,aptosConfig:e}),r=new s;i.serialize(r);let u=r.toUint8Array(),{data:d}=await a({aptosConfig:e,path:"view",originMethod:"view",contentType:"application/x.aptos.view_function+bcs",params:{ledger_version:t?.ledgerVersion},body:u});return d}async function M(n){let{aptosConfig:e,payload:o,options:t}=n,{data:i}=await a({aptosConfig:e,originMethod:"viewJson",path:"view",params:{ledger_version:t?.ledgerVersion},body:{function:o.function,type_arguments:o.typeArguments??[],arguments:o.functionArguments??[]}});return i}export{F as a,M as b};
2
- //# sourceMappingURL=chunk-PWYJWTEM.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/internal/view.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { LedgerVersionArg, MimeType, MoveValue } from \"../types\";\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport {\n generateViewFunctionPayload,\n InputViewFunctionData,\n InputViewFunctionJsonData,\n ViewFunctionJsonPayload,\n} from \"../transactions\";\nimport { Serializer } from \"../bcs\";\nimport { postAptosFullNode } from \"../client\";\n\nexport async function view<T extends Array<MoveValue> = Array<MoveValue>>(args: {\n aptosConfig: AptosConfig;\n payload: InputViewFunctionData;\n options?: LedgerVersionArg;\n}): Promise<T> {\n const { aptosConfig, payload, options } = args;\n const viewFunctionPayload = await generateViewFunctionPayload({\n ...payload,\n aptosConfig,\n });\n\n const serializer = new Serializer();\n viewFunctionPayload.serialize(serializer);\n const bytes = serializer.toUint8Array();\n\n const { data } = await postAptosFullNode<Uint8Array, MoveValue[]>({\n aptosConfig,\n path: \"view\",\n originMethod: \"view\",\n contentType: MimeType.BCS_VIEW_FUNCTION,\n params: { ledger_version: options?.ledgerVersion },\n body: bytes,\n });\n\n return data as T;\n}\n\nexport async function viewJson<T extends Array<MoveValue> = Array<MoveValue>>(args: {\n aptosConfig: AptosConfig;\n payload: InputViewFunctionJsonData;\n options?: LedgerVersionArg;\n}): Promise<T> {\n const { aptosConfig, payload, options } = args;\n const { data } = await postAptosFullNode<ViewFunctionJsonPayload, MoveValue[]>({\n aptosConfig,\n originMethod: \"viewJson\",\n path: \"view\",\n params: { ledger_version: options?.ledgerVersion },\n body: {\n function: payload.function,\n type_arguments: payload.typeArguments ?? [],\n arguments: payload.functionArguments ?? [],\n },\n });\n\n return data as T;\n}\n"],"mappings":"2HAcA,eAAsBA,EAAoDC,EAI3D,CACb,GAAM,CAAE,YAAAC,EAAa,QAAAC,EAAS,QAAAC,CAAQ,EAAIH,EACpCI,EAAsB,MAAMC,EAA4B,CAC5D,GAAGH,EACH,YAAAD,CACF,CAAC,EAEKK,EAAa,IAAIC,EACvBH,EAAoB,UAAUE,CAAU,EACxC,IAAME,EAAQF,EAAW,aAAa,EAEhC,CAAE,KAAAG,CAAK,EAAI,MAAMC,EAA2C,CAChE,YAAAT,EACA,KAAM,OACN,aAAc,OACd,oDACA,OAAQ,CAAE,eAAgBE,GAAS,aAAc,EACjD,KAAMK,CACR,CAAC,EAED,OAAOC,CACT,CAEA,eAAsBE,EAAwDX,EAI/D,CACb,GAAM,CAAE,YAAAC,EAAa,QAAAC,EAAS,QAAAC,CAAQ,EAAIH,EACpC,CAAE,KAAAS,CAAK,EAAI,MAAMC,EAAwD,CAC7E,YAAAT,EACA,aAAc,WACd,KAAM,OACN,OAAQ,CAAE,eAAgBE,GAAS,aAAc,EACjD,KAAM,CACJ,SAAUD,EAAQ,SAClB,eAAgBA,EAAQ,eAAiB,CAAC,EAC1C,UAAWA,EAAQ,mBAAqB,CAAC,CAC3C,CACF,CAAC,EAED,OAAOO,CACT","names":["view","args","aptosConfig","payload","options","viewFunctionPayload","generateViewFunctionPayload","serializer","Serializer","bytes","data","postAptosFullNode","viewJson"]}
@@ -1,4 +0,0 @@
1
- import{a as d}from"./chunk-EBMEXURY.mjs";import{a as i}from"./chunk-IF4UU2MT.mjs";import{bytesToHex as c,hexToBytes as h}from"@noble/hashes/utils";var u=(s=>(s.INCORRECT_NUMBER_OF_BYTES="incorrect_number_of_bytes",s.INVALID_HEX_CHARS="invalid_hex_chars",s.TOO_SHORT="too_short",s.TOO_LONG="too_long",s.LEADING_ZERO_X_REQUIRED="leading_zero_x_required",s.LONG_FORM_REQUIRED_UNLESS_SPECIAL="long_form_required_unless_special",s.INVALID_PADDING_ZEROES="INVALID_PADDING_ZEROES",s.INVALID_PADDING_STRICTNESS="INVALID_PADDING_STRICTNESS",s))(u||{}),e=class e extends d{constructor(t){if(super(),t.length!==e.LENGTH)throw new i("AccountAddress data should be exactly 32 bytes long","incorrect_number_of_bytes");this.data=t}isSpecial(){return this.data.slice(0,this.data.length-1).every(t=>t===0)&&this.data[this.data.length-1]<16}toString(){return`0x${this.toStringWithoutPrefix()}`}toStringWithoutPrefix(){let t=c(this.data);return this.isSpecial()&&(t=t[t.length-1]),t}toStringLong(){return`0x${this.toStringLongWithoutPrefix()}`}toStringLongWithoutPrefix(){return c(this.data)}toUint8Array(){return this.data}serialize(t){t.serializeFixedBytes(this.data)}serializeForEntryFunction(t){let r=this.bcsToBytes();t.serializeBytes(r)}serializeForScriptFunction(t){t.serializeU32AsUleb128(3),t.serialize(this)}static deserialize(t){let r=t.deserializeFixedBytes(e.LENGTH);return new e(r)}static fromStringStrict(t){if(!t.startsWith("0x"))throw new i("Hex string must start with a leading 0x.","leading_zero_x_required");let r=e.fromString(t);if(t.length!==e.LONG_STRING_LENGTH+2)if(r.isSpecial()){if(t.length!==3)throw new i(`The given hex string ${t} is a special address not in LONG form, it must be 0x0 to 0xf without padding zeroes.`,"INVALID_PADDING_ZEROES")}else throw new i(`The given hex string ${t} is not a special address, it must be represented as 0x + 64 chars.`,"long_form_required_unless_special");return r}static fromString(t,{maxMissingChars:r=4}={}){let n=t;if(t.startsWith("0x")&&(n=t.slice(2)),n.length===0)throw new i("Hex string is too short, must be 1 to 64 chars long, excluding the leading 0x.","too_short");if(n.length>64)throw new i("Hex string is too long, must be 1 to 64 chars long, excluding the leading 0x.","too_long");if(r>63||r<0)throw new i(`maxMissingChars must be between or equal to 0 and 63. Received ${r}`,"INVALID_PADDING_STRICTNESS");let a;try{a=h(n.padStart(64,"0"))}catch(g){throw new i(`Hex characters are invalid: ${g?.message}`,"invalid_hex_chars")}let o=new e(a);if(n.length<64-r&&!o.isSpecial())throw new i(`Hex string is too short, must be ${64-r} to 64 chars long, excluding the leading 0x. You may need to fix
2
- the addresss by padding it with 0s before passing it to \`fromString\` (e.g. <addressString>.padStart(64, '0')).
3
- Received ${t}`,"too_short");return o}static from(t,{maxMissingChars:r=4}={}){return typeof t=="string"?e.fromString(t,{maxMissingChars:r}):t instanceof Uint8Array?new e(t):t}static fromStrict(t){return typeof t=="string"?e.fromStringStrict(t):t instanceof Uint8Array?new e(t):t}static isValid(t){try{return t.strict?e.fromStrict(t.input):e.from(t.input),{valid:!0}}catch(r){return{valid:!1,invalidReason:r?.invalidReason,invalidReasonMessage:r?.message}}}equals(t){return this.data.length!==t.data.length?!1:this.data.every((r,n)=>r===t.data[n])}};e.LENGTH=32,e.LONG_STRING_LENGTH=64,e.ZERO=e.from("0x0"),e.ONE=e.from("0x1"),e.TWO=e.from("0x2"),e.THREE=e.from("0x3"),e.FOUR=e.from("0x4"),e.A=e.from("0xA");var l=e;export{u as a,l as b};
4
- //# sourceMappingURL=chunk-Q4C4U6I4.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as o}from"./chunk-ZP5EBIBE.mjs";var t=class{constructor(n){this.config=n}async transferCoinTransaction(n){return o({aptosConfig:this.config,...n})}};export{t as a};
2
- //# sourceMappingURL=chunk-Q7RG7KQS.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as i,b as o,c as a,d as c,e as p,f as d,g,h as u,i as A,j as y,k as m,l,m as T,n as f,o as C,p as I,q as O,r as P,s as D,t as V,u as S,v as h,w as R,x as G}from"./chunk-U2SJIG2T.mjs";import{a as e}from"./chunk-JF66JS2R.mjs";import{b as s}from"./chunk-Q4C4U6I4.mjs";var L=class{constructor(t){this.config=t}async getCollectionData(t){await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"});let{creatorAddress:N,collectionName:_,options:n}=t,w=s.from(N),r={collection_name:{_eq:_},creator_address:{_eq:w.toStringLong()}};return n?.tokenStandard&&(r.token_standard={_eq:n?.tokenStandard??"v2"}),d({aptosConfig:this.config,options:{where:r}})}async getCollectionDataByCreatorAddressAndCollectionName(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),g({aptosConfig:this.config,...t})}async getCollectionDataByCreatorAddress(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),u({aptosConfig:this.config,...t})}async getCollectionDataByCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),A({aptosConfig:this.config,...t})}async getCollectionId(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),y({aptosConfig:this.config,...t})}async getDigitalAssetData(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),i({aptosConfig:this.config,...t})}async getCurrentDigitalAssetOwnership(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),o({aptosConfig:this.config,...t})}async getOwnedDigitalAssets(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...t})}async getDigitalAssetActivity(t){return await e({config:this.config,minimumLedgerVersion:t.minimumLedgerVersion,processorType:"token_v2_processor"}),c({aptosConfig:this.config,...t})}async createCollectionTransaction(t){return p({aptosConfig:this.config,...t})}async mintDigitalAssetTransaction(t){return m({aptosConfig:this.config,...t})}async transferDigitalAssetTransaction(t){return l({aptosConfig:this.config,...t})}async mintSoulBoundTransaction(t){return T({aptosConfig:this.config,...t})}async burnDigitalAssetTransaction(t){return f({aptosConfig:this.config,...t})}async freezeDigitalAssetTransaferTransaction(t){return C({aptosConfig:this.config,...t})}async unfreezeDigitalAssetTransaferTransaction(t){return I({aptosConfig:this.config,...t})}async setDigitalAssetDescriptionTransaction(t){return O({aptosConfig:this.config,...t})}async setDigitalAssetNameTransaction(t){return P({aptosConfig:this.config,...t})}async setDigitalAssetURITransaction(t){return D({aptosConfig:this.config,...t})}async addDigitalAssetPropertyTransaction(t){return V({aptosConfig:this.config,...t})}async removeDigitalAssetPropertyTransaction(t){return S({aptosConfig:this.config,...t})}async updateDigitalAssetPropertyTransaction(t){return h({aptosConfig:this.config,...t})}async addDigitalAssetTypedPropertyTransaction(t){return R({aptosConfig:this.config,...t})}async updateDigitalAssetTypedPropertyTransaction(t){return G({aptosConfig:this.config,...t})}};export{L as a};
2
- //# sourceMappingURL=chunk-QBFGY74I.mjs.map
@@ -1,2 +0,0 @@
1
- var t=(S=>(S.FULLNODE="Fullnode",S.INDEXER="Indexer",S.FAUCET="Faucet",S.PEPPER="Pepper",S.PROVER="Prover",S))(t||{}),O=2e5,o=20,R=20,n="0x1::aptos_coin::AptosCoin",A="0x000000000000000000000000000000000000000000000000000000000000000a",T="APTOS::RawTransaction",a="APTOS::RawTransactionWithData",E=(_=>(_.ACCOUNT_TRANSACTION_PROCESSOR="account_transactions_processor",_.DEFAULT="default_processor",_.EVENTS_PROCESSOR="events_processor",_.FUNGIBLE_ASSET_PROCESSOR="fungible_asset_processor",_.STAKE_PROCESSOR="stake_processor",_.TOKEN_V2_PROCESSOR="token_v2_processor",_.USER_TRANSACTION_PROCESSOR="user_transaction_processor",_.OBJECT_PROCESSOR="objects_processor",_))(E||{}),r=/^https:\/\/securetoken\.google\.com\/[a-zA-Z0-9-_]+$/;export{t as a,O as b,o as c,R as d,n as e,A as f,T as g,a as h,E as i,r as j};
2
- //# sourceMappingURL=chunk-RJ7F4JDV.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/const.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Types of API endpoints used for routing requests in the Aptos network.\n * @group Implementation\n * @category Utils\n */\nexport enum AptosApiType {\n FULLNODE = \"Fullnode\",\n INDEXER = \"Indexer\",\n FAUCET = \"Faucet\",\n PEPPER = \"Pepper\",\n PROVER = \"Prover\",\n}\n\n/**\n * The default max gas amount when none is given.\n *\n * This is the maximum number of gas units that will be used by a transaction before being rejected.\n *\n * Note that max gas amount varies based on the transaction. A larger transaction will go over this\n * default gas amount, and the value will need to be changed for the specific transaction.\n * @group Implementation\n * @category Utils\n */\nexport const DEFAULT_MAX_GAS_AMOUNT = 200000;\n\n/**\n * The default transaction expiration seconds from now.\n *\n * This time is how long until the blockchain nodes will reject the transaction.\n *\n * Note that the transaction expiration time varies based on network connection and network load. It may need to be\n * increased for the transaction to be processed.\n * @group Implementation\n * @category Utils\n */\nexport const DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;\n\n/**\n * The default number of seconds to wait for a transaction to be processed.\n *\n * This time is the amount of time that the SDK will wait for a transaction to be processed when waiting for\n * the results of the transaction. It may take longer based on network connection and network load.\n * @group Implementation\n * @category Utils\n */\nexport const DEFAULT_TXN_TIMEOUT_SEC = 20;\n\n/**\n * The default gas currency for the network.\n * @group Implementation\n * @category Utils\n */\nexport const APTOS_COIN = \"0x1::aptos_coin::AptosCoin\";\n/**\n * @group Implementation\n * @category Utils\n */\nexport const APTOS_FA = \"0x000000000000000000000000000000000000000000000000000000000000000a\";\n/**\n * @group Implementation\n * @category Utils\n */\nexport const RAW_TRANSACTION_SALT = \"APTOS::RawTransaction\";\n/**\n * @group Implementation\n * @category Utils\n */\nexport const RAW_TRANSACTION_WITH_DATA_SALT = \"APTOS::RawTransactionWithData\";\n\n/**\n * Supported processor types for the indexer API, sourced from the processor_status table in the indexer database.\n * {@link https://cloud.hasura.io/public/graphiql?endpoint=https://api.mainnet.aptoslabs.com/v1/graphql}\n * @group Implementation\n * @category Utils\n */\nexport enum ProcessorType {\n ACCOUNT_TRANSACTION_PROCESSOR = \"account_transactions_processor\",\n DEFAULT = \"default_processor\",\n EVENTS_PROCESSOR = \"events_processor\",\n // Fungible asset processor also handles coins\n FUNGIBLE_ASSET_PROCESSOR = \"fungible_asset_processor\",\n STAKE_PROCESSOR = \"stake_processor\",\n // Token V2 processor replaces Token processor (not only for digital assets)\n TOKEN_V2_PROCESSOR = \"token_v2_processor\",\n USER_TRANSACTION_PROCESSOR = \"user_transaction_processor\",\n OBJECT_PROCESSOR = \"objects_processor\",\n}\n\n/**\n * Regular expression pattern for Firebase Auth issuer URLs\n * Matches URLs in the format: https://securetoken.google.com/[project-id]\n * where project-id can contain letters, numbers, hyphens, and underscores\n */\nexport const FIREBASE_AUTH_ISS_PATTERN = /^https:\\/\\/securetoken\\.google\\.com\\/[a-zA-Z0-9-_]+$/;\n"],"mappings":"AAQO,IAAKA,OACVA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,OAAS,SALCA,OAAA,IAkBCC,EAAyB,IAYzBC,EAA+B,GAU/BC,EAA0B,GAO1BC,EAAa,6BAKbC,EAAW,qEAKXC,EAAuB,wBAKvBC,EAAiC,gCAQlCC,OACVA,EAAA,8BAAgC,iCAChCA,EAAA,QAAU,oBACVA,EAAA,iBAAmB,mBAEnBA,EAAA,yBAA2B,2BAC3BA,EAAA,gBAAkB,kBAElBA,EAAA,mBAAqB,qBACrBA,EAAA,2BAA6B,6BAC7BA,EAAA,iBAAmB,oBAVTA,OAAA,IAkBCC,EAA4B","names":["AptosApiType","DEFAULT_MAX_GAS_AMOUNT","DEFAULT_TXN_EXP_SEC_FROM_NOW","DEFAULT_TXN_TIMEOUT_SEC","APTOS_COIN","APTOS_FA","RAW_TRANSACTION_SALT","RAW_TRANSACTION_WITH_DATA_SALT","ProcessorType","FIREBASE_AUTH_ISS_PATTERN"]}
@@ -1,2 +0,0 @@
1
- import{b as r}from"./chunk-STY74NUA.mjs";var a=class a{static formatPrivateKey(i,n){let e=a.AIP80_PREFIXES[n],t=i;return typeof t=="string"&&t.startsWith(e)&&(t=t.split("-")[2]),`${e}${r.fromHexInput(t).toString()}`}static parseHexInput(i,n,e){let t,p=a.AIP80_PREFIXES[n];if(typeof i=="string")if(!e&&!i.startsWith(p))t=r.fromHexInput(i),e!==!1&&console.warn("[Aptos SDK] It is recommended that private keys are AIP-80 compliant (https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md). You can fix the private key by formatting it with `PrivateKey.formatPrivateKey(privateKey: string, type: 'ed25519' | 'secp256k1'): string`.");else if(i.startsWith(p))t=r.fromHexString(i.split("-")[2]);else throw e?new Error("Invalid HexString input while parsing private key. Must AIP-80 compliant string."):new Error("Invalid HexString input while parsing private key.");else t=r.fromHexInput(i);return t}};a.AIP80_PREFIXES={ed25519:"ed25519-priv-",secp256k1:"secp256k1-priv-"};var o=a;export{o as a};
2
- //# sourceMappingURL=chunk-ROT6S6BM.mjs.map
@@ -1,2 +0,0 @@
1
- import{h as e,i as s,j as t,k as o,l as r,m as i,n as a,o as m,p as c,q as g,r as u,s as p,t as d}from"./chunk-WXDA4CCR.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-S47HA7O7.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as e}from"./chunk-XH3BEKII.mjs";import{a as i}from"./chunk-P7SE5LQE.mjs";import{a as r}from"./chunk-EBMEXURY.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-SCBYJU6K.mjs.map
@@ -1,2 +0,0 @@
1
- import{a as i}from"./chunk-IF4UU2MT.mjs";import{bytesToHex as o,hexToBytes as s}from"@noble/hashes/utils";var u=(n=>(n.TOO_SHORT="too_short",n.INVALID_LENGTH="invalid_length",n.INVALID_HEX_CHARS="invalid_hex_chars",n))(u||{}),a=class e{constructor(t){this.data=t}toUint8Array(){return this.data}toStringWithoutPrefix(){return o(this.data)}toString(){return`0x${this.toStringWithoutPrefix()}`}static fromHexString(t){let r=t;if(r.startsWith("0x")&&(r=r.slice(2)),r.length===0)throw new i("Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.","too_short");if(r.length%2!==0)throw new i("Hex string must be an even number of hex characters.","invalid_length");try{return new e(s(r))}catch(n){throw new i(`Hex string contains invalid hex characters: ${n?.message}`,"invalid_hex_chars")}}static fromHexInput(t){return t instanceof Uint8Array?new e(t):e.fromHexString(t)}static hexInputToUint8Array(t){return t instanceof Uint8Array?t:e.fromHexString(t).toUint8Array()}static hexInputToString(t){return e.fromHexInput(t).toString()}static hexInputToStringWithoutPrefix(t){return e.fromHexInput(t).toStringWithoutPrefix()}static isValid(t){try{return e.fromHexString(t),{valid:!0}}catch(r){return{valid:!1,invalidReason:r?.invalidReason,invalidReasonMessage:r?.message}}}equals(t){return this.data.length!==t.data.length?!1:this.data.every((r,n)=>r===t.data[n])}},l=e=>new TextDecoder().decode(a.fromHexInput(e).toUint8Array());export{u as a,a as b,l as c};
2
- //# sourceMappingURL=chunk-STY74NUA.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/core/hex.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { bytesToHex, hexToBytes } from \"@noble/hashes/utils\";\nimport { ParsingError, ParsingResult } from \"./common\";\nimport { HexInput } from \"../types\";\n\n/**\n * Provides reasons for parsing failures related to hexadecimal values.\n * @group Implementation\n * @category Serialization\n */\nexport enum HexInvalidReason {\n TOO_SHORT = \"too_short\",\n INVALID_LENGTH = \"invalid_length\",\n INVALID_HEX_CHARS = \"invalid_hex_chars\",\n}\n\n/**\n * NOTE: Do not use this class when working with account addresses; use AccountAddress instead.\n * When accepting hex data as input to a function, prefer to accept HexInput and\n *\n * A helper class for working with hex data. Hex data, when represented as a string,\n * generally looks like this, for example: 0xaabbcc, 45cd32, etc.\n *\n * then use the static helper methods of this class to convert it into the desired\n * format. This enables the greatest flexibility for the developer.\n *\n * Example usage:\n * ```typescript\n * getTransactionByHash(txnHash: HexInput): Promise<Transaction> {\n * const txnHashString = Hex.fromHexInput(txnHash).toString();\n * return await getTransactionByHashInner(txnHashString);\n * }\n * ```\n * This call to `Hex.fromHexInput().toString()` converts the HexInput to a hex string\n * with a leading 0x prefix, regardless of what the input format was.\n *\n * Other ways to chain the functions together:\n * - `Hex.fromHexString({ hexInput: \"0x1f\" }).toUint8Array()`\n * - `new Hex([1, 3]).toStringWithoutPrefix()`\n * @group Implementation\n * @category Serialization\n */\nexport class Hex {\n private readonly data: Uint8Array;\n\n /**\n * Create a new Hex instance from a Uint8Array.\n *\n * @param data - The Uint8Array containing the data to initialize the Hex instance.\n * @group Implementation\n * @category Serialization\n */\n constructor(data: Uint8Array) {\n this.data = data;\n }\n\n // ===\n // Methods for representing an instance of Hex as other types.\n // ===\n\n /**\n * Get the inner hex data as a Uint8Array. The inner data is already a Uint8Array, so no conversion takes place.\n *\n * @returns Hex data as Uint8Array\n * @group Implementation\n * @category Serialization\n */\n toUint8Array(): Uint8Array {\n return this.data;\n }\n\n /**\n * Get the hex data as a string without the 0x prefix.\n *\n * @returns Hex string without 0x prefix\n * @group Implementation\n * @category Serialization\n */\n toStringWithoutPrefix(): string {\n return bytesToHex(this.data);\n }\n\n /**\n * Get the hex data as a string with the 0x prefix.\n *\n * @returns Hex string with 0x prefix\n * @group Implementation\n * @category Serialization\n */\n toString(): string {\n return `0x${this.toStringWithoutPrefix()}`;\n }\n\n // ===\n // Methods for creating an instance of Hex from other types.\n // ===\n\n /**\n * Converts a hex string into a Hex instance, allowing for both prefixed and non-prefixed formats.\n *\n * @param str - A hex string, with or without the 0x prefix.\n *\n * @throws ParsingError - If the hex string is too short, has an odd number of characters, or contains invalid hex characters.\n *\n * @returns Hex - The resulting Hex instance created from the provided string.\n * @group Implementation\n * @category Serialization\n */\n static fromHexString(str: string): Hex {\n let input = str;\n\n if (input.startsWith(\"0x\")) {\n input = input.slice(2);\n }\n\n if (input.length === 0) {\n throw new ParsingError(\n \"Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.\",\n HexInvalidReason.TOO_SHORT,\n );\n }\n\n if (input.length % 2 !== 0) {\n throw new ParsingError(\"Hex string must be an even number of hex characters.\", HexInvalidReason.INVALID_LENGTH);\n }\n\n try {\n return new Hex(hexToBytes(input));\n } catch (error: any) {\n throw new ParsingError(\n `Hex string contains invalid hex characters: ${error?.message}`,\n HexInvalidReason.INVALID_HEX_CHARS,\n );\n }\n }\n\n /**\n * Converts an instance of HexInput, which can be a string or a Uint8Array, into a Hex instance.\n * This function is useful for transforming hexadecimal representations into a structured Hex object for further manipulation.\n *\n * @param hexInput - A HexInput which can be a string or Uint8Array.\n * @returns A Hex instance created from the provided hexInput.\n * @group Implementation\n * @category Serialization\n */\n static fromHexInput(hexInput: HexInput): Hex {\n if (hexInput instanceof Uint8Array) return new Hex(hexInput);\n return Hex.fromHexString(hexInput);\n }\n\n /**\n * Converts an instance of HexInput, which can be a string or a Uint8Array, into a Uint8Array.\n *\n * @param hexInput - A HexInput which can be a string or Uint8Array.\n * @returns A Uint8Array created from the provided hexInput.\n */\n static hexInputToUint8Array(hexInput: HexInput): Uint8Array {\n if (hexInput instanceof Uint8Array) return hexInput;\n return Hex.fromHexString(hexInput).toUint8Array();\n }\n\n /**\n * Converts a HexInput (string or Uint8Array) to a hex string with '0x' prefix.\n *\n * @param hexInput - The input to convert, either a hex string (with/without '0x' prefix) or Uint8Array\n * @returns A hex string with '0x' prefix (e.g., \"0x1234\")\n *\n * @example\n * ```typescript\n * Hex.hexInputToString(\"1234\") // returns \"0x1234\"\n * Hex.hexInputToString(\"0x1234\") // returns \"0x1234\"\n * Hex.hexInputToString(new Uint8Array([0x12, 0x34])) // returns \"0x1234\"\n * ```\n */\n static hexInputToString(hexInput: HexInput): string {\n return Hex.fromHexInput(hexInput).toString();\n }\n\n /**\n * Converts a HexInput (string or Uint8Array) to a hex string without '0x' prefix.\n *\n * @param hexInput - The input to convert, either a hex string (with/without '0x' prefix) or Uint8Array\n * @returns A hex string without '0x' prefix (e.g., \"1234\")\n *\n * @example\n * ```typescript\n * Hex.hexInputToStringWithoutPrefix(\"1234\") // returns \"1234\"\n * Hex.hexInputToStringWithoutPrefix(\"0x1234\") // returns \"1234\"\n * Hex.hexInputToStringWithoutPrefix(new Uint8Array([0x12, 0x34])) // returns \"1234\"\n * ```\n */\n static hexInputToStringWithoutPrefix(hexInput: HexInput): string {\n return Hex.fromHexInput(hexInput).toStringWithoutPrefix();\n }\n\n // ===\n // Methods for checking validity.\n // ===\n\n /**\n * Check if the provided string is a valid hexadecimal representation.\n *\n * @param str - A hex string representing byte data.\n *\n * @returns An object containing:\n * - valid: A boolean indicating whether the string is valid.\n * - invalidReason: The reason for invalidity if the string is not valid.\n * - invalidReasonMessage: A message explaining why the string is invalid.\n * @group Implementation\n * @category Serialization\n */\n static isValid(str: string): ParsingResult<HexInvalidReason> {\n try {\n Hex.fromHexString(str);\n return { valid: true };\n } catch (error: any) {\n return {\n valid: false,\n invalidReason: error?.invalidReason,\n invalidReasonMessage: error?.message,\n };\n }\n }\n\n /**\n * Determine if two Hex instances are equal by comparing their underlying byte data.\n *\n * @param other The Hex instance to compare to.\n * @returns true if the Hex instances are equal, false if not.\n * @group Implementation\n * @category Serialization\n */\n equals(other: Hex): boolean {\n if (this.data.length !== other.data.length) return false;\n return this.data.every((value, index) => value === other.data[index]);\n }\n}\n\nexport const hexToAsciiString = (hex: string) => new TextDecoder().decode(Hex.fromHexInput(hex).toUint8Array());\n"],"mappings":"yCAGA,OAAS,cAAAA,EAAY,cAAAC,MAAkB,sBAShC,IAAKC,OACVA,EAAA,UAAY,YACZA,EAAA,eAAiB,iBACjBA,EAAA,kBAAoB,oBAHVA,OAAA,IAgCCC,EAAN,MAAMC,CAAI,CAUf,YAAYC,EAAkB,CAC5B,KAAK,KAAOA,CACd,CAaA,cAA2B,CACzB,OAAO,KAAK,IACd,CASA,uBAAgC,CAC9B,OAAOC,EAAW,KAAK,IAAI,CAC7B,CASA,UAAmB,CACjB,MAAO,KAAK,KAAK,sBAAsB,CAAC,EAC1C,CAiBA,OAAO,cAAcC,EAAkB,CACrC,IAAIC,EAAQD,EAMZ,GAJIC,EAAM,WAAW,IAAI,IACvBA,EAAQA,EAAM,MAAM,CAAC,GAGnBA,EAAM,SAAW,EACnB,MAAM,IAAIC,EACR,4FACA,WACF,EAGF,GAAID,EAAM,OAAS,IAAM,EACvB,MAAM,IAAIC,EAAa,uDAAwD,gBAA+B,EAGhH,GAAI,CACF,OAAO,IAAIL,EAAIM,EAAWF,CAAK,CAAC,CAClC,OAASG,EAAY,CACnB,MAAM,IAAIF,EACR,+CAA+CE,GAAO,OAAO,GAC7D,mBACF,CACF,CACF,CAWA,OAAO,aAAaC,EAAyB,CAC3C,OAAIA,aAAoB,WAAmB,IAAIR,EAAIQ,CAAQ,EACpDR,EAAI,cAAcQ,CAAQ,CACnC,CAQA,OAAO,qBAAqBA,EAAgC,CAC1D,OAAIA,aAAoB,WAAmBA,EACpCR,EAAI,cAAcQ,CAAQ,EAAE,aAAa,CAClD,CAeA,OAAO,iBAAiBA,EAA4B,CAClD,OAAOR,EAAI,aAAaQ,CAAQ,EAAE,SAAS,CAC7C,CAeA,OAAO,8BAA8BA,EAA4B,CAC/D,OAAOR,EAAI,aAAaQ,CAAQ,EAAE,sBAAsB,CAC1D,CAkBA,OAAO,QAAQL,EAA8C,CAC3D,GAAI,CACF,OAAAH,EAAI,cAAcG,CAAG,EACd,CAAE,MAAO,EAAK,CACvB,OAASI,EAAY,CACnB,MAAO,CACL,MAAO,GACP,cAAeA,GAAO,cACtB,qBAAsBA,GAAO,OAC/B,CACF,CACF,CAUA,OAAOE,EAAqB,CAC1B,OAAI,KAAK,KAAK,SAAWA,EAAM,KAAK,OAAe,GAC5C,KAAK,KAAK,MAAM,CAACC,EAAOC,IAAUD,IAAUD,EAAM,KAAKE,CAAK,CAAC,CACtE,CACF,EAEaC,EAAoBC,GAAgB,IAAI,YAAY,EAAE,OAAOd,EAAI,aAAac,CAAG,EAAE,aAAa,CAAC","names":["bytesToHex","hexToBytes","HexInvalidReason","Hex","_Hex","data","bytesToHex","str","input","ParsingError","hexToBytes","error","hexInput","other","value","index","hexToAsciiString","hex"]}
@@ -1,4 +0,0 @@
1
- import{a as M}from"./chunk-HLJE5XGE.mjs";import{a as o}from"./chunk-JF66JS2R.mjs";import{a as d}from"./chunk-PWYJWTEM.mjs";import{a as y,b as l,c as C,d as T,e as O,f as h,g as b,h as L,i as P,j as S,k as V,l as R,n as w,o as I,p as v,q as k}from"./chunk-3EY7MT2M.mjs";import{a as f}from"./chunk-BI3BTSUB.mjs";import{a as p}from"./chunk-YOZBVVKL.mjs";import{e as u,f as A}from"./chunk-RJ7F4JDV.mjs";import{h as g,i as m}from"./chunk-42T3UGSW.mjs";import{b as r}from"./chunk-Q4C4U6I4.mjs";var N=class{constructor(e){this.config=e;this.abstraction=new M(e)}async getAccountInfo(e){return y({aptosConfig:this.config,...e})}async getAccountModules(e){return l({aptosConfig:this.config,...e})}async getAccountModule(e){return C({aptosConfig:this.config,...e})}async getAccountTransactions(e){return T({aptosConfig:this.config,...e})}async getAccountResources(e){return O({aptosConfig:this.config,...e})}async getAccountResource(e){return h({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return b({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),L({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),P({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),S({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),V({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),R({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),w({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),I({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:u,faMetadataAddress:A,...e})}async getAccountCoinAmount(e){let{accountAddress:a,coinType:s,faMetadataAddress:t,minimumLedgerVersion:E}=e;E&&console.warn(`minimumLedgerVersion is not used anymore, here for backward
2
- compatibility see https://github.com/aptos-labs/aptos-ts-sdk/pull/519,
3
- will be removed in the near future`);let c=s;s===void 0&&t!==void 0&&(c=await p(async()=>{try{let n=(await d({aptosConfig:this.config,payload:{function:"0x1::coin::paired_coin",functionArguments:[t]}})).at(0);if(n.vec.length>0&&m(n.vec[0]))return g(n.vec[0])}catch{}},`coin-mapping-${t.toString()}`,1e3*60*5)());let i;if(s!==void 0&&t!==void 0)i=r.from(t).toStringLong();else if(s!==void 0&&t===void 0)s===u?i=r.A.toStringLong():i=f(r.A,s).toStringLong();else if(s===void 0&&t!==void 0){let n=r.from(t);i=n.toStringLong(),n===r.A&&(c=u)}else throw new Error("Either coinType, faMetadataAddress, or both must be provided");if(c!==void 0){let[n]=await d({aptosConfig:this.config,payload:{function:"0x1::coin::balance",typeArguments:[c],functionArguments:[a]}});return parseInt(n,10)}let[_]=await d({aptosConfig:this.config,payload:{function:"0x1::primary_fungible_store::balance",typeArguments:["0x1::object::ObjectCore"],functionArguments:[a,i]}});return parseInt(_,10)}async getAccountOwnedObjects(e){return await o({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),v({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return k({aptosConfig:this.config,...e})}};export{N as a};
4
- //# sourceMappingURL=chunk-TDGUMBON.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/api/account.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account as AccountModule } from \"../account\";\nimport { AccountAddress, PrivateKey, AccountAddressInput, createObjectAddress } from \"../core\";\nimport {\n AccountData,\n AnyNumber,\n GetAccountCoinsDataResponse,\n GetAccountCollectionsWithOwnedTokenResponse,\n GetAccountOwnedTokensFromCollectionResponse,\n GetAccountOwnedTokensQueryResponse,\n GetObjectDataQueryResponse,\n LedgerVersionArg,\n MoveModuleBytecode,\n MoveResource,\n MoveStructId,\n MoveValue,\n OrderByArg,\n PaginationArgs,\n TokenStandardArg,\n TransactionResponse,\n WhereArg,\n} from \"../types\";\nimport {\n deriveAccountFromPrivateKey,\n getAccountCoinsCount,\n getAccountCoinsData,\n getAccountCollectionsWithOwnedTokens,\n getAccountOwnedObjects,\n getAccountOwnedTokens,\n getAccountOwnedTokensFromCollectionAddress,\n getAccountTokensCount,\n getAccountTransactionsCount,\n getInfo,\n getModule,\n getModules,\n getResource,\n getResources,\n getTransactions,\n lookupOriginalAccountAddress,\n} from \"../internal/account\";\nimport { APTOS_COIN, APTOS_FA, ProcessorType } from \"../utils/const\";\nimport { AptosConfig } from \"./aptosConfig\";\nimport { waitForIndexerOnVersion } from \"./utils\";\nimport { CurrentFungibleAssetBalancesBoolExp } from \"../types/generated/types\";\nimport { view } from \"../internal/view\";\nimport { isEncodedStruct, parseEncodedStruct } from \"../utils\";\nimport { memoizeAsync } from \"../utils/memoize\";\nimport { AccountAbstraction } from \"./account/abstraction\";\n\n/**\n * A class to query all `Account` related queries on Aptos.\n * @group Account\n */\nexport class Account {\n abstraction: AccountAbstraction;\n\n /**\n * Creates an instance of the Aptos client with the provided configuration.\n *\n * @param config - The configuration settings for the Aptos client.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * async function runExample() {\n * // Initialize the Aptos client with testnet configuration\n * const config = new AptosConfig({ network: Network.TESTNET }); // specify your own network if needed\n * const aptos = new Aptos(config);\n *\n * console.log(\"Aptos client initialized:\", aptos);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n constructor(readonly config: AptosConfig) {\n this.abstraction = new AccountAbstraction(config);\n }\n\n /**\n * Queries the current state for an Aptos account given its account address.\n *\n * @param args - The arguments for retrieving account information.\n * @param args.accountAddress - The Aptos account address to query.\n * @returns The account data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Retrieve account information for a specific address\n * const accountInfo = await aptos.getAccountInfo({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(accountInfo);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountInfo(args: { accountAddress: AccountAddressInput }): Promise<AccountData> {\n return getInfo({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for all modules in an account given an account address.\n * This function may call the API multiple times to auto paginate through results.\n *\n * @param args.accountAddress - The Aptos account address to query modules for.\n * @param args.options.offset - The cursor to start returning results from. Note, this is obfuscated and is not an index.\n * @param args.options.limit - The maximum number of results to return.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it retrieves the latest version.\n *\n * @returns - The account modules associated with the specified address.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching account modules for a specific account\n * const accountModules = await aptos.getAccountModules({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * offset: 0, // starting from the first module\n * limit: 10, // limiting to 10 modules\n * },\n * });\n *\n * console.log(accountModules);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountModules(args: {\n accountAddress: AccountAddressInput;\n options?: PaginationArgs & LedgerVersionArg;\n }): Promise<MoveModuleBytecode[]> {\n return getModules({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries for a specific account module given an account address and module name.\n *\n * @param args.accountAddress - The Aptos account address.\n * @param args.moduleName - The name of the module.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n *\n * @returns The account module associated with the specified account address and module name.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the account module for a specific account address and module name\n * const module = await aptos.getAccountModule({\n * accountAddress: \"0x1\", // replace with a real account address\n * moduleName: \"MyModule\" // specify the module name\n * });\n *\n * console.log(module);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountModule(args: {\n accountAddress: AccountAddressInput;\n moduleName: string;\n options?: LedgerVersionArg;\n }): Promise<MoveModuleBytecode> {\n return getModule({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries account transactions given an account address.\n * This function may call the API multiple times to auto paginate and retrieve all account transactions.\n *\n * @param args.accountAddress - The Aptos account address to query transactions for.\n * @param args.options - Optional pagination arguments.\n * @param args.options.offset - The number of transactions to start returning results from.\n * @param args.options.limit - The maximum number of results to return.\n *\n * @returns The account transactions.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetch transactions for a specific account\n * const transactions = await aptos.getAccountTransactions({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * offset: 0, // starting from the first transaction\n * limit: 10, // limiting to 10 transactions\n * },\n * });\n *\n * console.log(transactions);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountTransactions(args: {\n accountAddress: AccountAddressInput;\n options?: PaginationArgs;\n }): Promise<TransactionResponse[]> {\n return getTransactions({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries all account resources given an account address.\n * This function may call the API multiple times to auto paginate through results.\n *\n * @param args.accountAddress - The Aptos account address to query resources for.\n * @param args.options.offset - The cursor to start returning results from. Note, this is obfuscated and is not an index.\n * @param args.options.limit - The maximum number of results to return.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n * @returns Account resources.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching account resources for a specific account address\n * const resources = await aptos.getAccountResources({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(resources);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountResources(args: {\n accountAddress: AccountAddressInput;\n options?: PaginationArgs & LedgerVersionArg;\n }): Promise<MoveResource[]> {\n return getResources({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries a specific account resource given an account address and resource type.\n *\n * @template T - The typed output of the resource.\n * @param args.accountAddress - The Aptos account address to query.\n * @param args.resourceType - The string representation of an on-chain Move struct type, e.g., \"0x1::aptos_coin::AptosCoin\".\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n * @returns The account resource of the specified type.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the account resource for a specific account address and resource type\n * const resource = await aptos.getAccountResource({\n * accountAddress: \"0x1\", // replace with a real account address\n * resourceType: \"0x1::aptos_coin::AptosCoin\"\n * });\n *\n * console.log(resource);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountResource<T extends {} = any>(args: {\n accountAddress: AccountAddressInput;\n resourceType: MoveStructId;\n options?: LedgerVersionArg;\n }): Promise<T> {\n return getResource<T>({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Looks up the account address for a given authentication key, handling both rotated and non-rotated keys.\n *\n * @param args.authenticationKey - The authentication key for which to look up the account address.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.ledgerVersion - The ledger version to query; if not provided, it will get the latest version.\n * @returns Promise<AccountAddress> - The account address associated with the authentication key.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Look up the original account address for a given authentication key\n * const accountAddress = await aptos.lookupOriginalAccountAddress({\n * authenticationKey: \"0x1\", // replace with a real authentication key\n * });\n *\n * console.log(\"Original Account Address:\", accountAddress);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async lookupOriginalAccountAddress(args: {\n authenticationKey: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: LedgerVersionArg;\n }): Promise<AccountAddress> {\n return lookupOriginalAccountAddress({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Queries the current count of tokens owned by a specified account.\n *\n * @param args - The parameters for the query.\n * @param args.accountAddress - The account address to query the token count for.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @returns The current count of tokens owned by the account.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the count of tokens owned by the account\n * const tokensCount = await aptos.getAccountTokensCount({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(`Tokens Count: ${tokensCount}`);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountTokensCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.ACCOUNT_TRANSACTION_PROCESSOR,\n });\n return getAccountTokensCount({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries the tokens currently owned by a specified account, including NFTs and fungible tokens.\n * If desired, you can filter the results by a specific token standard.\n *\n * @param args.accountAddress The account address for which to retrieve owned tokens.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @param args.options.tokenStandard Optional filter for the NFT standard to query for.\n * @param args.options.offset Optional number to start returning results from.\n * @param args.options.limit Optional number of results to return.\n * @param args.options.orderBy Optional order to sort the tokens by.\n * @returns An array of tokens with their respective data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the tokens owned by a specific account\n * const accountOwnedTokens = await aptos.getAccountOwnedTokens({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * limit: 10, // specify how many tokens to return\n * orderBy: \"created_at\", // specify the order of the results\n * },\n * });\n *\n * console.log(accountOwnedTokens);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountOwnedTokens(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensQueryResponse[0]>;\n }): Promise<GetAccountOwnedTokensQueryResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getAccountOwnedTokens({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries all current tokens of a specific collection that an account owns by the collection address.\n * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.\n * If you want to get only the token from a specific standard, you can pass an optional tokenStandard parameter.\n *\n * @param args.accountAddress - The account address we want to get the tokens for.\n * @param args.collectionAddress - The address of the collection being queried.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to, before querying.\n * @param args.options.tokenStandard - The NFT standard to query for.\n * @param args.options.offset - The number token to start returning results from.\n * @param args.options.limit - The number of results to return.\n * @param args.options.orderBy - The order to sort the tokens by.\n * @returns Tokens array with the token data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get tokens owned by a specific account in a specific collection\n * const accountOwnedTokens = await aptos.getAccountOwnedTokensFromCollectionAddress({\n * accountAddress: \"0x1\", // replace with a real account address\n * collectionAddress: \"0x2\", // replace with a real collection address\n * });\n *\n * console.log(accountOwnedTokens);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountOwnedTokensFromCollectionAddress(args: {\n accountAddress: AccountAddressInput;\n collectionAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountOwnedTokensFromCollectionResponse[0]>;\n }): Promise<GetAccountOwnedTokensFromCollectionResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getAccountOwnedTokensFromCollectionAddress({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries for all collections that an account currently has tokens for, including NFTs, fungible tokens, and soulbound tokens.\n * If you want to filter by a specific token standard, you can pass an optional tokenStandard parameter.\n *\n * @param args.accountAddress - The account address we want to get the collections for.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.tokenStandard - The NFT standard to query for.\n * @param args.options.offset - The number of the collection to start returning results from.\n * @param args.options.limit - The number of results to return.\n * @param args.options.orderBy - The order to sort the tokens by.\n * @returns Collections array with the collections data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get account collections with owned tokens for a specific account\n * const accountCollectionsWithOwnedTokens = await aptos.getAccountCollectionsWithOwnedTokens({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * tokenStandard: \"NFT\", // specify the token standard if needed\n * limit: 10, // specify the number of results to return\n * },\n * });\n *\n * console.log(accountCollectionsWithOwnedTokens);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCollectionsWithOwnedTokens(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: TokenStandardArg & PaginationArgs & OrderByArg<GetAccountCollectionsWithOwnedTokenResponse[0]>;\n }): Promise<GetAccountCollectionsWithOwnedTokenResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.TOKEN_V2_PROCESSOR,\n });\n return getAccountCollectionsWithOwnedTokens({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Queries the current count of transactions submitted by an account.\n *\n * @param args - The parameters for the query.\n * @param args.accountAddress - The account address we want to get the total count for.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @returns Current count of transactions made by an account.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the count of transactions for a specific account\n * const accountTransactionsCount = await aptos.getAccountTransactionsCount({\n * accountAddress: \"0x1\", // replace with a real account address\n * minimumLedgerVersion: 1, // specify your own minimum ledger version if needed\n * });\n *\n * console.log(accountTransactionsCount);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountTransactionsCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.ACCOUNT_TRANSACTION_PROCESSOR,\n });\n return getAccountTransactionsCount({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Retrieves the coins data for a specified account.\n *\n * @param args.accountAddress - The account address for which to retrieve the coin's data.\n * @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.\n * @param args.options.offset - Optional. The number of coins to start returning results from.\n * @param args.options.limit - Optional. The number of results to return.\n * @param args.options.orderBy - Optional. The order to sort the coins by.\n * @param args.options.where - Optional. Filter the results by specific criteria.\n * @returns An array containing the coins data for the specified account.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Fetching coins data for a specific account\n * const accountCoinsData = await aptos.getAccountCoinsData({\n * accountAddress: \"0x1\", // replace with a real account address\n * options: {\n * limit: 10, // specify the number of results to return\n * orderBy: { asset_type: \"asc\" }, // specify the order of results\n * },\n * });\n *\n * console.log(accountCoinsData);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCoinsData(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs &\n OrderByArg<GetAccountCoinsDataResponse[0]> &\n WhereArg<CurrentFungibleAssetBalancesBoolExp>;\n }): Promise<GetAccountCoinsDataResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getAccountCoinsData({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Retrieves the current count of an account's coins aggregated across all types.\n *\n * @param args The parameters for the account coins count query.\n * @param args.accountAddress The account address we want to get the total count for.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @returns The current count of the aggregated coins for the specified account.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Getting the account coins count for a specific account\n * const accountCoinsCount = await aptos.getAccountCoinsCount({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(\"Account Coins Count:\", accountCoinsCount);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCoinsCount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.FUNGIBLE_ASSET_PROCESSOR,\n });\n return getAccountCoinsCount({ aptosConfig: this.config, ...args });\n }\n\n /**\n * Retrieves the current amount of APT for a specified account.\n *\n * @param args The arguments for the account query.\n * @param args.accountAddress The account address for which to retrieve the APT amount.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @returns The current amount of APT for the specified account.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the APT amount for a specific account\n * const accountAPTAmount = await aptos.getAccountAPTAmount({ accountAddress: \"0x1\" }); // replace with a real account address\n * console.log(\"Account APT Amount:\", accountAPTAmount);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountAPTAmount(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n return this.getAccountCoinAmount({ coinType: APTOS_COIN, faMetadataAddress: APTOS_FA, ...args });\n }\n\n /**\n * Queries the current amount of a specified coin held by an account.\n *\n * @param args The parameters for querying the account's coin amount.\n * @param args.accountAddress The account address to query for the coin amount.\n * @param args.coinType The coin type to query. Note: If not provided, it may be automatically populated if `faMetadataAddress`\n * is specified.\n * @param args.faMetadataAddress The fungible asset metadata address to query. Note: If not provided, it may be automatically\n * populated if `coinType` is specified.\n * @param args.minimumLedgerVersion Not used anymore, here for backward compatibility\n * see https://github.com/aptos-labs/aptos-ts-sdk/pull/519, will be removed in the near future.\n * Optional ledger version to sync up to before querying.\n * @returns The current amount of the specified coin held by the account.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Query the account's coin amount for a specific coin type\n * const accountCoinAmount = await aptos.getAccountCoinAmount({\n * accountAddress: \"0x1\", // replace with a real account address\n * coinType: \"0x1::aptos_coin::AptosCoin\" // specify the coin type\n * });\n *\n * console.log(`Account coin amount: ${accountCoinAmount}`);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountCoinAmount(args: {\n accountAddress: AccountAddressInput;\n coinType?: MoveStructId;\n faMetadataAddress?: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n }): Promise<number> {\n const { accountAddress, coinType, faMetadataAddress, minimumLedgerVersion } = args;\n\n if (minimumLedgerVersion) {\n // eslint-disable-next-line no-console\n console.warn(\n `minimumLedgerVersion is not used anymore, here for backward \n compatibility see https://github.com/aptos-labs/aptos-ts-sdk/pull/519, \n will be removed in the near future`,\n );\n }\n // Attempt to populate the CoinType field if the FA address is provided.\n // We cannot do this internally due to dependency cycles issue.\n let coinAssetType: MoveStructId | undefined = coinType;\n if (coinType === undefined && faMetadataAddress !== undefined) {\n coinAssetType = await memoizeAsync(\n async () => {\n try {\n const pairedCoinTypeStruct = (\n await view({\n aptosConfig: this.config,\n payload: { function: \"0x1::coin::paired_coin\", functionArguments: [faMetadataAddress] },\n })\n ).at(0) as { vec: MoveValue[] };\n\n // Check if the Option has a value, and if so, parse the struct\n if (pairedCoinTypeStruct.vec.length > 0 && isEncodedStruct(pairedCoinTypeStruct.vec[0])) {\n return parseEncodedStruct(pairedCoinTypeStruct.vec[0]) as MoveStructId;\n }\n } catch (error) {\n /* No paired coin type found */\n }\n return undefined;\n },\n `coin-mapping-${faMetadataAddress.toString()}`,\n 1000 * 60 * 5, // 5 minutes\n )();\n }\n\n let faAddress: string;\n\n if (coinType !== undefined && faMetadataAddress !== undefined) {\n faAddress = AccountAddress.from(faMetadataAddress).toStringLong();\n } else if (coinType !== undefined && faMetadataAddress === undefined) {\n // TODO Move to a separate function as defined in the AIP for coin migration\n if (coinType === APTOS_COIN) {\n faAddress = AccountAddress.A.toStringLong();\n } else {\n faAddress = createObjectAddress(AccountAddress.A, coinType).toStringLong();\n }\n } else if (coinType === undefined && faMetadataAddress !== undefined) {\n const addr = AccountAddress.from(faMetadataAddress);\n faAddress = addr.toStringLong();\n if (addr === AccountAddress.A) {\n coinAssetType = APTOS_COIN;\n }\n // The paired CoinType should be populated outside of this function in another\n // async call. We cannot do this internally due to dependency cycles issue.\n } else {\n throw new Error(\"Either coinType, faMetadataAddress, or both must be provided\");\n }\n\n // When there is a coin mapping, use that first, otherwise use the fungible asset address\n // TODO: This function's signature at the top, returns number, but it could be greater than can be represented\n if (coinAssetType !== undefined) {\n const [balanceStr] = await view<[string]>({\n aptosConfig: this.config,\n payload: {\n function: \"0x1::coin::balance\",\n typeArguments: [coinAssetType],\n functionArguments: [accountAddress],\n },\n });\n return parseInt(balanceStr, 10);\n }\n const [balanceStr] = await view<[string]>({\n aptosConfig: this.config,\n payload: {\n function: \"0x1::primary_fungible_store::balance\",\n typeArguments: [\"0x1::object::ObjectCore\"],\n functionArguments: [accountAddress, faAddress],\n },\n });\n return parseInt(balanceStr, 10);\n }\n\n /**\n * Queries an account's owned objects.\n *\n * @param args.accountAddress The account address we want to get the objects for.\n * @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.\n * @param args.options.offset The starting position to start returning results from.\n * @param args.options.limit The number of results to return.\n * @param args.options.orderBy The order to sort the objects by.\n * @returns Objects array with the object data.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Get the objects owned by the specified account\n * const accountOwnedObjects = await aptos.getAccountOwnedObjects({\n * accountAddress: \"0x1\", // replace with a real account address\n * minimumLedgerVersion: 1, // optional, specify if needed\n * options: {\n * offset: 0, // optional, specify if needed\n * limit: 10, // optional, specify if needed\n * orderBy: \"created_at\", // optional, specify if needed\n * },\n * });\n *\n * console.log(accountOwnedObjects);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async getAccountOwnedObjects(args: {\n accountAddress: AccountAddressInput;\n minimumLedgerVersion?: AnyNumber;\n options?: PaginationArgs & OrderByArg<GetObjectDataQueryResponse[0]>;\n }): Promise<GetObjectDataQueryResponse> {\n await waitForIndexerOnVersion({\n config: this.config,\n minimumLedgerVersion: args.minimumLedgerVersion,\n processorType: ProcessorType.DEFAULT,\n });\n return getAccountOwnedObjects({\n aptosConfig: this.config,\n ...args,\n });\n }\n\n /**\n * Derives an account by providing a private key. This function resolves the provided private key type and derives the public\n * key from it.\n *\n * If the privateKey is a Secp256k1 type, it derives the account using the derived public key and auth key using the SingleKey\n * scheme locally.\n * If the privateKey is an ED25519 type, it looks up the authentication key on chain to determine whether it is a Legacy ED25519\n * key or a Unified ED25519 key, and then derives the account based on that.\n *\n * @param args - The arguments for deriving the account.\n * @param args.privateKey - An account private key.\n * @returns The derived Account type.\n *\n * @example\n * ```typescript\n * import { Aptos, AptosConfig, Network, Ed25519PrivateKey } from \"@aptos-labs/ts-sdk\";\n *\n * const config = new AptosConfig({ network: Network.TESTNET });\n * const aptos = new Aptos(config);\n *\n * async function runExample() {\n * // Deriving an account from a private key\n * const account = await aptos.deriveAccountFromPrivateKey({\n * privateKey: new Ed25519PrivateKey(\"0x123\") // replace with a real private key\n * });\n *\n * console.log(account);\n * }\n * runExample().catch(console.error);\n * ```\n * @group Account\n */\n async deriveAccountFromPrivateKey(args: { privateKey: PrivateKey }): Promise<AccountModule> {\n return deriveAccountFromPrivateKey({ aptosConfig: this.config, ...args });\n }\n}\n"],"mappings":"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","names":["Account","config","AccountAbstraction","args","getInfo","getModules","getModule","getTransactions","getResources","getResource","lookupOriginalAccountAddress","waitForIndexerOnVersion","getAccountTokensCount","getAccountOwnedTokens","getAccountOwnedTokensFromCollectionAddress","getAccountCollectionsWithOwnedTokens","getAccountTransactionsCount","getAccountCoinsData","getAccountCoinsCount","APTOS_COIN","APTOS_FA","accountAddress","coinType","faMetadataAddress","minimumLedgerVersion","coinAssetType","memoizeAsync","pairedCoinTypeStruct","view","isEncodedStruct","parseEncodedStruct","faAddress","AccountAddress","createObjectAddress","addr","balanceStr","getAccountOwnedObjects","deriveAccountFromPrivateKey"]}
@@ -1,2 +0,0 @@
1
- import{a as d}from"./chunk-DPW6ELCQ.mjs";import{a as x}from"./chunk-ROT6S6BM.mjs";import{b}from"./chunk-EMURYYVO.mjs";import{a as U}from"./chunk-WCMW2L3P.mjs";import{d as A,f as v,g as S,h as E,i as H,j as P}from"./chunk-C3Q23D22.mjs";import{a as K}from"./chunk-FN4C3CKC.mjs";import{a as p}from"./chunk-EBMEXURY.mjs";import{b as o}from"./chunk-STY74NUA.mjs";import{ed25519 as y}from"@noble/curves/ed25519";var m=[237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16];function T(I){let e=I.toUint8Array().slice(32);for(let t=m.length-1;t>=0;t-=1){if(e[t]<m[t])return!0;if(e[t]>m[t])return!1}return!1}var n=class n extends b{constructor(e){super();let t=o.fromHexInput(e);if(t.toUint8Array().length!==n.LENGTH)throw new Error(`PublicKey length should be ${n.LENGTH}`);this.key=t}verifySignature(e){let{message:t,signature:i}=e;if(!T(i))return!1;let a=d(t),c=o.fromHexInput(a).toUint8Array(),u=i.toUint8Array(),l=this.key.toUint8Array();return y.verify(u,c,l)}authKey(){return K.fromSchemeAndBytes({scheme:0,input:this.toUint8Array()})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new n(t)}static isPublicKey(e){return e instanceof n}static isInstance(e){return"key"in e&&e.key?.data?.length===n.LENGTH}};n.LENGTH=32;var f=n,r=class r extends p{constructor(e,t){super();let i=x.parseHexInput(e,"ed25519",t);if(i.toUint8Array().length!==r.LENGTH)throw new Error(`PrivateKey length should be ${r.LENGTH}`);this.signingKey=i}static generate(){let e=y.utils.randomPrivateKey();return new r(e,!1)}static fromDerivationPath(e,t){if(!v(e))throw new Error(`Invalid derivation path ${e}`);return r.fromDerivationPathInner(e,P(t))}static fromDerivationPathInner(e,t,i=A){let{key:a,chainCode:c}=S(r.SLIP_0010_SEED,t),u=H(e).map(g=>parseInt(g,10)),{key:l}=u.reduce((g,w)=>E(g,w+i),{key:a,chainCode:c});return new r(l,!1)}publicKey(){let e=y.getPublicKey(this.signingKey.toUint8Array());return new f(e)}sign(e){let t=d(e),i=o.fromHexInput(t).toUint8Array(),a=y.sign(i,this.signingKey.toUint8Array());return new h(a)}toUint8Array(){return this.signingKey.toUint8Array()}toString(){return this.toHexString()}toHexString(){return this.signingKey.toString()}toAIP80String(){return x.formatPrivateKey(this.signingKey.toString(),"ed25519")}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new r(t,!1)}static isPrivateKey(e){return e instanceof r}};r.LENGTH=32,r.SLIP_0010_SEED="ed25519 seed";var z=r,s=class s extends U{constructor(e){super();let t=o.fromHexInput(e);if(t.toUint8Array().length!==s.LENGTH)throw new Error(`Signature length should be ${s.LENGTH}`);this.data=t}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new s(t)}};s.LENGTH=64;var h=s;export{T as a,f as b,z as c,h as d};
2
- //# sourceMappingURL=chunk-TM6IKHMX.mjs.map