@aptos-labs/ts-sdk 1.8.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/dist/browser/index.d.ts +1131 -989
  2. package/dist/browser/index.global.js +30 -30
  3. package/dist/browser/index.global.js.map +1 -1
  4. package/dist/common/index.d.ts +1131 -989
  5. package/dist/common/index.js +25 -25
  6. package/dist/common/index.js.map +1 -1
  7. package/dist/esm/api/account.d.mts +12 -6
  8. package/dist/esm/api/account.mjs +1 -1
  9. package/dist/esm/api/ans.d.mts +11 -12
  10. package/dist/esm/api/ans.mjs +1 -1
  11. package/dist/esm/api/aptos.d.mts +13 -14
  12. package/dist/esm/api/aptos.mjs +1 -1
  13. package/dist/esm/api/aptosConfig.mjs +1 -1
  14. package/dist/esm/api/coin.d.mts +13 -13
  15. package/dist/esm/api/coin.mjs +1 -1
  16. package/dist/esm/api/digitalAsset.d.mts +20 -10
  17. package/dist/esm/api/digitalAsset.mjs +1 -1
  18. package/dist/esm/api/event.mjs +1 -1
  19. package/dist/esm/api/faucet.mjs +1 -1
  20. package/dist/esm/api/fungibleAsset.d.mts +9 -10
  21. package/dist/esm/api/fungibleAsset.mjs +1 -1
  22. package/dist/esm/api/general.mjs +1 -1
  23. package/dist/esm/api/index.d.mts +13 -14
  24. package/dist/esm/api/index.mjs +1 -1
  25. package/dist/esm/api/staking.mjs +1 -1
  26. package/dist/esm/api/transaction.d.mts +5 -6
  27. package/dist/esm/api/transaction.mjs +1 -1
  28. package/dist/esm/api/transactionSubmission/build.d.mts +8 -8
  29. package/dist/esm/api/transactionSubmission/build.mjs +1 -1
  30. package/dist/esm/api/transactionSubmission/management.d.mts +11 -12
  31. package/dist/esm/api/transactionSubmission/management.mjs +1 -1
  32. package/dist/esm/api/transactionSubmission/sign.d.mts +11 -12
  33. package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
  34. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  35. package/dist/esm/api/transactionSubmission/simulate.d.mts +11 -11
  36. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
  37. package/dist/esm/api/transactionSubmission/submit.d.mts +6 -6
  38. package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
  39. package/dist/esm/api/utils.mjs +1 -1
  40. package/dist/esm/{chunk-S64WKSMI.mjs → chunk-2E2JOGE5.mjs} +2 -2
  41. package/dist/esm/chunk-3EUOBVCT.mjs +2 -0
  42. package/dist/esm/{chunk-SRZTA6QH.mjs.map → chunk-3EUOBVCT.mjs.map} +1 -1
  43. package/dist/esm/{chunk-4OI7MPFH.mjs → chunk-52RTAMN7.mjs} +2 -2
  44. package/dist/esm/chunk-7BDYKJXX.mjs +2 -0
  45. package/dist/esm/chunk-7BDYKJXX.mjs.map +1 -0
  46. package/dist/esm/{chunk-R56OJ4XC.mjs → chunk-7U36LMP4.mjs} +2 -2
  47. package/dist/esm/{chunk-NWRKJFHV.mjs → chunk-ARIC32W7.mjs} +2 -2
  48. package/dist/esm/{chunk-SPOHAEHR.mjs → chunk-B7M3OWHV.mjs} +2 -2
  49. package/dist/esm/{chunk-6SRENFWH.mjs → chunk-BBUAAJRA.mjs} +2 -2
  50. package/dist/esm/chunk-C3HM7HQP.mjs +2 -0
  51. package/dist/esm/chunk-C3HM7HQP.mjs.map +1 -0
  52. package/dist/esm/{chunk-PMWH5IGI.mjs → chunk-CHA5DSSD.mjs} +2 -2
  53. package/dist/esm/chunk-DE5OOOVY.mjs +2 -0
  54. package/dist/esm/{chunk-MEPX7Z2Z.mjs.map → chunk-DE5OOOVY.mjs.map} +1 -1
  55. package/dist/esm/{chunk-JJ6Y35DF.mjs → chunk-DGOT2VR5.mjs} +2 -2
  56. package/dist/esm/{chunk-EUHPML5E.mjs → chunk-EF2F7NWO.mjs} +2 -2
  57. package/dist/esm/{chunk-FRLPX47J.mjs → chunk-EQZ757ES.mjs} +2 -2
  58. package/dist/esm/{chunk-Y4AKS4CY.mjs → chunk-F67Y7YH6.mjs} +2 -2
  59. package/dist/esm/{chunk-KJGQ4ILY.mjs → chunk-FVMVV4V3.mjs} +2 -2
  60. package/dist/esm/chunk-FWDKABRW.mjs +2 -0
  61. package/dist/esm/chunk-FWDKABRW.mjs.map +1 -0
  62. package/dist/esm/chunk-G62HQC77.mjs +2 -0
  63. package/dist/esm/chunk-G62HQC77.mjs.map +1 -0
  64. package/dist/esm/{chunk-V2FPYAK7.mjs → chunk-GQOOXOTN.mjs} +2 -2
  65. package/dist/esm/chunk-GRJJBGHT.mjs +2 -0
  66. package/dist/esm/chunk-GRJJBGHT.mjs.map +1 -0
  67. package/dist/esm/chunk-HEPV52CH.mjs +2 -0
  68. package/dist/esm/chunk-HEPV52CH.mjs.map +1 -0
  69. package/dist/esm/{chunk-GD4ULEBC.mjs → chunk-I3TCHVQQ.mjs} +2 -2
  70. package/dist/esm/{chunk-JQVT2K7G.mjs → chunk-ILJWEPDW.mjs} +2 -2
  71. package/dist/esm/{chunk-Q3HAJVCM.mjs → chunk-INORE66K.mjs} +2 -2
  72. package/dist/esm/{chunk-PIXE7MN5.mjs → chunk-J6MWD4XN.mjs} +2 -2
  73. package/dist/esm/{chunk-ENKMOALS.mjs → chunk-JEHR6GKW.mjs} +2 -2
  74. package/dist/esm/chunk-JEHR6GKW.mjs.map +1 -0
  75. package/dist/esm/chunk-KUX6GQ2E.mjs +1 -0
  76. package/dist/esm/{chunk-ENDUXRTK.mjs → chunk-KWJTVJ7C.mjs} +2 -2
  77. package/dist/esm/{chunk-W4UDMBMU.mjs → chunk-LLL2LFYH.mjs} +2 -2
  78. package/dist/esm/chunk-LMXP3JUU.mjs +2 -0
  79. package/dist/esm/chunk-LMXP3JUU.mjs.map +1 -0
  80. package/dist/esm/{chunk-2WFMD6C6.mjs → chunk-N65SOKJQ.mjs} +2 -2
  81. package/dist/esm/{chunk-Q5HK3U64.mjs → chunk-NL3XVNS5.mjs} +2 -2
  82. package/dist/esm/{chunk-M3WNE7MU.mjs → chunk-NURFZOR4.mjs} +2 -2
  83. package/dist/esm/{chunk-AFPJ2XXN.mjs → chunk-OG56TYZE.mjs} +2 -2
  84. package/dist/esm/chunk-Q6WOHF4A.mjs +2 -0
  85. package/dist/esm/chunk-Q6WOHF4A.mjs.map +1 -0
  86. package/dist/esm/chunk-QA4XWNIH.mjs +2 -0
  87. package/dist/esm/chunk-QA4XWNIH.mjs.map +1 -0
  88. package/dist/esm/chunk-QE4ASJ5K.mjs +1 -0
  89. package/dist/esm/chunk-QR72RXBS.mjs +2 -0
  90. package/dist/esm/chunk-QR72RXBS.mjs.map +1 -0
  91. package/dist/esm/{chunk-XBVORX5O.mjs → chunk-R4VJDSIP.mjs} +2 -2
  92. package/dist/esm/{chunk-O57QZZF2.mjs → chunk-S2F6CSH4.mjs} +2 -2
  93. package/dist/esm/chunk-S2F6CSH4.mjs.map +1 -0
  94. package/dist/esm/{chunk-2H5Z5EHH.mjs → chunk-TN5BUH4F.mjs} +2 -2
  95. package/dist/esm/chunk-TNVR7SNR.mjs +2 -0
  96. package/dist/esm/chunk-TNVR7SNR.mjs.map +1 -0
  97. package/dist/esm/chunk-TX7UK75Q.mjs +2 -0
  98. package/dist/esm/chunk-TX7UK75Q.mjs.map +1 -0
  99. package/dist/esm/{chunk-VPQ46CAO.mjs → chunk-UIUSDBCL.mjs} +2 -2
  100. package/dist/esm/{chunk-4M46AWXX.mjs → chunk-UMLDKLDL.mjs} +2 -2
  101. package/dist/esm/chunk-UVSRX4SV.mjs +1 -0
  102. package/dist/esm/{chunk-2DNPRIS5.mjs → chunk-VEVBHH3M.mjs} +2 -2
  103. package/dist/esm/{chunk-QGIJNA37.mjs → chunk-VMXBMAYK.mjs} +2 -2
  104. package/dist/esm/chunk-WKUXBIYB.mjs +2 -0
  105. package/dist/esm/chunk-WKUXBIYB.mjs.map +1 -0
  106. package/dist/esm/chunk-WME5D6YR.mjs +2 -0
  107. package/dist/esm/chunk-WME5D6YR.mjs.map +1 -0
  108. package/dist/esm/chunk-WTHNSNAX.mjs +2 -0
  109. package/dist/esm/chunk-WTHNSNAX.mjs.map +1 -0
  110. package/dist/esm/{chunk-GD5TZLBF.mjs → chunk-X5C3LYI7.mjs} +2 -2
  111. package/dist/esm/chunk-XKD7W5NO.mjs +2 -0
  112. package/dist/esm/{chunk-XZYPAQCU.mjs.map → chunk-XKD7W5NO.mjs.map} +1 -1
  113. package/dist/esm/{chunk-QRQAR6XO.mjs → chunk-XTPFQ4MH.mjs} +2 -2
  114. package/dist/esm/{chunk-LATJGGVX.mjs → chunk-Y5AJLNUD.mjs} +2 -2
  115. package/dist/esm/chunk-YDAA4RG4.mjs +2 -0
  116. package/dist/esm/chunk-YDAA4RG4.mjs.map +1 -0
  117. package/dist/esm/{chunk-VKZCIGKY.mjs → chunk-YR2R3LW4.mjs} +2 -2
  118. package/dist/esm/chunk-YZZO6VDC.mjs +2 -0
  119. package/dist/esm/chunk-YZZO6VDC.mjs.map +1 -0
  120. package/dist/esm/client/core.mjs +1 -1
  121. package/dist/esm/client/get.mjs +1 -1
  122. package/dist/esm/client/index.mjs +1 -1
  123. package/dist/esm/client/post.mjs +1 -1
  124. package/dist/esm/core/account/Account.d.mts +20 -0
  125. package/dist/esm/core/account/Account.mjs +2 -0
  126. package/dist/esm/core/account/Ed25519Account.d.mts +20 -0
  127. package/dist/esm/core/account/Ed25519Account.mjs +2 -0
  128. package/dist/esm/core/account/SingleKeyAccount.d.mts +20 -0
  129. package/dist/esm/core/account/SingleKeyAccount.mjs +2 -0
  130. package/dist/esm/core/account/SingleKeyAccount.mjs.map +1 -0
  131. package/dist/esm/core/account/index.d.mts +305 -0
  132. package/dist/esm/core/account/index.mjs +2 -0
  133. package/dist/esm/core/account/index.mjs.map +1 -0
  134. package/dist/esm/core/authenticationKey.d.mts +7 -68
  135. package/dist/esm/core/authenticationKey.mjs +1 -1
  136. package/dist/esm/core/crypto/ed25519.d.mts +49 -61
  137. package/dist/esm/core/crypto/ed25519.mjs +1 -1
  138. package/dist/esm/core/crypto/index.d.mts +9 -6
  139. package/dist/esm/core/crypto/index.mjs +1 -1
  140. package/dist/esm/core/crypto/multiEd25519.d.mts +17 -14
  141. package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
  142. package/dist/esm/core/crypto/multiKey.d.mts +70 -17
  143. package/dist/esm/core/crypto/multiKey.mjs +1 -1
  144. package/dist/esm/core/crypto/privateKey.d.mts +35 -0
  145. package/dist/esm/core/crypto/privateKey.mjs +2 -0
  146. package/dist/esm/core/crypto/privateKey.mjs.map +1 -0
  147. package/dist/esm/core/crypto/publicKey.d.mts +13 -0
  148. package/dist/esm/core/crypto/publicKey.mjs +2 -0
  149. package/dist/esm/core/crypto/publicKey.mjs.map +1 -0
  150. package/dist/esm/core/crypto/secp256k1.d.mts +43 -67
  151. package/dist/esm/core/crypto/secp256k1.mjs +1 -1
  152. package/dist/esm/core/crypto/signature.d.mts +28 -0
  153. package/dist/esm/core/crypto/signature.mjs +2 -0
  154. package/dist/esm/core/crypto/signature.mjs.map +1 -0
  155. package/dist/esm/core/crypto/singleKey.d.mts +68 -0
  156. package/dist/esm/core/crypto/singleKey.mjs +2 -0
  157. package/dist/esm/core/crypto/singleKey.mjs.map +1 -0
  158. package/dist/esm/core/index.d.mts +9 -8
  159. package/dist/esm/core/index.mjs +1 -1
  160. package/dist/esm/index.d.mts +8 -8
  161. package/dist/esm/index.mjs +1 -1
  162. package/dist/esm/internal/account.d.mts +10 -4
  163. package/dist/esm/internal/account.mjs +1 -1
  164. package/dist/esm/internal/ans.d.mts +11 -12
  165. package/dist/esm/internal/ans.mjs +1 -1
  166. package/dist/esm/internal/coin.d.mts +12 -12
  167. package/dist/esm/internal/coin.mjs +1 -1
  168. package/dist/esm/internal/digitalAsset.d.mts +17 -14
  169. package/dist/esm/internal/digitalAsset.mjs +1 -1
  170. package/dist/esm/internal/event.d.mts +2 -2
  171. package/dist/esm/internal/event.mjs +1 -1
  172. package/dist/esm/internal/faucet.d.mts +4 -4
  173. package/dist/esm/internal/faucet.mjs +1 -1
  174. package/dist/esm/internal/fungibleAsset.d.mts +10 -11
  175. package/dist/esm/internal/fungibleAsset.mjs +1 -1
  176. package/dist/esm/internal/general.mjs +1 -1
  177. package/dist/esm/internal/staking.d.mts +3 -3
  178. package/dist/esm/internal/staking.mjs +1 -1
  179. package/dist/esm/internal/transaction.mjs +1 -1
  180. package/dist/esm/internal/transactionSubmission.d.mts +12 -13
  181. package/dist/esm/internal/transactionSubmission.mjs +1 -1
  182. package/dist/esm/publicKey-lq5djCIY.d.mts +113 -0
  183. package/dist/esm/transactions/authenticator/account.d.mts +6 -4
  184. package/dist/esm/transactions/authenticator/account.mjs +1 -1
  185. package/dist/esm/transactions/authenticator/index.d.mts +6 -6
  186. package/dist/esm/transactions/authenticator/index.mjs +1 -1
  187. package/dist/esm/transactions/authenticator/transaction.d.mts +5 -5
  188. package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
  189. package/dist/esm/transactions/index.d.mts +6 -7
  190. package/dist/esm/transactions/index.mjs +1 -1
  191. package/dist/esm/transactions/instances/index.d.mts +4 -4
  192. package/dist/esm/transactions/instances/index.mjs +1 -1
  193. package/dist/esm/transactions/instances/moduleId.d.mts +1 -1
  194. package/dist/esm/transactions/instances/moduleId.mjs +1 -1
  195. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
  196. package/dist/esm/transactions/instances/rotationProofChallenge.d.mts +2 -1
  197. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
  198. package/dist/esm/transactions/instances/signedTransaction.d.mts +8 -8
  199. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
  200. package/dist/esm/transactions/instances/transactionPayload.d.mts +1 -1
  201. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
  202. package/dist/esm/transactions/management/accountSequenceNumber.d.mts +11 -5
  203. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
  204. package/dist/esm/transactions/management/index.d.mts +11 -12
  205. package/dist/esm/transactions/management/index.mjs +1 -1
  206. package/dist/esm/transactions/management/transactionWorker.d.mts +11 -12
  207. package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
  208. package/dist/esm/transactions/transactionBuilder/helpers.d.mts +10 -10
  209. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
  210. package/dist/esm/transactions/transactionBuilder/index.d.mts +9 -10
  211. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
  212. package/dist/esm/transactions/transactionBuilder/remoteAbi.d.mts +8 -8
  213. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
  214. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +9 -10
  215. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
  216. package/dist/esm/transactions/typeTag/index.mjs +1 -1
  217. package/dist/esm/transactions/typeTag/parser.mjs +1 -1
  218. package/dist/esm/transactions/types.d.mts +9 -9
  219. package/dist/esm/utils/const.d.mts +1 -2
  220. package/dist/esm/utils/const.mjs +1 -1
  221. package/dist/esm/utils/index.d.mts +1 -1
  222. package/dist/esm/utils/index.mjs +1 -1
  223. package/dist/esm/version.d.mts +1 -1
  224. package/dist/esm/version.mjs +1 -1
  225. package/package.json +1 -1
  226. package/src/api/aptosConfig.ts +2 -2
  227. package/src/api/digitalAsset.ts +20 -0
  228. package/src/core/account/Account.ts +245 -0
  229. package/src/core/account/Ed25519Account.ts +88 -0
  230. package/src/core/account/SingleKeyAccount.ts +120 -0
  231. package/src/core/account/index.ts +3 -0
  232. package/src/core/authenticationKey.ts +18 -52
  233. package/src/core/crypto/ed25519.ts +118 -104
  234. package/src/core/crypto/index.ts +6 -5
  235. package/src/core/crypto/multiEd25519.ts +98 -44
  236. package/src/core/crypto/multiKey.ts +192 -34
  237. package/src/core/crypto/privateKey.ts +25 -0
  238. package/src/core/crypto/publicKey.ts +52 -0
  239. package/src/core/crypto/secp256k1.ts +108 -111
  240. package/src/core/crypto/signature.ts +46 -0
  241. package/src/core/crypto/singleKey.ts +180 -0
  242. package/src/internal/account.ts +5 -3
  243. package/src/internal/digitalAsset.ts +26 -0
  244. package/src/transactions/authenticator/account.ts +1 -2
  245. package/src/transactions/instances/rotationProofChallenge.ts +1 -1
  246. package/src/transactions/transactionBuilder/transactionBuilder.ts +3 -21
  247. package/src/transactions/types.ts +1 -1
  248. package/src/utils/const.ts +0 -4
  249. package/src/version.ts +1 -1
  250. package/dist/esm/chunk-2QV6HI3M.mjs +0 -2
  251. package/dist/esm/chunk-2QV6HI3M.mjs.map +0 -1
  252. package/dist/esm/chunk-7IGH7N52.mjs +0 -2
  253. package/dist/esm/chunk-7IGH7N52.mjs.map +0 -1
  254. package/dist/esm/chunk-CCUD52OF.mjs +0 -2
  255. package/dist/esm/chunk-CCUD52OF.mjs.map +0 -1
  256. package/dist/esm/chunk-ENKMOALS.mjs.map +0 -1
  257. package/dist/esm/chunk-ERWQOVBF.mjs +0 -2
  258. package/dist/esm/chunk-ERWQOVBF.mjs.map +0 -1
  259. package/dist/esm/chunk-FBFMQZTM.mjs +0 -2
  260. package/dist/esm/chunk-FBFMQZTM.mjs.map +0 -1
  261. package/dist/esm/chunk-FP5DPRYL.mjs +0 -2
  262. package/dist/esm/chunk-FP5DPRYL.mjs.map +0 -1
  263. package/dist/esm/chunk-HHJBCGAQ.mjs +0 -2
  264. package/dist/esm/chunk-HHJBCGAQ.mjs.map +0 -1
  265. package/dist/esm/chunk-I7WRJY7K.mjs +0 -2
  266. package/dist/esm/chunk-I7WRJY7K.mjs.map +0 -1
  267. package/dist/esm/chunk-LHJSG5NE.mjs +0 -2
  268. package/dist/esm/chunk-LHJSG5NE.mjs.map +0 -1
  269. package/dist/esm/chunk-MEPX7Z2Z.mjs +0 -2
  270. package/dist/esm/chunk-O57QZZF2.mjs.map +0 -1
  271. package/dist/esm/chunk-S3FBGS3W.mjs +0 -2
  272. package/dist/esm/chunk-S3FBGS3W.mjs.map +0 -1
  273. package/dist/esm/chunk-SBMJNU2O.mjs +0 -2
  274. package/dist/esm/chunk-SBMJNU2O.mjs.map +0 -1
  275. package/dist/esm/chunk-SRZTA6QH.mjs +0 -2
  276. package/dist/esm/chunk-UCHGKGCF.mjs +0 -2
  277. package/dist/esm/chunk-UCHGKGCF.mjs.map +0 -1
  278. package/dist/esm/chunk-UIVJXLRM.mjs +0 -1
  279. package/dist/esm/chunk-V6JFR2CB.mjs +0 -2
  280. package/dist/esm/chunk-V6JFR2CB.mjs.map +0 -1
  281. package/dist/esm/chunk-XZYPAQCU.mjs +0 -2
  282. package/dist/esm/chunk-YL2EDK5M.mjs +0 -2
  283. package/dist/esm/chunk-YL2EDK5M.mjs.map +0 -1
  284. package/dist/esm/chunk-ZFIMVSCR.mjs +0 -2
  285. package/dist/esm/chunk-ZFIMVSCR.mjs.map +0 -1
  286. package/dist/esm/core/account.d.mts +0 -184
  287. package/dist/esm/core/account.mjs +0 -2
  288. package/dist/esm/core/crypto/anyPublicKey.d.mts +0 -59
  289. package/dist/esm/core/crypto/anyPublicKey.mjs +0 -2
  290. package/dist/esm/core/crypto/anySignature.d.mts +0 -31
  291. package/dist/esm/core/crypto/anySignature.mjs +0 -2
  292. package/dist/esm/core/crypto/asymmetricCrypto.d.mts +0 -74
  293. package/dist/esm/core/crypto/asymmetricCrypto.mjs +0 -2
  294. package/src/core/account.ts +0 -282
  295. package/src/core/crypto/anyPublicKey.ts +0 -92
  296. package/src/core/crypto/anySignature.ts +0 -56
  297. package/src/core/crypto/asymmetricCrypto.ts +0 -77
  298. /package/dist/esm/{chunk-S64WKSMI.mjs.map → chunk-2E2JOGE5.mjs.map} +0 -0
  299. /package/dist/esm/{chunk-4OI7MPFH.mjs.map → chunk-52RTAMN7.mjs.map} +0 -0
  300. /package/dist/esm/{chunk-R56OJ4XC.mjs.map → chunk-7U36LMP4.mjs.map} +0 -0
  301. /package/dist/esm/{chunk-NWRKJFHV.mjs.map → chunk-ARIC32W7.mjs.map} +0 -0
  302. /package/dist/esm/{chunk-SPOHAEHR.mjs.map → chunk-B7M3OWHV.mjs.map} +0 -0
  303. /package/dist/esm/{chunk-6SRENFWH.mjs.map → chunk-BBUAAJRA.mjs.map} +0 -0
  304. /package/dist/esm/{chunk-PMWH5IGI.mjs.map → chunk-CHA5DSSD.mjs.map} +0 -0
  305. /package/dist/esm/{chunk-JJ6Y35DF.mjs.map → chunk-DGOT2VR5.mjs.map} +0 -0
  306. /package/dist/esm/{chunk-EUHPML5E.mjs.map → chunk-EF2F7NWO.mjs.map} +0 -0
  307. /package/dist/esm/{chunk-FRLPX47J.mjs.map → chunk-EQZ757ES.mjs.map} +0 -0
  308. /package/dist/esm/{chunk-Y4AKS4CY.mjs.map → chunk-F67Y7YH6.mjs.map} +0 -0
  309. /package/dist/esm/{chunk-KJGQ4ILY.mjs.map → chunk-FVMVV4V3.mjs.map} +0 -0
  310. /package/dist/esm/{chunk-V2FPYAK7.mjs.map → chunk-GQOOXOTN.mjs.map} +0 -0
  311. /package/dist/esm/{chunk-GD4ULEBC.mjs.map → chunk-I3TCHVQQ.mjs.map} +0 -0
  312. /package/dist/esm/{chunk-JQVT2K7G.mjs.map → chunk-ILJWEPDW.mjs.map} +0 -0
  313. /package/dist/esm/{chunk-Q3HAJVCM.mjs.map → chunk-INORE66K.mjs.map} +0 -0
  314. /package/dist/esm/{chunk-PIXE7MN5.mjs.map → chunk-J6MWD4XN.mjs.map} +0 -0
  315. /package/dist/esm/{chunk-UIVJXLRM.mjs.map → chunk-KUX6GQ2E.mjs.map} +0 -0
  316. /package/dist/esm/{chunk-ENDUXRTK.mjs.map → chunk-KWJTVJ7C.mjs.map} +0 -0
  317. /package/dist/esm/{chunk-W4UDMBMU.mjs.map → chunk-LLL2LFYH.mjs.map} +0 -0
  318. /package/dist/esm/{chunk-2WFMD6C6.mjs.map → chunk-N65SOKJQ.mjs.map} +0 -0
  319. /package/dist/esm/{chunk-Q5HK3U64.mjs.map → chunk-NL3XVNS5.mjs.map} +0 -0
  320. /package/dist/esm/{chunk-M3WNE7MU.mjs.map → chunk-NURFZOR4.mjs.map} +0 -0
  321. /package/dist/esm/{chunk-AFPJ2XXN.mjs.map → chunk-OG56TYZE.mjs.map} +0 -0
  322. /package/dist/esm/{core/account.mjs.map → chunk-QE4ASJ5K.mjs.map} +0 -0
  323. /package/dist/esm/{chunk-XBVORX5O.mjs.map → chunk-R4VJDSIP.mjs.map} +0 -0
  324. /package/dist/esm/{chunk-2H5Z5EHH.mjs.map → chunk-TN5BUH4F.mjs.map} +0 -0
  325. /package/dist/esm/{chunk-VPQ46CAO.mjs.map → chunk-UIUSDBCL.mjs.map} +0 -0
  326. /package/dist/esm/{chunk-4M46AWXX.mjs.map → chunk-UMLDKLDL.mjs.map} +0 -0
  327. /package/dist/esm/{core/crypto/anyPublicKey.mjs.map → chunk-UVSRX4SV.mjs.map} +0 -0
  328. /package/dist/esm/{chunk-2DNPRIS5.mjs.map → chunk-VEVBHH3M.mjs.map} +0 -0
  329. /package/dist/esm/{chunk-QGIJNA37.mjs.map → chunk-VMXBMAYK.mjs.map} +0 -0
  330. /package/dist/esm/{chunk-GD5TZLBF.mjs.map → chunk-X5C3LYI7.mjs.map} +0 -0
  331. /package/dist/esm/{chunk-QRQAR6XO.mjs.map → chunk-XTPFQ4MH.mjs.map} +0 -0
  332. /package/dist/esm/{chunk-LATJGGVX.mjs.map → chunk-Y5AJLNUD.mjs.map} +0 -0
  333. /package/dist/esm/{chunk-VKZCIGKY.mjs.map → chunk-YR2R3LW4.mjs.map} +0 -0
  334. /package/dist/esm/core/{crypto/anySignature.mjs.map → account/Account.mjs.map} +0 -0
  335. /package/dist/esm/core/{crypto/asymmetricCrypto.mjs.map → account/Ed25519Account.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-KJGQ4ILY.mjs";import"../../chunk-ENDUXRTK.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-LHJSG5NE.mjs";import"../../chunk-AFPJ2XXN.mjs";import"../../chunk-SXIFL5DQ.mjs";import"../../chunk-4OI7MPFH.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-O57QZZF2.mjs";import"../../chunk-GD4ULEBC.mjs";import"../../chunk-NWRKJFHV.mjs";import"../../chunk-ERWQOVBF.mjs";import"../../chunk-GD5TZLBF.mjs";import"../../chunk-QRQAR6XO.mjs";import"../../chunk-PJNPLRPR.mjs";import"../../chunk-QKTV6AZ7.mjs";import"../../chunk-7D5LHQNS.mjs";import"../../chunk-IHCIKE42.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ENKMOALS.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-UIVJXLRM.mjs";import"../../chunk-2QV6HI3M.mjs";import"../../chunk-FP5DPRYL.mjs";import"../../chunk-SBMJNU2O.mjs";import"../../chunk-7IGH7N52.mjs";import"../../chunk-UCHGKGCF.mjs";import"../../chunk-FBFMQZTM.mjs";import"../../chunk-ZFIMVSCR.mjs";import"../../chunk-I7WRJY7K.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-F7CR75CJ.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-SRZTA6QH.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-PMWH5IGI.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-JJ6Y35DF.mjs";import"../../chunk-VPQ46CAO.mjs";import"../../chunk-QGIJNA37.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-MEPX7Z2Z.mjs";import"../../chunk-HHJBCGAQ.mjs";import"../../chunk-77SKA4HT.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Build};
1
+ import{a}from"../../chunk-FVMVV4V3.mjs";import"../../chunk-KWJTVJ7C.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-G62HQC77.mjs";import"../../chunk-OG56TYZE.mjs";import"../../chunk-SXIFL5DQ.mjs";import"../../chunk-52RTAMN7.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-I3TCHVQQ.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-ARIC32W7.mjs";import"../../chunk-X5C3LYI7.mjs";import"../../chunk-XTPFQ4MH.mjs";import"../../chunk-PJNPLRPR.mjs";import"../../chunk-QKTV6AZ7.mjs";import"../../chunk-7D5LHQNS.mjs";import"../../chunk-IHCIKE42.mjs";import"../../chunk-S2F6CSH4.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-JEHR6GKW.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-TNVR7SNR.mjs";import"../../chunk-WTHNSNAX.mjs";import"../../chunk-GRJJBGHT.mjs";import"../../chunk-YZZO6VDC.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-C3HM7HQP.mjs";import"../../chunk-Q6WOHF4A.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-TX7UK75Q.mjs";import"../../chunk-QR72RXBS.mjs";import"../../chunk-7BDYKJXX.mjs";import"../../chunk-WKUXBIYB.mjs";import"../../chunk-WME5D6YR.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-LMXP3JUU.mjs";import"../../chunk-F7CR75CJ.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-3EUOBVCT.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-CHA5DSSD.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-DGOT2VR5.mjs";import"../../chunk-UIUSDBCL.mjs";import"../../chunk-VMXBMAYK.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-DE5OOOVY.mjs";import"../../chunk-77SKA4HT.mjs";import"../../chunk-HEPV52CH.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Build};
2
2
  //# sourceMappingURL=build.mjs.map
@@ -1,6 +1,6 @@
1
1
  import EventEmitter from 'eventemitter3';
2
2
  import { AptosConfig } from '../aptosConfig.mjs';
3
- import { Account } from '../../core/account.mjs';
3
+ import { Account } from '../../core/account/index.mjs';
4
4
  import { TransactionWorkerEvents, TransactionWorker } from '../../transactions/management/transactionWorker.mjs';
5
5
  import { InputGenerateTransactionPayloadData, InputGenerateTransactionOptions } from '../../transactions/types.mjs';
6
6
  import '../../types/index.mjs';
@@ -9,14 +9,20 @@ import '../../types/indexer.mjs';
9
9
  import '../../types/generated/operations.mjs';
10
10
  import '../../types/generated/types.mjs';
11
11
  import '../../utils/const.mjs';
12
- import '../../core/accountAddress.mjs';
12
+ import '../../transactions/authenticator/account.mjs';
13
+ import '../../bcs/deserializer.mjs';
13
14
  import '../../bcs/serializer.mjs';
14
15
  import '../../core/hex.mjs';
15
16
  import '../../core/common.mjs';
16
- import '../../bcs/deserializer.mjs';
17
+ import '../../core/crypto/ed25519.mjs';
18
+ import '../../publicKey-lq5djCIY.mjs';
19
+ import '../../core/accountAddress.mjs';
17
20
  import '../../transactions/instances/transactionArgument.mjs';
18
- import '../../core/authenticationKey.mjs';
19
- import '../../core/crypto/asymmetricCrypto.mjs';
21
+ import '../../core/crypto/signature.mjs';
22
+ import '../../core/crypto/privateKey.mjs';
23
+ import '../../core/crypto/multiEd25519.mjs';
24
+ import '../../core/crypto/multiKey.mjs';
25
+ import '../../core/crypto/singleKey.mjs';
20
26
  import '../../transactions/management/accountSequenceNumber.mjs';
21
27
  import '../../transactions/management/asyncQueue.mjs';
22
28
  import '../../bcs/serializable/moveStructs.mjs';
@@ -28,13 +34,6 @@ import '../../transactions/instances/transactionPayload.mjs';
28
34
  import '../../transactions/instances/identifier.mjs';
29
35
  import '../../transactions/instances/moduleId.mjs';
30
36
  import '../../transactions/typeTag/index.mjs';
31
- import '../../transactions/authenticator/account.mjs';
32
- import '../../core/crypto/anyPublicKey.mjs';
33
- import '../../core/crypto/anySignature.mjs';
34
- import '../../core/crypto/ed25519.mjs';
35
- import '../../core/crypto/secp256k1.mjs';
36
- import '../../core/crypto/multiEd25519.mjs';
37
- import '../../core/crypto/multiKey.mjs';
38
37
 
39
38
  declare class TransactionManagement extends EventEmitter<TransactionWorkerEvents> {
40
39
  account: Account;
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-FRLPX47J.mjs";import"../../chunk-IHYTP2EW.mjs";import"../../chunk-2H5Z5EHH.mjs";import"../../chunk-LATJGGVX.mjs";import"../../chunk-U6Z4FNB7.mjs";import"../../chunk-ENDUXRTK.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-LHJSG5NE.mjs";import"../../chunk-AFPJ2XXN.mjs";import"../../chunk-SXIFL5DQ.mjs";import"../../chunk-4OI7MPFH.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-O57QZZF2.mjs";import"../../chunk-GD4ULEBC.mjs";import"../../chunk-NWRKJFHV.mjs";import"../../chunk-ERWQOVBF.mjs";import"../../chunk-GD5TZLBF.mjs";import"../../chunk-QRQAR6XO.mjs";import"../../chunk-PJNPLRPR.mjs";import"../../chunk-QKTV6AZ7.mjs";import"../../chunk-7D5LHQNS.mjs";import"../../chunk-IHCIKE42.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ENKMOALS.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-UIVJXLRM.mjs";import"../../chunk-2QV6HI3M.mjs";import"../../chunk-FP5DPRYL.mjs";import"../../chunk-SBMJNU2O.mjs";import"../../chunk-7IGH7N52.mjs";import"../../chunk-UCHGKGCF.mjs";import"../../chunk-FBFMQZTM.mjs";import"../../chunk-ZFIMVSCR.mjs";import"../../chunk-I7WRJY7K.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-F7CR75CJ.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-SRZTA6QH.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-PMWH5IGI.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-JJ6Y35DF.mjs";import"../../chunk-VPQ46CAO.mjs";import"../../chunk-QGIJNA37.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-MEPX7Z2Z.mjs";import"../../chunk-HHJBCGAQ.mjs";import"../../chunk-77SKA4HT.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as TransactionManagement};
1
+ import{a}from"../../chunk-EQZ757ES.mjs";import"../../chunk-IHYTP2EW.mjs";import"../../chunk-TN5BUH4F.mjs";import"../../chunk-Y5AJLNUD.mjs";import"../../chunk-U6Z4FNB7.mjs";import"../../chunk-KWJTVJ7C.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-G62HQC77.mjs";import"../../chunk-OG56TYZE.mjs";import"../../chunk-SXIFL5DQ.mjs";import"../../chunk-52RTAMN7.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-I3TCHVQQ.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-ARIC32W7.mjs";import"../../chunk-X5C3LYI7.mjs";import"../../chunk-XTPFQ4MH.mjs";import"../../chunk-PJNPLRPR.mjs";import"../../chunk-QKTV6AZ7.mjs";import"../../chunk-7D5LHQNS.mjs";import"../../chunk-IHCIKE42.mjs";import"../../chunk-S2F6CSH4.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-JEHR6GKW.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-TNVR7SNR.mjs";import"../../chunk-WTHNSNAX.mjs";import"../../chunk-GRJJBGHT.mjs";import"../../chunk-YZZO6VDC.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-C3HM7HQP.mjs";import"../../chunk-Q6WOHF4A.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-TX7UK75Q.mjs";import"../../chunk-QR72RXBS.mjs";import"../../chunk-7BDYKJXX.mjs";import"../../chunk-WKUXBIYB.mjs";import"../../chunk-WME5D6YR.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-LMXP3JUU.mjs";import"../../chunk-F7CR75CJ.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-3EUOBVCT.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-CHA5DSSD.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-DGOT2VR5.mjs";import"../../chunk-UIUSDBCL.mjs";import"../../chunk-VMXBMAYK.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-DE5OOOVY.mjs";import"../../chunk-77SKA4HT.mjs";import"../../chunk-HEPV52CH.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as TransactionManagement};
2
2
  //# sourceMappingURL=management.mjs.map
@@ -1,26 +1,25 @@
1
- import { Account } from '../../core/account.mjs';
2
1
  import { AccountAuthenticator } from '../../transactions/authenticator/account.mjs';
2
+ import { Account } from '../../core/account/index.mjs';
3
3
  import { AnyRawTransaction } from '../../transactions/types.mjs';
4
4
  import { AptosConfig } from '../aptosConfig.mjs';
5
- import '../../core/accountAddress.mjs';
6
- import '../../bcs/serializer.mjs';
7
- import '../../core/hex.mjs';
8
- import '../../core/common.mjs';
5
+ import '../../bcs/deserializer.mjs';
9
6
  import '../../types/index.mjs';
10
7
  import '../../utils/apiEndpoints.mjs';
11
8
  import '../../types/indexer.mjs';
12
9
  import '../../types/generated/operations.mjs';
13
10
  import '../../types/generated/types.mjs';
14
- import '../../bcs/deserializer.mjs';
15
- import '../../transactions/instances/transactionArgument.mjs';
16
- import '../../core/authenticationKey.mjs';
17
- import '../../core/crypto/asymmetricCrypto.mjs';
18
- import '../../core/crypto/anyPublicKey.mjs';
19
- import '../../core/crypto/anySignature.mjs';
11
+ import '../../bcs/serializer.mjs';
12
+ import '../../core/hex.mjs';
13
+ import '../../core/common.mjs';
20
14
  import '../../core/crypto/ed25519.mjs';
21
- import '../../core/crypto/secp256k1.mjs';
15
+ import '../../publicKey-lq5djCIY.mjs';
16
+ import '../../core/accountAddress.mjs';
17
+ import '../../transactions/instances/transactionArgument.mjs';
18
+ import '../../core/crypto/signature.mjs';
19
+ import '../../core/crypto/privateKey.mjs';
22
20
  import '../../core/crypto/multiEd25519.mjs';
23
21
  import '../../core/crypto/multiKey.mjs';
22
+ import '../../core/crypto/singleKey.mjs';
24
23
  import '../../bcs/serializable/moveStructs.mjs';
25
24
  import '../../bcs/serializable/movePrimitives.mjs';
26
25
  import '../../bcs/serializable/fixedBytes.mjs';
@@ -1,2 +1,2 @@
1
- import{e as o}from"../../chunk-ENDUXRTK.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-LHJSG5NE.mjs";import"../../chunk-AFPJ2XXN.mjs";import"../../chunk-SXIFL5DQ.mjs";import"../../chunk-4OI7MPFH.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-O57QZZF2.mjs";import"../../chunk-GD4ULEBC.mjs";import"../../chunk-NWRKJFHV.mjs";import"../../chunk-ERWQOVBF.mjs";import"../../chunk-GD5TZLBF.mjs";import"../../chunk-QRQAR6XO.mjs";import"../../chunk-PJNPLRPR.mjs";import"../../chunk-QKTV6AZ7.mjs";import"../../chunk-7D5LHQNS.mjs";import"../../chunk-IHCIKE42.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ENKMOALS.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-UIVJXLRM.mjs";import"../../chunk-2QV6HI3M.mjs";import"../../chunk-FP5DPRYL.mjs";import"../../chunk-SBMJNU2O.mjs";import"../../chunk-7IGH7N52.mjs";import"../../chunk-UCHGKGCF.mjs";import"../../chunk-FBFMQZTM.mjs";import"../../chunk-ZFIMVSCR.mjs";import"../../chunk-I7WRJY7K.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-F7CR75CJ.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-SRZTA6QH.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-PMWH5IGI.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-JJ6Y35DF.mjs";import"../../chunk-VPQ46CAO.mjs";import"../../chunk-QGIJNA37.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-MEPX7Z2Z.mjs";import"../../chunk-HHJBCGAQ.mjs";import"../../chunk-77SKA4HT.mjs";import"../../chunk-FVA2OPG4.mjs";var a=class{constructor(n){this.config=n}transaction(n){return o({...n})}transactionAsFeePayer(n){let{signer:r,transaction:t}=n;if(!t.feePayerAddress)throw new Error(`Transaction ${t} is not a Fee Payer transaction`);return t.feePayerAddress=r.accountAddress,o({signer:r,transaction:t})}};export{a as Sign};
1
+ import{e as o}from"../../chunk-KWJTVJ7C.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-G62HQC77.mjs";import"../../chunk-OG56TYZE.mjs";import"../../chunk-SXIFL5DQ.mjs";import"../../chunk-52RTAMN7.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-I3TCHVQQ.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-ARIC32W7.mjs";import"../../chunk-X5C3LYI7.mjs";import"../../chunk-XTPFQ4MH.mjs";import"../../chunk-PJNPLRPR.mjs";import"../../chunk-QKTV6AZ7.mjs";import"../../chunk-7D5LHQNS.mjs";import"../../chunk-IHCIKE42.mjs";import"../../chunk-S2F6CSH4.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-JEHR6GKW.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-TNVR7SNR.mjs";import"../../chunk-WTHNSNAX.mjs";import"../../chunk-GRJJBGHT.mjs";import"../../chunk-YZZO6VDC.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-C3HM7HQP.mjs";import"../../chunk-Q6WOHF4A.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-TX7UK75Q.mjs";import"../../chunk-QR72RXBS.mjs";import"../../chunk-7BDYKJXX.mjs";import"../../chunk-WKUXBIYB.mjs";import"../../chunk-WME5D6YR.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-LMXP3JUU.mjs";import"../../chunk-F7CR75CJ.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-3EUOBVCT.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-CHA5DSSD.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-DGOT2VR5.mjs";import"../../chunk-UIUSDBCL.mjs";import"../../chunk-VMXBMAYK.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-DE5OOOVY.mjs";import"../../chunk-77SKA4HT.mjs";import"../../chunk-HEPV52CH.mjs";import"../../chunk-FVA2OPG4.mjs";var a=class{constructor(n){this.config=n}transaction(n){return o({...n})}transactionAsFeePayer(n){let{signer:r,transaction:t}=n;if(!t.feePayerAddress)throw new Error(`Transaction ${t} is not a Fee Payer transaction`);return t.feePayerAddress=r.accountAddress,o({signer:r,transaction:t})}};export{a as Sign};
2
2
  //# sourceMappingURL=sign.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/api/transactionSubmission/sign.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account } from \"../../core\";\nimport { signTransaction } from \"../../internal/transactionSubmission\";\nimport { AccountAuthenticator, AnyRawTransaction } from \"../../transactions\";\nimport { AptosConfig } from \"../aptosConfig\";\n\n/**\n * A class to handle all `Sign` transaction operations\n */\nexport class Sign {\n readonly config: AptosConfig;\n\n constructor(config: AptosConfig) {\n this.config = config;\n }\n\n // eslint-disable-next-line class-methods-use-this\n transaction(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n return signTransaction({\n ...args,\n });\n }\n\n // eslint-disable-next-line class-methods-use-this\n transactionAsFeePayer(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n const { signer, transaction } = args;\n\n // if transaction doesnt hold a \"feePayerAddress\" prop it means\n // this is not a fee payer transaction\n if (!transaction.feePayerAddress) {\n throw new Error(`Transaction ${transaction} is not a Fee Payer transaction`);\n }\n\n // Set the feePayerAddress to the signer account address\n transaction.feePayerAddress = signer.accountAddress;\n\n return signTransaction({\n signer,\n transaction,\n });\n }\n}\n"],"mappings":"y+DAWO,IAAMA,EAAN,KAAW,CAGhB,YAAYC,EAAqB,CAC/B,KAAK,OAASA,CAChB,CAGA,YAAYC,EAAiF,CAC3F,OAAOC,EAAgB,CACrB,GAAGD,CACL,CAAC,CACH,CAGA,sBAAsBA,EAAiF,CACrG,GAAM,CAAE,OAAAE,EAAQ,YAAAC,CAAY,EAAIH,EAIhC,GAAI,CAACG,EAAY,gBACf,MAAM,IAAI,MAAM,eAAeA,CAAW,iCAAiC,EAI7E,OAAAA,EAAY,gBAAkBD,EAAO,eAE9BD,EAAgB,CACrB,OAAAC,EACA,YAAAC,CACF,CAAC,CACH,CACF","names":["Sign","config","args","signTransaction","signer","transaction"]}
1
+ {"version":3,"sources":["../../../../src/api/transactionSubmission/sign.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Account } from \"../../core\";\nimport { signTransaction } from \"../../internal/transactionSubmission\";\nimport { AccountAuthenticator, AnyRawTransaction } from \"../../transactions\";\nimport { AptosConfig } from \"../aptosConfig\";\n\n/**\n * A class to handle all `Sign` transaction operations\n */\nexport class Sign {\n readonly config: AptosConfig;\n\n constructor(config: AptosConfig) {\n this.config = config;\n }\n\n // eslint-disable-next-line class-methods-use-this\n transaction(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n return signTransaction({\n ...args,\n });\n }\n\n // eslint-disable-next-line class-methods-use-this\n transactionAsFeePayer(args: { signer: Account; transaction: AnyRawTransaction }): AccountAuthenticator {\n const { signer, transaction } = args;\n\n // if transaction doesnt hold a \"feePayerAddress\" prop it means\n // this is not a fee payer transaction\n if (!transaction.feePayerAddress) {\n throw new Error(`Transaction ${transaction} is not a Fee Payer transaction`);\n }\n\n // Set the feePayerAddress to the signer account address\n transaction.feePayerAddress = signer.accountAddress;\n\n return signTransaction({\n signer,\n transaction,\n });\n }\n}\n"],"mappings":"6mEAWO,IAAMA,EAAN,KAAW,CAGhB,YAAYC,EAAqB,CAC/B,KAAK,OAASA,CAChB,CAGA,YAAYC,EAAiF,CAC3F,OAAOC,EAAgB,CACrB,GAAGD,CACL,CAAC,CACH,CAGA,sBAAsBA,EAAiF,CACrG,GAAM,CAAE,OAAAE,EAAQ,YAAAC,CAAY,EAAIH,EAIhC,GAAI,CAACG,EAAY,gBACf,MAAM,IAAI,MAAM,eAAeA,CAAW,iCAAiC,EAI7E,OAAAA,EAAY,gBAAkBD,EAAO,eAE9BD,EAAgB,CACrB,OAAAC,EACA,YAAAC,CACF,CAAC,CACH,CACF","names":["Sign","config","args","signTransaction","signer","transaction"]}
@@ -1,5 +1,5 @@
1
1
  import { UserTransactionResponse } from '../../types/index.mjs';
2
- import { PublicKey } from '../../core/crypto/asymmetricCrypto.mjs';
2
+ import { P as PublicKey } from '../../publicKey-lq5djCIY.mjs';
3
3
  import { AnyRawTransaction, InputSimulateTransactionOptions } from '../../transactions/types.mjs';
4
4
  import { AptosConfig } from '../aptosConfig.mjs';
5
5
  import '../../utils/apiEndpoints.mjs';
@@ -9,25 +9,25 @@ import '../../types/generated/types.mjs';
9
9
  import '../../bcs/serializer.mjs';
10
10
  import '../../core/hex.mjs';
11
11
  import '../../core/common.mjs';
12
- import '../../bcs/serializable/moveStructs.mjs';
13
- import '../../bcs/serializable/movePrimitives.mjs';
12
+ import '../../core/accountAddress.mjs';
14
13
  import '../../bcs/deserializer.mjs';
15
14
  import '../../transactions/instances/transactionArgument.mjs';
15
+ import '../../core/crypto/signature.mjs';
16
+ import '../../bcs/serializable/moveStructs.mjs';
17
+ import '../../bcs/serializable/movePrimitives.mjs';
16
18
  import '../../bcs/serializable/fixedBytes.mjs';
17
- import '../../core/accountAddress.mjs';
19
+ import '../../transactions/authenticator/account.mjs';
20
+ import '../../core/crypto/ed25519.mjs';
21
+ import '../../core/crypto/privateKey.mjs';
22
+ import '../../core/crypto/multiEd25519.mjs';
23
+ import '../../core/crypto/multiKey.mjs';
24
+ import '../../core/crypto/singleKey.mjs';
18
25
  import '../../transactions/instances/rawTransaction.mjs';
19
26
  import '../../transactions/instances/chainId.mjs';
20
27
  import '../../transactions/instances/transactionPayload.mjs';
21
28
  import '../../transactions/instances/identifier.mjs';
22
29
  import '../../transactions/instances/moduleId.mjs';
23
30
  import '../../transactions/typeTag/index.mjs';
24
- import '../../transactions/authenticator/account.mjs';
25
- import '../../core/crypto/anyPublicKey.mjs';
26
- import '../../core/crypto/anySignature.mjs';
27
- import '../../core/crypto/ed25519.mjs';
28
- import '../../core/crypto/secp256k1.mjs';
29
- import '../../core/crypto/multiEd25519.mjs';
30
- import '../../core/crypto/multiKey.mjs';
31
31
  import '../../utils/const.mjs';
32
32
 
33
33
  /**
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-Y4AKS4CY.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-ENDUXRTK.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-LHJSG5NE.mjs";import"../../chunk-AFPJ2XXN.mjs";import"../../chunk-SXIFL5DQ.mjs";import"../../chunk-4OI7MPFH.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-O57QZZF2.mjs";import"../../chunk-GD4ULEBC.mjs";import"../../chunk-NWRKJFHV.mjs";import"../../chunk-ERWQOVBF.mjs";import"../../chunk-GD5TZLBF.mjs";import"../../chunk-QRQAR6XO.mjs";import"../../chunk-PJNPLRPR.mjs";import"../../chunk-QKTV6AZ7.mjs";import"../../chunk-7D5LHQNS.mjs";import"../../chunk-IHCIKE42.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ENKMOALS.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-UIVJXLRM.mjs";import"../../chunk-2QV6HI3M.mjs";import"../../chunk-FP5DPRYL.mjs";import"../../chunk-SBMJNU2O.mjs";import"../../chunk-7IGH7N52.mjs";import"../../chunk-UCHGKGCF.mjs";import"../../chunk-FBFMQZTM.mjs";import"../../chunk-ZFIMVSCR.mjs";import"../../chunk-I7WRJY7K.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-F7CR75CJ.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-SRZTA6QH.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-PMWH5IGI.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-JJ6Y35DF.mjs";import"../../chunk-VPQ46CAO.mjs";import"../../chunk-QGIJNA37.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-MEPX7Z2Z.mjs";import"../../chunk-HHJBCGAQ.mjs";import"../../chunk-77SKA4HT.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
1
+ import{a}from"../../chunk-F67Y7YH6.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-KWJTVJ7C.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-G62HQC77.mjs";import"../../chunk-OG56TYZE.mjs";import"../../chunk-SXIFL5DQ.mjs";import"../../chunk-52RTAMN7.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-I3TCHVQQ.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-ARIC32W7.mjs";import"../../chunk-X5C3LYI7.mjs";import"../../chunk-XTPFQ4MH.mjs";import"../../chunk-PJNPLRPR.mjs";import"../../chunk-QKTV6AZ7.mjs";import"../../chunk-7D5LHQNS.mjs";import"../../chunk-IHCIKE42.mjs";import"../../chunk-S2F6CSH4.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-JEHR6GKW.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-TNVR7SNR.mjs";import"../../chunk-WTHNSNAX.mjs";import"../../chunk-GRJJBGHT.mjs";import"../../chunk-YZZO6VDC.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-C3HM7HQP.mjs";import"../../chunk-Q6WOHF4A.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-TX7UK75Q.mjs";import"../../chunk-QR72RXBS.mjs";import"../../chunk-7BDYKJXX.mjs";import"../../chunk-WKUXBIYB.mjs";import"../../chunk-WME5D6YR.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-LMXP3JUU.mjs";import"../../chunk-F7CR75CJ.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-3EUOBVCT.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-CHA5DSSD.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-DGOT2VR5.mjs";import"../../chunk-UIUSDBCL.mjs";import"../../chunk-VMXBMAYK.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-DE5OOOVY.mjs";import"../../chunk-77SKA4HT.mjs";import"../../chunk-HEPV52CH.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Simulate};
2
2
  //# sourceMappingURL=simulate.mjs.map
@@ -10,18 +10,18 @@ import '../../types/generated/types.mjs';
10
10
  import '../../bcs/serializer.mjs';
11
11
  import '../../core/hex.mjs';
12
12
  import '../../core/common.mjs';
13
- import '../../core/crypto/anyPublicKey.mjs';
14
- import '../../core/crypto/anySignature.mjs';
15
- import '../../core/crypto/asymmetricCrypto.mjs';
16
13
  import '../../core/crypto/ed25519.mjs';
17
- import '../../core/crypto/secp256k1.mjs';
14
+ import '../../publicKey-lq5djCIY.mjs';
15
+ import '../../core/accountAddress.mjs';
16
+ import '../../transactions/instances/transactionArgument.mjs';
17
+ import '../../core/crypto/signature.mjs';
18
+ import '../../core/crypto/privateKey.mjs';
18
19
  import '../../core/crypto/multiEd25519.mjs';
19
20
  import '../../core/crypto/multiKey.mjs';
21
+ import '../../core/crypto/singleKey.mjs';
20
22
  import '../../bcs/serializable/moveStructs.mjs';
21
23
  import '../../bcs/serializable/movePrimitives.mjs';
22
- import '../../transactions/instances/transactionArgument.mjs';
23
24
  import '../../bcs/serializable/fixedBytes.mjs';
24
- import '../../core/accountAddress.mjs';
25
25
  import '../../transactions/instances/rawTransaction.mjs';
26
26
  import '../../transactions/instances/chainId.mjs';
27
27
  import '../../transactions/instances/transactionPayload.mjs';
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-EUHPML5E.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-ENDUXRTK.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-LHJSG5NE.mjs";import"../../chunk-AFPJ2XXN.mjs";import"../../chunk-SXIFL5DQ.mjs";import"../../chunk-4OI7MPFH.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-O57QZZF2.mjs";import"../../chunk-GD4ULEBC.mjs";import"../../chunk-NWRKJFHV.mjs";import"../../chunk-ERWQOVBF.mjs";import"../../chunk-GD5TZLBF.mjs";import"../../chunk-QRQAR6XO.mjs";import"../../chunk-PJNPLRPR.mjs";import"../../chunk-QKTV6AZ7.mjs";import"../../chunk-7D5LHQNS.mjs";import"../../chunk-IHCIKE42.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-ENKMOALS.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-UIVJXLRM.mjs";import"../../chunk-2QV6HI3M.mjs";import"../../chunk-FP5DPRYL.mjs";import"../../chunk-SBMJNU2O.mjs";import"../../chunk-7IGH7N52.mjs";import"../../chunk-UCHGKGCF.mjs";import"../../chunk-FBFMQZTM.mjs";import"../../chunk-ZFIMVSCR.mjs";import"../../chunk-I7WRJY7K.mjs";import"../../chunk-V6JFR2CB.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-F7CR75CJ.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-SRZTA6QH.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-PMWH5IGI.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-JJ6Y35DF.mjs";import"../../chunk-VPQ46CAO.mjs";import"../../chunk-QGIJNA37.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-MEPX7Z2Z.mjs";import"../../chunk-HHJBCGAQ.mjs";import"../../chunk-77SKA4HT.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
1
+ import{a}from"../../chunk-EF2F7NWO.mjs";import"../../chunk-6EMN3BOV.mjs";import"../../chunk-KWJTVJ7C.mjs";import"../../chunk-I5OYNCZS.mjs";import"../../chunk-R7G3CLRI.mjs";import"../../chunk-G62HQC77.mjs";import"../../chunk-OG56TYZE.mjs";import"../../chunk-SXIFL5DQ.mjs";import"../../chunk-52RTAMN7.mjs";import"../../chunk-BSCOVLWS.mjs";import"../../chunk-HTZTTZQJ.mjs";import"../../chunk-I3TCHVQQ.mjs";import"../../chunk-UYVPNUH3.mjs";import"../../chunk-ARIC32W7.mjs";import"../../chunk-X5C3LYI7.mjs";import"../../chunk-XTPFQ4MH.mjs";import"../../chunk-PJNPLRPR.mjs";import"../../chunk-QKTV6AZ7.mjs";import"../../chunk-7D5LHQNS.mjs";import"../../chunk-IHCIKE42.mjs";import"../../chunk-S2F6CSH4.mjs";import"../../chunk-V3MBJJTL.mjs";import"../../chunk-JEHR6GKW.mjs";import"../../chunk-E7FWVXGX.mjs";import"../../chunk-QE4ASJ5K.mjs";import"../../chunk-TNVR7SNR.mjs";import"../../chunk-WTHNSNAX.mjs";import"../../chunk-GRJJBGHT.mjs";import"../../chunk-YZZO6VDC.mjs";import"../../chunk-UVSRX4SV.mjs";import"../../chunk-C3HM7HQP.mjs";import"../../chunk-Q6WOHF4A.mjs";import"../../chunk-KUX6GQ2E.mjs";import"../../chunk-TX7UK75Q.mjs";import"../../chunk-QR72RXBS.mjs";import"../../chunk-7BDYKJXX.mjs";import"../../chunk-WKUXBIYB.mjs";import"../../chunk-WME5D6YR.mjs";import"../../chunk-LR65XHSF.mjs";import"../../chunk-FZY4PMEE.mjs";import"../../chunk-PPTG6BDV.mjs";import"../../chunk-B2ZKW23W.mjs";import"../../chunk-F7MOQC7Z.mjs";import"../../chunk-VRSUCKJA.mjs";import"../../chunk-6IFMQ5AS.mjs";import"../../chunk-LMXP3JUU.mjs";import"../../chunk-F7CR75CJ.mjs";import"../../chunk-N4RBQZ2B.mjs";import"../../chunk-NL72WE3E.mjs";import"../../chunk-FBPNHF54.mjs";import"../../chunk-56CNRT2K.mjs";import"../../chunk-3EUOBVCT.mjs";import"../../chunk-AH44UPM4.mjs";import"../../chunk-3JPVQHOR.mjs";import"../../chunk-CHA5DSSD.mjs";import"../../chunk-S4SEFF4K.mjs";import"../../chunk-N2FKVZ4D.mjs";import"../../chunk-DGOT2VR5.mjs";import"../../chunk-UIUSDBCL.mjs";import"../../chunk-VMXBMAYK.mjs";import"../../chunk-6FBKUTGF.mjs";import"../../chunk-CVEJHRAU.mjs";import"../../chunk-4WPQQPUF.mjs";import"../../chunk-DE5OOOVY.mjs";import"../../chunk-77SKA4HT.mjs";import"../../chunk-HEPV52CH.mjs";import"../../chunk-FVA2OPG4.mjs";export{a as Submit};
2
2
  //# sourceMappingURL=submit.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-4M46AWXX.mjs";import"../chunk-SRZTA6QH.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-PMWH5IGI.mjs";import"../chunk-S4SEFF4K.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-JJ6Y35DF.mjs";import"../chunk-VPQ46CAO.mjs";import"../chunk-QGIJNA37.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-CVEJHRAU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-MEPX7Z2Z.mjs";import"../chunk-HHJBCGAQ.mjs";import"../chunk-77SKA4HT.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
1
+ import{a}from"../chunk-UMLDKLDL.mjs";import"../chunk-3EUOBVCT.mjs";import"../chunk-AH44UPM4.mjs";import"../chunk-3JPVQHOR.mjs";import"../chunk-CHA5DSSD.mjs";import"../chunk-S4SEFF4K.mjs";import"../chunk-N2FKVZ4D.mjs";import"../chunk-DGOT2VR5.mjs";import"../chunk-UIUSDBCL.mjs";import"../chunk-VMXBMAYK.mjs";import"../chunk-6FBKUTGF.mjs";import"../chunk-CVEJHRAU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-DE5OOOVY.mjs";import"../chunk-HEPV52CH.mjs";import"../chunk-FVA2OPG4.mjs";export{a as waitForIndexerOnVersion};
2
2
  //# sourceMappingURL=utils.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o,b as r,c as t,d as s}from"./chunk-Q3HAJVCM.mjs";import{a as n}from"./chunk-4M46AWXX.mjs";var i=class{constructor(e){this.config=e}async getModuleEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),o({aptosConfig:this.config,...e})}async getAccountEventsByCreationNumber(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),r({aptosConfig:this.config,...e})}async getAccountEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),t({aptosConfig:this.config,...e})}async getEvents(e){return await n({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"events_processor"}),s({aptosConfig:this.config,...e})}};export{i as a};
2
- //# sourceMappingURL=chunk-S64WKSMI.mjs.map
1
+ import{a as o,b as r,c as t,d as s}from"./chunk-INORE66K.mjs";import{a as n}from"./chunk-UMLDKLDL.mjs";var i=class{constructor(e){this.config=e}async getModuleEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),o({aptosConfig:this.config,...e})}async getAccountEventsByCreationNumber(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),r({aptosConfig:this.config,...e})}async getAccountEventsByEventType(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"events_processor"}),t({aptosConfig:this.config,...e})}async getEvents(e){return await n({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"events_processor"}),s({aptosConfig:this.config,...e})}};export{i as a};
2
+ //# sourceMappingURL=chunk-2E2JOGE5.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as A}from"./chunk-AH44UPM4.mjs";import{a as d}from"./chunk-3JPVQHOR.mjs";import{i as w,j as C}from"./chunk-CHA5DSSD.mjs";import{b as c,c as l}from"./chunk-DGOT2VR5.mjs";import{a as h}from"./chunk-6FBKUTGF.mjs";import{d as y}from"./chunk-HEPV52CH.mjs";async function F(o){let{aptosConfig:n,options:t}=o;return l({aptosConfig:n,originMethod:"getTransactions",path:"transactions",params:{start:t?.offset,limit:t?.limit}})}async function L(o){let{aptosConfig:n}=o;return A(async()=>{let{data:t}=await c({aptosConfig:n,originMethod:"getGasPriceEstimation",path:"estimate_gas_price"});return t},`gas-price-${n.network}`,1e3*60*5)()}async function v(o){let{aptosConfig:n,ledgerVersion:t}=o,{data:s}=await c({aptosConfig:n,originMethod:"getTransactionByVersion",path:`transactions/by_version/${t}`});return s}async function x(o){let{aptosConfig:n,transactionHash:t}=o,{data:s}=await c({aptosConfig:n,path:`transactions/by_hash/${t}`,originMethod:"getTransactionByHash"});return s}async function N(o){let{aptosConfig:n,transactionHash:t}=o;try{return(await x({aptosConfig:n,transactionHash:t})).type==="pending_transaction"}catch(s){if(s?.status===404)return!0;throw s}}async function G(o){let{aptosConfig:n,transactionHash:t,options:s}=o,r=s?.timeoutSecs??20,f=s?.checkSuccess??!0,i=!0,u=0,e,g,m=200,P=1.5;for(;i&&!(u>=r);){try{if(e=await x({aptosConfig:n,transactionHash:t}),i=e.type==="pending_transaction",!i)break}catch(a){if(!(a instanceof h)||(g=a,a.status!==404&&a.status>=400&&a.status<500))throw a}await d(m),u+=m/1e3,m*=P}if(e===void 0)throw g||new p(`Fetching transaction ${t} failed and timed out after ${r} seconds`,e);if(e.type==="pending_transaction")throw new p(`Transaction ${t} timed out in pending state after ${r} seconds`,e);if(!f)return e;if(!e.success)throw new T(`Transaction ${t} failed with an error: ${e.vm_status}`,e);return e}async function D(o){let{aptosConfig:n,processorType:t}=o,s=BigInt(o.minimumLedgerVersion),r=3e3,f=new Date().getTime(),i=BigInt(-1);for(;i<s;){if(new Date().getTime()-f>r)throw new Error("waitForLastSuccessIndexerVersionSync timeout");if(t===void 0?i=await w({aptosConfig:n}):i=(await C({aptosConfig:n,processorType:t})).last_success_version,i>=s)break;await d(200)}}var p=class extends Error{constructor(t,s){super(t);this.lastSubmittedTransaction=s}},T=class extends Error{constructor(t,s){super(t);this.transaction=s}};export{F as a,L as b,v as c,x as d,N as e,G as f,D as g,p as h,T as i};
2
+ //# sourceMappingURL=chunk-3EUOBVCT.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/internal/transaction.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file contains the underlying implementations for exposed API surface in\n * the {@link api/transaction}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * transaction namespace and without having a dependency cycle error.\n */\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { AptosApiError, getAptosFullNode, paginateWithCursor } from \"../client\";\nimport {\n TransactionResponseType,\n type AnyNumber,\n type GasEstimation,\n type HexInput,\n type PaginationArgs,\n type TransactionResponse,\n WaitForTransactionOptions,\n CommittedTransactionResponse,\n} from \"../types\";\nimport { DEFAULT_TXN_TIMEOUT_SEC, ProcessorType } from \"../utils/const\";\nimport { sleep } from \"../utils/helpers\";\nimport { memoizeAsync } from \"../utils/memoize\";\nimport { getIndexerLastSuccessVersion, getProcessorStatus } from \"./general\";\n\nexport async function getTransactions(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs;\n}): Promise<TransactionResponse[]> {\n const { aptosConfig, options } = args;\n return paginateWithCursor<{}, TransactionResponse[]>({\n aptosConfig,\n originMethod: \"getTransactions\",\n path: \"transactions\",\n params: { start: options?.offset, limit: options?.limit },\n });\n}\n\nexport async function getGasPriceEstimation(args: { aptosConfig: AptosConfig }) {\n const { aptosConfig } = args;\n\n return memoizeAsync(\n async () => {\n const { data } = await getAptosFullNode<{}, GasEstimation>({\n aptosConfig,\n originMethod: \"getGasPriceEstimation\",\n path: \"estimate_gas_price\",\n });\n return data;\n },\n `gas-price-${aptosConfig.network}`,\n 1000 * 60 * 5, // 5 minutes\n )();\n}\n\nexport async function getTransactionByVersion(args: {\n aptosConfig: AptosConfig;\n ledgerVersion: AnyNumber;\n}): Promise<TransactionResponse> {\n const { aptosConfig, ledgerVersion } = args;\n const { data } = await getAptosFullNode<{}, TransactionResponse>({\n aptosConfig,\n originMethod: \"getTransactionByVersion\",\n path: `transactions/by_version/${ledgerVersion}`,\n });\n return data;\n}\n\nexport async function getTransactionByHash(args: {\n aptosConfig: AptosConfig;\n transactionHash: HexInput;\n}): Promise<TransactionResponse> {\n const { aptosConfig, transactionHash } = args;\n const { data } = await getAptosFullNode<{}, TransactionResponse>({\n aptosConfig,\n path: `transactions/by_hash/${transactionHash}`,\n originMethod: \"getTransactionByHash\",\n });\n return data;\n}\n\nexport async function isTransactionPending(args: {\n aptosConfig: AptosConfig;\n transactionHash: HexInput;\n}): Promise<boolean> {\n const { aptosConfig, transactionHash } = args;\n try {\n const transaction = await getTransactionByHash({ aptosConfig, transactionHash });\n return transaction.type === TransactionResponseType.Pending;\n } catch (e: any) {\n if (e?.status === 404) {\n return true;\n }\n throw e;\n }\n}\n\nexport async function waitForTransaction(args: {\n aptosConfig: AptosConfig;\n transactionHash: HexInput;\n options?: WaitForTransactionOptions;\n}): Promise<CommittedTransactionResponse> {\n const { aptosConfig, transactionHash, options } = args;\n const timeoutSecs = options?.timeoutSecs ?? DEFAULT_TXN_TIMEOUT_SEC;\n const checkSuccess = options?.checkSuccess ?? true;\n\n let isPending = true;\n let timeElapsed = 0;\n let lastTxn: TransactionResponse | undefined;\n let lastError: AptosApiError | undefined;\n let backoffIntervalMs = 200;\n const backoffMultiplier = 1.5;\n\n while (isPending) {\n if (timeElapsed >= timeoutSecs) {\n break;\n }\n try {\n // eslint-disable-next-line no-await-in-loop\n lastTxn = await getTransactionByHash({ aptosConfig, transactionHash });\n\n isPending = lastTxn.type === TransactionResponseType.Pending;\n\n if (!isPending) {\n break;\n }\n } catch (e) {\n // In short, this means we will retry if it was an AptosApiError and the code was 404 or 5xx.\n const isAptosApiError = e instanceof AptosApiError;\n if (!isAptosApiError) {\n throw e; // This would be unexpected\n }\n lastError = e;\n const isRequestError = e.status !== 404 && e.status >= 400 && e.status < 500;\n if (isRequestError) {\n throw e;\n }\n }\n // eslint-disable-next-line no-await-in-loop\n await sleep(backoffIntervalMs);\n timeElapsed += backoffIntervalMs / 1000; // Convert to seconds\n backoffIntervalMs *= backoffMultiplier;\n }\n\n // There is a chance that lastTxn is still undefined. Let's throw the last error otherwise a WaitForTransactionError\n if (lastTxn === undefined) {\n if (lastError) {\n throw lastError;\n } else {\n throw new WaitForTransactionError(\n `Fetching transaction ${transactionHash} failed and timed out after ${timeoutSecs} seconds`,\n lastTxn,\n );\n }\n }\n\n if (lastTxn.type === TransactionResponseType.Pending) {\n throw new WaitForTransactionError(\n `Transaction ${transactionHash} timed out in pending state after ${timeoutSecs} seconds`,\n lastTxn,\n );\n }\n if (!checkSuccess) {\n return lastTxn;\n }\n if (!lastTxn.success) {\n throw new FailedTransactionError(\n `Transaction ${transactionHash} failed with an error: ${lastTxn.vm_status}`,\n lastTxn,\n );\n }\n\n return lastTxn;\n}\n\n/**\n * Waits for the indexer to sync up to the ledgerVersion. Timeout is 3 seconds.\n */\nexport async function waitForIndexer(args: {\n aptosConfig: AptosConfig;\n minimumLedgerVersion: AnyNumber;\n processorType?: ProcessorType;\n}): Promise<void> {\n const { aptosConfig, processorType } = args;\n const minimumLedgerVersion = BigInt(args.minimumLedgerVersion);\n const timeoutMilliseconds = 3000; // 3 seconds\n const startTime = new Date().getTime();\n let indexerVersion = BigInt(-1);\n\n while (indexerVersion < minimumLedgerVersion) {\n // check for timeout\n if (new Date().getTime() - startTime > timeoutMilliseconds) {\n throw new Error(\"waitForLastSuccessIndexerVersionSync timeout\");\n }\n\n if (processorType === undefined) {\n // Get the last success version from all processor\n // eslint-disable-next-line no-await-in-loop\n indexerVersion = await getIndexerLastSuccessVersion({ aptosConfig });\n } else {\n // Get the last success version from the specific processor\n // eslint-disable-next-line no-await-in-loop\n const processor = await getProcessorStatus({ aptosConfig, processorType });\n indexerVersion = processor.last_success_version;\n }\n\n if (indexerVersion >= minimumLedgerVersion) {\n // break out immediately if we are synced\n break;\n }\n\n // eslint-disable-next-line no-await-in-loop\n await sleep(200);\n }\n}\n\n/**\n * This error is used by `waitForTransaction` when waiting for a\n * transaction to time out or when the transaction response is undefined\n */\nexport class WaitForTransactionError extends Error {\n public readonly lastSubmittedTransaction: TransactionResponse | undefined;\n\n constructor(message: string, lastSubmittedTransaction: TransactionResponse | undefined) {\n super(message);\n this.lastSubmittedTransaction = lastSubmittedTransaction;\n }\n}\n\n/**\n * This error is used by `waitForTransaction` if `checkSuccess` is true.\n * See that function for more information.\n */\nexport class FailedTransactionError extends Error {\n public readonly transaction: TransactionResponse;\n\n constructor(message: string, transaction: TransactionResponse) {\n super(message);\n this.transaction = transaction;\n }\n}\n"],"mappings":"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","names":["getTransactions","args","aptosConfig","options","paginateWithCursor","getGasPriceEstimation","memoizeAsync","data","getAptosFullNode","getTransactionByVersion","ledgerVersion","getTransactionByHash","transactionHash","isTransactionPending","e","waitForTransaction","timeoutSecs","DEFAULT_TXN_TIMEOUT_SEC","checkSuccess","isPending","timeElapsed","lastTxn","lastError","backoffIntervalMs","backoffMultiplier","AptosApiError","sleep","WaitForTransactionError","FailedTransactionError","waitForIndexer","processorType","minimumLedgerVersion","timeoutMilliseconds","startTime","indexerVersion","getIndexerLastSuccessVersion","getProcessorStatus","message","lastSubmittedTransaction","transaction"]}
1
+ {"version":3,"sources":["../../src/internal/transaction.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * This file contains the underlying implementations for exposed API surface in\n * the {@link api/transaction}. By moving the methods out into a separate file,\n * other namespaces and processes can access these methods without depending on the entire\n * transaction namespace and without having a dependency cycle error.\n */\n\nimport { AptosConfig } from \"../api/aptosConfig\";\nimport { AptosApiError, getAptosFullNode, paginateWithCursor } from \"../client\";\nimport {\n TransactionResponseType,\n type AnyNumber,\n type GasEstimation,\n type HexInput,\n type PaginationArgs,\n type TransactionResponse,\n WaitForTransactionOptions,\n CommittedTransactionResponse,\n} from \"../types\";\nimport { DEFAULT_TXN_TIMEOUT_SEC, ProcessorType } from \"../utils/const\";\nimport { sleep } from \"../utils/helpers\";\nimport { memoizeAsync } from \"../utils/memoize\";\nimport { getIndexerLastSuccessVersion, getProcessorStatus } from \"./general\";\n\nexport async function getTransactions(args: {\n aptosConfig: AptosConfig;\n options?: PaginationArgs;\n}): Promise<TransactionResponse[]> {\n const { aptosConfig, options } = args;\n return paginateWithCursor<{}, TransactionResponse[]>({\n aptosConfig,\n originMethod: \"getTransactions\",\n path: \"transactions\",\n params: { start: options?.offset, limit: options?.limit },\n });\n}\n\nexport async function getGasPriceEstimation(args: { aptosConfig: AptosConfig }) {\n const { aptosConfig } = args;\n\n return memoizeAsync(\n async () => {\n const { data } = await getAptosFullNode<{}, GasEstimation>({\n aptosConfig,\n originMethod: \"getGasPriceEstimation\",\n path: \"estimate_gas_price\",\n });\n return data;\n },\n `gas-price-${aptosConfig.network}`,\n 1000 * 60 * 5, // 5 minutes\n )();\n}\n\nexport async function getTransactionByVersion(args: {\n aptosConfig: AptosConfig;\n ledgerVersion: AnyNumber;\n}): Promise<TransactionResponse> {\n const { aptosConfig, ledgerVersion } = args;\n const { data } = await getAptosFullNode<{}, TransactionResponse>({\n aptosConfig,\n originMethod: \"getTransactionByVersion\",\n path: `transactions/by_version/${ledgerVersion}`,\n });\n return data;\n}\n\nexport async function getTransactionByHash(args: {\n aptosConfig: AptosConfig;\n transactionHash: HexInput;\n}): Promise<TransactionResponse> {\n const { aptosConfig, transactionHash } = args;\n const { data } = await getAptosFullNode<{}, TransactionResponse>({\n aptosConfig,\n path: `transactions/by_hash/${transactionHash}`,\n originMethod: \"getTransactionByHash\",\n });\n return data;\n}\n\nexport async function isTransactionPending(args: {\n aptosConfig: AptosConfig;\n transactionHash: HexInput;\n}): Promise<boolean> {\n const { aptosConfig, transactionHash } = args;\n try {\n const transaction = await getTransactionByHash({ aptosConfig, transactionHash });\n return transaction.type === TransactionResponseType.Pending;\n } catch (e: any) {\n if (e?.status === 404) {\n return true;\n }\n throw e;\n }\n}\n\nexport async function waitForTransaction(args: {\n aptosConfig: AptosConfig;\n transactionHash: HexInput;\n options?: WaitForTransactionOptions;\n}): Promise<CommittedTransactionResponse> {\n const { aptosConfig, transactionHash, options } = args;\n const timeoutSecs = options?.timeoutSecs ?? DEFAULT_TXN_TIMEOUT_SEC;\n const checkSuccess = options?.checkSuccess ?? true;\n\n let isPending = true;\n let timeElapsed = 0;\n let lastTxn: TransactionResponse | undefined;\n let lastError: AptosApiError | undefined;\n let backoffIntervalMs = 200;\n const backoffMultiplier = 1.5;\n\n while (isPending) {\n if (timeElapsed >= timeoutSecs) {\n break;\n }\n try {\n // eslint-disable-next-line no-await-in-loop\n lastTxn = await getTransactionByHash({ aptosConfig, transactionHash });\n\n isPending = lastTxn.type === TransactionResponseType.Pending;\n\n if (!isPending) {\n break;\n }\n } catch (e) {\n // In short, this means we will retry if it was an AptosApiError and the code was 404 or 5xx.\n const isAptosApiError = e instanceof AptosApiError;\n if (!isAptosApiError) {\n throw e; // This would be unexpected\n }\n lastError = e;\n const isRequestError = e.status !== 404 && e.status >= 400 && e.status < 500;\n if (isRequestError) {\n throw e;\n }\n }\n // eslint-disable-next-line no-await-in-loop\n await sleep(backoffIntervalMs);\n timeElapsed += backoffIntervalMs / 1000; // Convert to seconds\n backoffIntervalMs *= backoffMultiplier;\n }\n\n // There is a chance that lastTxn is still undefined. Let's throw the last error otherwise a WaitForTransactionError\n if (lastTxn === undefined) {\n if (lastError) {\n throw lastError;\n } else {\n throw new WaitForTransactionError(\n `Fetching transaction ${transactionHash} failed and timed out after ${timeoutSecs} seconds`,\n lastTxn,\n );\n }\n }\n\n if (lastTxn.type === TransactionResponseType.Pending) {\n throw new WaitForTransactionError(\n `Transaction ${transactionHash} timed out in pending state after ${timeoutSecs} seconds`,\n lastTxn,\n );\n }\n if (!checkSuccess) {\n return lastTxn;\n }\n if (!lastTxn.success) {\n throw new FailedTransactionError(\n `Transaction ${transactionHash} failed with an error: ${lastTxn.vm_status}`,\n lastTxn,\n );\n }\n\n return lastTxn;\n}\n\n/**\n * Waits for the indexer to sync up to the ledgerVersion. Timeout is 3 seconds.\n */\nexport async function waitForIndexer(args: {\n aptosConfig: AptosConfig;\n minimumLedgerVersion: AnyNumber;\n processorType?: ProcessorType;\n}): Promise<void> {\n const { aptosConfig, processorType } = args;\n const minimumLedgerVersion = BigInt(args.minimumLedgerVersion);\n const timeoutMilliseconds = 3000; // 3 seconds\n const startTime = new Date().getTime();\n let indexerVersion = BigInt(-1);\n\n while (indexerVersion < minimumLedgerVersion) {\n // check for timeout\n if (new Date().getTime() - startTime > timeoutMilliseconds) {\n throw new Error(\"waitForLastSuccessIndexerVersionSync timeout\");\n }\n\n if (processorType === undefined) {\n // Get the last success version from all processor\n // eslint-disable-next-line no-await-in-loop\n indexerVersion = await getIndexerLastSuccessVersion({ aptosConfig });\n } else {\n // Get the last success version from the specific processor\n // eslint-disable-next-line no-await-in-loop\n const processor = await getProcessorStatus({ aptosConfig, processorType });\n indexerVersion = processor.last_success_version;\n }\n\n if (indexerVersion >= minimumLedgerVersion) {\n // break out immediately if we are synced\n break;\n }\n\n // eslint-disable-next-line no-await-in-loop\n await sleep(200);\n }\n}\n\n/**\n * This error is used by `waitForTransaction` when waiting for a\n * transaction to time out or when the transaction response is undefined\n */\nexport class WaitForTransactionError extends Error {\n public readonly lastSubmittedTransaction: TransactionResponse | undefined;\n\n constructor(message: string, lastSubmittedTransaction: TransactionResponse | undefined) {\n super(message);\n this.lastSubmittedTransaction = lastSubmittedTransaction;\n }\n}\n\n/**\n * This error is used by `waitForTransaction` if `checkSuccess` is true.\n * See that function for more information.\n */\nexport class FailedTransactionError extends Error {\n public readonly transaction: TransactionResponse;\n\n constructor(message: string, transaction: TransactionResponse) {\n super(message);\n this.transaction = transaction;\n }\n}\n"],"mappings":"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","names":["getTransactions","args","aptosConfig","options","paginateWithCursor","getGasPriceEstimation","memoizeAsync","data","getAptosFullNode","getTransactionByVersion","ledgerVersion","getTransactionByHash","transactionHash","isTransactionPending","e","waitForTransaction","timeoutSecs","checkSuccess","isPending","timeElapsed","lastTxn","lastError","backoffIntervalMs","backoffMultiplier","AptosApiError","sleep","WaitForTransactionError","FailedTransactionError","waitForIndexer","processorType","minimumLedgerVersion","timeoutMilliseconds","startTime","indexerVersion","getIndexerLastSuccessVersion","getProcessorStatus","message","lastSubmittedTransaction","transaction"]}
@@ -1,2 +1,2 @@
1
- import{b as r}from"./chunk-F7CR75CJ.mjs";import{a as i}from"./chunk-B2ZKW23W.mjs";import{a,b as g,c as f}from"./chunk-F7MOQC7Z.mjs";import{a as o,b as u,c as s,d as c,e as p,f as y,g as m}from"./chunk-VRSUCKJA.mjs";function M(n){return typeof n=="boolean"}function D(n){return typeof n=="string"}function N(n){return typeof n=="number"}function P(n){return typeof n=="number"||typeof n=="bigint"||typeof n=="string"}function w(n){return n==null}function G(n){return A(n)||x(n)||S(n)||B(n)||U(n)||I(n)||b(n)||T(n)||E(n)||d(n)||n instanceof a||n instanceof f}function A(n){return n instanceof o}function T(n){return n instanceof r}function E(n){return n instanceof g}function d(n){return n instanceof i}function x(n){return n instanceof u}function S(n){return n instanceof s}function B(n){return n instanceof c}function U(n){return n instanceof p}function I(n){return n instanceof y}function b(n){return n instanceof m}function $(n){return"bytecode"in n}function R(n,t){throw new Error(`Type mismatch for argument ${t}, expected '${n}'`)}function W(n){let t=n.params.findIndex(e=>e!=="signer"&&e!=="&signer");return t<0?n.params.length:t}function L(n){let t=n.split("::");if(t.length!==3)throw new Error(`Invalid function ${n}`);let e=t[0],F=t[1],l=t[2];return{moduleAddress:e,moduleName:F,functionName:l}}export{M as a,D as b,N as c,P as d,w as e,G as f,A as g,T as h,E as i,d as j,x as k,S as l,B as m,U as n,I as o,b as p,$ as q,R as r,W as s,L as t};
2
- //# sourceMappingURL=chunk-4OI7MPFH.mjs.map
1
+ import{a as i}from"./chunk-B2ZKW23W.mjs";import{a,b as g,c as f}from"./chunk-F7MOQC7Z.mjs";import{a as o,b as u,c as s,d as c,e as p,f as y,g as m}from"./chunk-VRSUCKJA.mjs";import{b as r}from"./chunk-F7CR75CJ.mjs";function M(n){return typeof n=="boolean"}function D(n){return typeof n=="string"}function N(n){return typeof n=="number"}function P(n){return typeof n=="number"||typeof n=="bigint"||typeof n=="string"}function w(n){return n==null}function G(n){return A(n)||x(n)||S(n)||B(n)||U(n)||I(n)||b(n)||T(n)||E(n)||d(n)||n instanceof a||n instanceof f}function A(n){return n instanceof o}function T(n){return n instanceof r}function E(n){return n instanceof g}function d(n){return n instanceof i}function x(n){return n instanceof u}function S(n){return n instanceof s}function B(n){return n instanceof c}function U(n){return n instanceof p}function I(n){return n instanceof y}function b(n){return n instanceof m}function $(n){return"bytecode"in n}function R(n,t){throw new Error(`Type mismatch for argument ${t}, expected '${n}'`)}function W(n){let t=n.params.findIndex(e=>e!=="signer"&&e!=="&signer");return t<0?n.params.length:t}function L(n){let t=n.split("::");if(t.length!==3)throw new Error(`Invalid function ${n}`);let e=t[0],F=t[1],l=t[2];return{moduleAddress:e,moduleName:F,functionName:l}}export{M as a,D as b,N as c,P as d,w as e,G as f,A as g,T as h,E as i,d as j,x as k,S as l,B as m,U as n,I as o,b as p,$ as q,R as r,W as s,L as t};
2
+ //# sourceMappingURL=chunk-52RTAMN7.mjs.map
@@ -0,0 +1,2 @@
1
+ import{b as v}from"./chunk-WKUXBIYB.mjs";import{a as S}from"./chunk-WME5D6YR.mjs";import{d as f,f as K,g as A,h as H,i as P,j as E}from"./chunk-LR65XHSF.mjs";import{a as p}from"./chunk-LMXP3JUU.mjs";import{a as h}from"./chunk-N4RBQZ2B.mjs";import{b as i}from"./chunk-NL72WE3E.mjs";import o from"tweetnacl";var n=class n extends v{constructor(e){super();let t=i.fromHexInput(e);if(t.toUint8Array().length!==n.LENGTH)throw new Error(`PublicKey length should be ${n.LENGTH}`);this.key=t}verifySignature(e){let{message:t,signature:s}=e;if(!(s instanceof y))return!1;let c=i.fromHexInput(t).toUint8Array(),u=s.toUint8Array(),l=this.key.toUint8Array();return o.sign.detached.verify(c,u,l)}authKey(){return p.fromSchemeAndBytes({scheme:0,input:this.toUint8Array()})}toUint8Array(){return this.key.toUint8Array()}serialize(e){e.serializeBytes(this.key.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new n(t)}static isPublicKey(e){return e instanceof n}};n.LENGTH=32;var m=n,r=class r extends h{constructor(e){super();let t=i.fromHexInput(e);if(t.toUint8Array().length!==r.LENGTH)throw new Error(`PrivateKey length should be ${r.LENGTH}`);this.signingKeyPair=o.sign.keyPair.fromSeed(t.toUint8Array().slice(0,r.LENGTH))}static generate(){let e=o.sign.keyPair();return new r(e.secretKey.slice(0,r.LENGTH))}static fromDerivationPath(e,t){if(!K(e))throw new Error(`Invalid derivation path ${e}`);return r.fromDerivationPathInner(e,E(t))}static fromDerivationPathInner(e,t,s=f){let{key:c,chainCode:u}=A(r.SLIP_0010_SEED,t),l=P(e).map(d=>parseInt(d,10)),{key:U}=l.reduce((d,z)=>H(d,z+s),{key:c,chainCode:u});return new r(U)}publicKey(){let e=this.signingKeyPair.publicKey;return new m(e)}sign(e){let t=i.fromHexInput(e).toUint8Array(),s=o.sign.detached(t,this.signingKeyPair.secretKey);return new y(s)}toUint8Array(){return this.signingKeyPair.secretKey.slice(0,r.LENGTH)}toString(){return i.fromHexInput(this.toUint8Array()).toString()}serialize(e){e.serializeBytes(this.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new r(t)}static isPrivateKey(e){return e instanceof r}};r.LENGTH=32,r.SLIP_0010_SEED="ed25519 seed";var x=r,a=class a extends S{constructor(e){super();let t=i.fromHexInput(e);if(t.toUint8Array().length!==a.LENGTH)throw new Error(`Signature length should be ${a.LENGTH}`);this.data=t}toUint8Array(){return this.data.toUint8Array()}serialize(e){e.serializeBytes(this.data.toUint8Array())}static deserialize(e){let t=e.deserializeBytes();return new a(t)}};a.LENGTH=64;var y=a;export{m as a,x as b,y as c};
2
+ //# sourceMappingURL=chunk-7BDYKJXX.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/crypto/ed25519.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\nimport nacl from \"tweetnacl\";\nimport { Deserializer } from \"../../bcs/deserializer\";\nimport { Serializable, Serializer } from \"../../bcs/serializer\";\nimport { AuthenticationKey } from \"../authenticationKey\";\nimport { Hex } from \"../hex\";\nimport { HexInput, SigningScheme as AuthenticationKeyScheme } from \"../../types\";\nimport { CKDPriv, deriveKey, HARDENED_OFFSET, isValidHardenedPath, mnemonicToSeed, splitPath } from \"./hdKey\";\nimport { PrivateKey } from \"./privateKey\";\nimport { AccountPublicKey, VerifySignatureArgs } from \"./publicKey\";\nimport { Signature } from \"./signature\";\n\n/**\n * Represents the public key of an Ed25519 key pair.\n *\n * Since [AIP-55](https://github.com/aptos-foundation/AIPs/pull/263) Aptos supports\n * `Legacy` and `Unified` authentication keys.\n *\n * Ed25519 scheme is represented in the SDK as `Legacy authentication key` and also\n * as `AnyPublicKey` that represents any `Unified authentication key`\n */\nexport class Ed25519PublicKey extends AccountPublicKey {\n /**\n * Length of an Ed25519 public key\n */\n static readonly LENGTH: number = 32;\n\n /**\n * Bytes of the public key\n * @private\n */\n private readonly key: Hex;\n\n /**\n * Create a new PublicKey instance from a Uint8Array or String.\n *\n * @param hexInput A HexInput (string or Uint8Array)\n */\n constructor(hexInput: HexInput) {\n super();\n\n const hex = Hex.fromHexInput(hexInput);\n if (hex.toUint8Array().length !== Ed25519PublicKey.LENGTH) {\n throw new Error(`PublicKey length should be ${Ed25519PublicKey.LENGTH}`);\n }\n this.key = hex;\n }\n\n // region AccountPublicKey\n\n /**\n * Verifies a signed data with a public key\n * @param args.message a signed message\n * @param args.signature the signature of the message\n */\n verifySignature(args: VerifySignatureArgs): boolean {\n const { message, signature } = args;\n if (!(signature instanceof Ed25519Signature)) {\n return false;\n }\n\n const messageBytes = Hex.fromHexInput(message).toUint8Array();\n const signatureBytes = signature.toUint8Array();\n const publicKeyBytes = this.key.toUint8Array();\n return nacl.sign.detached.verify(messageBytes, signatureBytes, publicKeyBytes);\n }\n\n authKey(): AuthenticationKey {\n return AuthenticationKey.fromSchemeAndBytes({\n scheme: AuthenticationKeyScheme.Ed25519,\n input: this.toUint8Array(),\n });\n }\n\n /**\n * Get the public key in bytes (Uint8Array).\n *\n * @returns Uint8Array representation of the public key\n */\n toUint8Array(): Uint8Array {\n return this.key.toUint8Array();\n }\n\n // endregion\n\n // region Serializable\n\n serialize(serializer: Serializer): void {\n serializer.serializeBytes(this.key.toUint8Array());\n }\n\n static deserialize(deserializer: Deserializer): Ed25519PublicKey {\n const bytes = deserializer.deserializeBytes();\n return new Ed25519PublicKey(bytes);\n }\n\n // endregion\n\n /**\n * @deprecated use `instanceof Ed25519PublicKey` instead.\n */\n static isPublicKey(publicKey: AccountPublicKey): publicKey is Ed25519PublicKey {\n return publicKey instanceof Ed25519PublicKey;\n }\n}\n\n/**\n * Represents the private key of an Ed25519 key pair.\n */\nexport class Ed25519PrivateKey extends Serializable implements PrivateKey {\n /**\n * Length of an Ed25519 private key\n */\n static readonly LENGTH: number = 32;\n\n /**\n * The Ed25519 key seed to use for BIP-32 compatibility\n * See more {@link https://github.com/satoshilabs/slips/blob/master/slip-0010.md}\n */\n static readonly SLIP_0010_SEED = \"ed25519 seed\";\n\n /**\n * The Ed25519 signing key\n * @private\n */\n private readonly signingKeyPair: nacl.SignKeyPair;\n\n // region Constructors\n\n /**\n * Create a new PrivateKey instance from a Uint8Array or String.\n *\n * @param hexInput HexInput (string or Uint8Array)\n */\n constructor(hexInput: HexInput) {\n super();\n\n const privateKeyHex = Hex.fromHexInput(hexInput);\n if (privateKeyHex.toUint8Array().length !== Ed25519PrivateKey.LENGTH) {\n throw new Error(`PrivateKey length should be ${Ed25519PrivateKey.LENGTH}`);\n }\n\n // Create keyPair from Private key in Uint8Array format\n this.signingKeyPair = nacl.sign.keyPair.fromSeed(privateKeyHex.toUint8Array().slice(0, Ed25519PrivateKey.LENGTH));\n }\n\n /**\n * Generate a new random private key.\n *\n * @returns Ed25519PrivateKey\n */\n static generate(): Ed25519PrivateKey {\n const keyPair = nacl.sign.keyPair();\n return new Ed25519PrivateKey(keyPair.secretKey.slice(0, Ed25519PrivateKey.LENGTH));\n }\n\n /**\n * Derives a private key from a mnemonic seed phrase.\n *\n * To derive multiple keys from the same phrase, change the path\n *\n * IMPORTANT: Ed25519 supports hardened derivation only (since it lacks a key homomorphism,\n * so non-hardened derivation cannot work)\n *\n * @param path the BIP44 path\n * @param mnemonics the mnemonic seed phrase\n */\n static fromDerivationPath(path: string, mnemonics: string): Ed25519PrivateKey {\n if (!isValidHardenedPath(path)) {\n throw new Error(`Invalid derivation path ${path}`);\n }\n return Ed25519PrivateKey.fromDerivationPathInner(path, mnemonicToSeed(mnemonics));\n }\n\n /**\n * A private inner function so we can separate from the main fromDerivationPath() method\n * to add tests to verify we create the keys correctly.\n *\n * @param path the BIP44 path\n * @param seed the seed phrase created by the mnemonics\n * @param offset the offset used for key derivation, defaults to 0x80000000\n * @returns\n */\n private static fromDerivationPathInner(path: string, seed: Uint8Array, offset = HARDENED_OFFSET): Ed25519PrivateKey {\n const { key, chainCode } = deriveKey(Ed25519PrivateKey.SLIP_0010_SEED, seed);\n\n const segments = splitPath(path).map((el) => parseInt(el, 10));\n\n // Derive the child key based on the path\n const { key: privateKey } = segments.reduce((parentKeys, segment) => CKDPriv(parentKeys, segment + offset), {\n key,\n chainCode,\n });\n return new Ed25519PrivateKey(privateKey);\n }\n\n // endregion\n\n // region PrivateKey\n\n /**\n * Derive the Ed25519PublicKey for this private key.\n *\n * @returns Ed25519PublicKey\n */\n publicKey(): Ed25519PublicKey {\n const bytes = this.signingKeyPair.publicKey;\n return new Ed25519PublicKey(bytes);\n }\n\n /**\n * Sign the given message with the private key.\n *\n * @param message in HexInput format\n * @returns Signature\n */\n sign(message: HexInput): Ed25519Signature {\n const messageBytes = Hex.fromHexInput(message).toUint8Array();\n const signatureBytes = nacl.sign.detached(messageBytes, this.signingKeyPair.secretKey);\n return new Ed25519Signature(signatureBytes);\n }\n\n /**\n * Get the private key in bytes (Uint8Array).\n *\n * @returns Uint8Array representation of the private key\n */\n toUint8Array(): Uint8Array {\n return this.signingKeyPair.secretKey.slice(0, Ed25519PrivateKey.LENGTH);\n }\n\n /**\n * Get the private key as a hex string with the 0x prefix.\n *\n * @returns string representation of the private key\n */\n toString(): string {\n return Hex.fromHexInput(this.toUint8Array()).toString();\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): Ed25519PrivateKey {\n const bytes = deserializer.deserializeBytes();\n return new Ed25519PrivateKey(bytes);\n }\n\n // endregion\n\n /**\n * @deprecated use `instanceof Ed25519PrivateKey` instead.\n */\n static isPrivateKey(privateKey: PrivateKey): privateKey is Ed25519PrivateKey {\n return privateKey instanceof Ed25519PrivateKey;\n }\n}\n\n/**\n * A signature of a message signed using an Ed25519 private key\n */\nexport class Ed25519Signature extends Signature {\n /**\n * Length of an Ed25519 signature\n */\n static readonly LENGTH = 64;\n\n /**\n * The signature bytes\n * @private\n */\n private readonly data: Hex;\n\n // region Constructors\n\n constructor(hexInput: HexInput) {\n super();\n const data = Hex.fromHexInput(hexInput);\n if (data.toUint8Array().length !== Ed25519Signature.LENGTH) {\n throw new Error(`Signature length should be ${Ed25519Signature.LENGTH}`);\n }\n this.data = data;\n }\n\n // endregion\n\n // region Signature\n\n toUint8Array(): Uint8Array {\n return this.data.toUint8Array();\n }\n\n // endregion\n\n // region Serializable\n\n serialize(serializer: Serializer): void {\n serializer.serializeBytes(this.data.toUint8Array());\n }\n\n static deserialize(deserializer: Deserializer): Ed25519Signature {\n const bytes = deserializer.deserializeBytes();\n return new Ed25519Signature(bytes);\n }\n\n // endregion\n}\n"],"mappings":"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","names":["nacl","_Ed25519PublicKey","AccountPublicKey","hexInput","hex","Hex","args","message","signature","Ed25519Signature","messageBytes","signatureBytes","publicKeyBytes","nacl","AuthenticationKey","serializer","deserializer","bytes","publicKey","Ed25519PublicKey","_Ed25519PrivateKey","Serializable","privateKeyHex","keyPair","path","mnemonics","isValidHardenedPath","mnemonicToSeed","seed","offset","HARDENED_OFFSET","key","chainCode","deriveKey","segments","splitPath","el","privateKey","parentKeys","segment","CKDPriv","Ed25519PrivateKey","_Ed25519Signature","Signature","data"]}
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-4M46AWXX.mjs";import{a as s,b as t,c as r,d as i,e as c,f as u,g as d,h as A,i as g,j as m,k as a,l as p,m as f,n as y,o as C,p as O,q as T}from"./chunk-ENKMOALS.mjs";import{f as o}from"./chunk-HHJBCGAQ.mjs";var l=class{constructor(e){this.config=e}async getAccountInfo(e){return s({aptosConfig:this.config,...e})}async getAccountModules(e){return t({aptosConfig:this.config,...e})}async getAccountModule(e){return r({aptosConfig:this.config,...e})}async getAccountTransactions(e){return i({aptosConfig:this.config,...e})}async getAccountResources(e){return c({aptosConfig:this.config,...e})}async getAccountResource(e){return u({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return d({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),A({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),g({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),m({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),p({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),y({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),C({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:o,...e})}async getAccountCoinAmount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),f({aptosConfig:this.config,...e})}async getAccountOwnedObjects(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),O({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return T({aptosConfig:this.config,...e})}};export{l as a};
2
- //# sourceMappingURL=chunk-R56OJ4XC.mjs.map
1
+ import{a as n}from"./chunk-UMLDKLDL.mjs";import{a as s,b as t,c as r,d as i,e as c,f as u,g as d,h as A,i as g,j as m,k as a,l as p,m as f,n as y,o as C,p as O,q as T}from"./chunk-JEHR6GKW.mjs";import{e as o}from"./chunk-HEPV52CH.mjs";var l=class{constructor(e){this.config=e}async getAccountInfo(e){return s({aptosConfig:this.config,...e})}async getAccountModules(e){return t({aptosConfig:this.config,...e})}async getAccountModule(e){return r({aptosConfig:this.config,...e})}async getAccountTransactions(e){return i({aptosConfig:this.config,...e})}async getAccountResources(e){return c({aptosConfig:this.config,...e})}async getAccountResource(e){return u({aptosConfig:this.config,...e})}async lookupOriginalAccountAddress(e){return d({aptosConfig:this.config,...e})}async getAccountTokensCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),A({aptosConfig:this.config,...e})}async getAccountOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),g({aptosConfig:this.config,...e})}async getAccountOwnedTokensFromCollectionAddress(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),m({aptosConfig:this.config,...e})}async getAccountCollectionsWithOwnedTokens(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"token_v2_processor"}),a({aptosConfig:this.config,...e})}async getAccountTransactionsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"account_transactions_processor"}),p({aptosConfig:this.config,...e})}async getAccountCoinsData(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),y({aptosConfig:this.config,...e})}async getAccountCoinsCount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),C({aptosConfig:this.config,...e})}async getAccountAPTAmount(e){return this.getAccountCoinAmount({coinType:o,...e})}async getAccountCoinAmount(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"fungible_asset_processor"}),f({aptosConfig:this.config,...e})}async getAccountOwnedObjects(e){return await n({config:this.config,minimumLedgerVersion:e.minimumLedgerVersion,processorType:"default_processor"}),O({aptosConfig:this.config,...e})}async deriveAccountFromPrivateKey(e){return T({aptosConfig:this.config,...e})}};export{l as a};
2
+ //# sourceMappingURL=chunk-7U36LMP4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-ERWQOVBF.mjs";import{a as g,b as _}from"./chunk-7IGH7N52.mjs";import{a as p,c as b}from"./chunk-ZFIMVSCR.mjs";import{b as o}from"./chunk-F7CR75CJ.mjs";import{a as h}from"./chunk-N4RBQZ2B.mjs";var c=class extends h{static deserialize(t){let e=t.deserializeUleb128AsU32();switch(e){case 0:return d.load(t);case 1:return u.load(t);case 2:return l.load(t);case 3:return A.load(t);case 4:return y.load(t);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${e}`)}}},d=class i extends c{constructor(e,r){super();this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=p.deserialize(e),s=b.deserialize(e);return new i(r,s)}},u=class i extends c{constructor(e,r){super();this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=g.deserialize(e),s=_.deserialize(e);return new i(r,s)}},l=class i extends c{constructor(e,r,s){super();this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=s}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let r=n.deserialize(e),s=e.deserializeVector(o),a=e.deserializeVector(n);return new i(r,s,a)}},A=class i extends c{constructor(e,r,s,a){super();this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=s,this.fee_payer=a}serialize(e){e.serializeU32AsUleb128(3),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){let r=n.deserialize(e),s=e.deserializeVector(o),a=e.deserializeVector(n),z=o.deserialize(e),S=n.deserialize(e),E={address:z,authenticator:S};return new i(r,s,a,E)}},y=class i extends c{constructor(e){super();this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let r=n.deserialize(e);return new i(r)}};export{c as a,d as b,u as c,l as d,A as e,y as f};
2
- //# sourceMappingURL=chunk-NWRKJFHV.mjs.map
1
+ import{a as n}from"./chunk-YZZO6VDC.mjs";import{a as g,b as _}from"./chunk-C3HM7HQP.mjs";import{a as p,c as b}from"./chunk-7BDYKJXX.mjs";import{b as o}from"./chunk-F7CR75CJ.mjs";import{a as h}from"./chunk-N4RBQZ2B.mjs";var c=class extends h{static deserialize(t){let e=t.deserializeUleb128AsU32();switch(e){case 0:return d.load(t);case 1:return u.load(t);case 2:return l.load(t);case 3:return A.load(t);case 4:return y.load(t);default:throw new Error(`Unknown variant index for TransactionAuthenticator: ${e}`)}}},d=class i extends c{constructor(e,r){super();this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(0),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=p.deserialize(e),s=b.deserialize(e);return new i(r,s)}},u=class i extends c{constructor(e,r){super();this.public_key=e,this.signature=r}serialize(e){e.serializeU32AsUleb128(1),this.public_key.serialize(e),this.signature.serialize(e)}static load(e){let r=g.deserialize(e),s=_.deserialize(e);return new i(r,s)}},l=class i extends c{constructor(e,r,s){super();this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=s}serialize(e){e.serializeU32AsUleb128(2),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers)}static load(e){let r=n.deserialize(e),s=e.deserializeVector(o),a=e.deserializeVector(n);return new i(r,s,a)}},A=class i extends c{constructor(e,r,s,a){super();this.sender=e,this.secondary_signer_addresses=r,this.secondary_signers=s,this.fee_payer=a}serialize(e){e.serializeU32AsUleb128(3),this.sender.serialize(e),e.serializeVector(this.secondary_signer_addresses),e.serializeVector(this.secondary_signers),this.fee_payer.address.serialize(e),this.fee_payer.authenticator.serialize(e)}static load(e){let r=n.deserialize(e),s=e.deserializeVector(o),a=e.deserializeVector(n),z=o.deserialize(e),S=n.deserialize(e),E={address:z,authenticator:S};return new i(r,s,a,E)}},y=class i extends c{constructor(e){super();this.sender=e}serialize(e){e.serializeU32AsUleb128(4),this.sender.serialize(e)}static load(e){let r=n.deserialize(e);return new i(r)}};export{c as a,d as b,u as c,l as d,A as e,y as f};
2
+ //# sourceMappingURL=chunk-ARIC32W7.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r,b as i,c as s}from"./chunk-Q5HK3U64.mjs";import{a as o}from"./chunk-4M46AWXX.mjs";var t=class{constructor(e){this.config=e}async getNumberOfDelegators(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),r({aptosConfig:this.config,...e})}async getNumberOfDelegatorsForAllPools(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),i({aptosConfig:this.config,...e})}async getDelegatedStakingActivities(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),s({aptosConfig:this.config,...e})}};export{t as a};
2
- //# sourceMappingURL=chunk-SPOHAEHR.mjs.map
1
+ import{a as r,b as i,c as s}from"./chunk-NL3XVNS5.mjs";import{a as o}from"./chunk-UMLDKLDL.mjs";var t=class{constructor(e){this.config=e}async getNumberOfDelegators(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),r({aptosConfig:this.config,...e})}async getNumberOfDelegatorsForAllPools(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),i({aptosConfig:this.config,...e})}async getDelegatedStakingActivities(e){return await o({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"stake_processor"}),s({aptosConfig:this.config,...e})}};export{t as a};
2
+ //# sourceMappingURL=chunk-B7M3OWHV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i,b as t,c as n,d as o}from"./chunk-XBVORX5O.mjs";import{a as s}from"./chunk-4M46AWXX.mjs";var r=class{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),i({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),(await i({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetActivities(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),t({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),n({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return o({aptosConfig:this.config,...e})}};export{r as a};
2
- //# sourceMappingURL=chunk-6SRENFWH.mjs.map
1
+ import{a as i,b as t,c as n,d as o}from"./chunk-R4VJDSIP.mjs";import{a as s}from"./chunk-UMLDKLDL.mjs";var r=class{constructor(e){this.config=e}async getFungibleAssetMetadata(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),i({aptosConfig:this.config,...e})}async getFungibleAssetMetadataByAssetType(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),(await i({aptosConfig:this.config,options:{where:{asset_type:{_eq:e.assetType}}}}))[0]}async getFungibleAssetActivities(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),t({aptosConfig:this.config,...e})}async getCurrentFungibleAssetBalances(e){return await s({config:this.config,minimumLedgerVersion:e?.minimumLedgerVersion,processorType:"fungible_asset_processor"}),n({aptosConfig:this.config,...e})}async transferFungibleAsset(e){return o({aptosConfig:this.config,...e})}};export{r as a};
2
+ //# sourceMappingURL=chunk-BBUAAJRA.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as h,c as l}from"./chunk-7BDYKJXX.mjs";import{b as E}from"./chunk-WKUXBIYB.mjs";import{a as p}from"./chunk-WME5D6YR.mjs";import{a as g}from"./chunk-LMXP3JUU.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-C3HM7HQP.mjs.map
@@ -0,0 +1 @@
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 */\nexport class MultiEd25519PublicKey extends AccountPublicKey {\n /**\n * Maximum number of public keys supported\n */\n static readonly MAX_KEYS = 32;\n\n /**\n * Minimum number of public keys needed\n */\n static readonly MIN_KEYS = 2;\n\n /**\n * Minimum threshold for the number of valid signatures required\n */\n static readonly MIN_THRESHOLD = 1;\n\n /**\n * List of Ed25519 public keys for this LegacyMultiEd25519PublicKey\n */\n public readonly publicKeys: Ed25519PublicKey[];\n\n /**\n * The minimum number of valid signatures required, for the number of public keys specified\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 *\n * @param args.publicKeys A list of public keys\n * @param args.threshold At least \"threshold\" signatures must be valid\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 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 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 */\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 serialize(serializer: Serializer): void {\n serializer.serializeBytes(this.toUint8Array());\n }\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 */\nexport class MultiEd25519Signature extends Signature {\n /**\n * Maximum number of Ed25519 signatures supported\n */\n static MAX_SIGNATURES_SUPPORTED = 32;\n\n /**\n * Number of bytes in the bitmap representing who signed the transaction (32-bits)\n */\n static BITMAP_LEN: number = 4;\n\n /**\n * The list of underlying Ed25519 signatures\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 */\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 */\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 */\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 * @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 */\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 +1,2 @@
1
- import{m as g,v as i}from"./chunk-S4SEFF4K.mjs";import{b as n}from"./chunk-JJ6Y35DF.mjs";import{b as a,c}from"./chunk-VPQ46CAO.mjs";async function l(o){let{aptosConfig:e}=o,{data:t}=await n({aptosConfig:e,originMethod:"getLedgerInfo",path:""});return t}async function h(o){let{aptosConfig:e,ledgerVersion:t,options:s}=o,{data:r}=await n({aptosConfig:e,originMethod:"getBlockByVersion",path:`blocks/by_version/${t}`,params:{with_transactions:s?.withTransactions}});return r}async function m(o){let{aptosConfig:e,blockHeight:t,options:s}=o,{data:r}=await n({aptosConfig:e,originMethod:"getBlockByHeight",path:`blocks/by_height/${t}`,params:{with_transactions:s?.withTransactions}});return r}async function C(o){let{aptosConfig:e,handle:t,data:s,options:r}=o;return(await a({aptosConfig:e,originMethod:"getTableItem",path:`tables/${t}/item`,params:{ledger_version:r?.ledgerVersion},body:s})).data}async function T(o){let{aptosConfig:e,payload:t,options:s}=o,{data:r}=await a({aptosConfig:e,originMethod:"view",path:"view",params:{ledger_version:s?.ledgerVersion},body:{function:t.function,type_arguments:t.typeArguments??[],arguments:t.functionArguments??[]}});return r}async function q(o){let{aptosConfig:e,limit:t}=o;return(await p({aptosConfig:e,query:{query:g,variables:{limit:t}},originMethod:"getChainTopUserTransactions"})).user_transactions}async function p(o){let{aptosConfig:e,query:t,originMethod:s}=o,{data:r}=await c({aptosConfig:e,originMethod:s??"queryIndexer",path:"",body:t,overrides:{WITH_CREDENTIALS:!1}});return r}async function f(o){let{aptosConfig:e}=o;return(await p({aptosConfig:e,query:{query:i},originMethod:"getProcessorStatuses"})).processor_status}async function w(o){let e=await f({aptosConfig:o.aptosConfig});return BigInt(e[0].last_success_version)}async function A(o){let{aptosConfig:e,processorType:t}=o,s={processor:{_eq:t.valueOf()}};return(await p({aptosConfig:e,query:{query:i,variables:{where_condition:s}},originMethod:"getProcessorStatus"})).processor_status[0]}export{l as a,h as b,m as c,C as d,T as e,q as f,p as g,f as h,w as i,A as j};
2
- //# sourceMappingURL=chunk-PMWH5IGI.mjs.map
1
+ import{m as g,v as i}from"./chunk-S4SEFF4K.mjs";import{b as n}from"./chunk-DGOT2VR5.mjs";import{b as a,c}from"./chunk-UIUSDBCL.mjs";async function l(o){let{aptosConfig:e}=o,{data:t}=await n({aptosConfig:e,originMethod:"getLedgerInfo",path:""});return t}async function h(o){let{aptosConfig:e,ledgerVersion:t,options:s}=o,{data:r}=await n({aptosConfig:e,originMethod:"getBlockByVersion",path:`blocks/by_version/${t}`,params:{with_transactions:s?.withTransactions}});return r}async function m(o){let{aptosConfig:e,blockHeight:t,options:s}=o,{data:r}=await n({aptosConfig:e,originMethod:"getBlockByHeight",path:`blocks/by_height/${t}`,params:{with_transactions:s?.withTransactions}});return r}async function C(o){let{aptosConfig:e,handle:t,data:s,options:r}=o;return(await a({aptosConfig:e,originMethod:"getTableItem",path:`tables/${t}/item`,params:{ledger_version:r?.ledgerVersion},body:s})).data}async function T(o){let{aptosConfig:e,payload:t,options:s}=o,{data:r}=await a({aptosConfig:e,originMethod:"view",path:"view",params:{ledger_version:s?.ledgerVersion},body:{function:t.function,type_arguments:t.typeArguments??[],arguments:t.functionArguments??[]}});return r}async function q(o){let{aptosConfig:e,limit:t}=o;return(await p({aptosConfig:e,query:{query:g,variables:{limit:t}},originMethod:"getChainTopUserTransactions"})).user_transactions}async function p(o){let{aptosConfig:e,query:t,originMethod:s}=o,{data:r}=await c({aptosConfig:e,originMethod:s??"queryIndexer",path:"",body:t,overrides:{WITH_CREDENTIALS:!1}});return r}async function f(o){let{aptosConfig:e}=o;return(await p({aptosConfig:e,query:{query:i},originMethod:"getProcessorStatuses"})).processor_status}async function w(o){let e=await f({aptosConfig:o.aptosConfig});return BigInt(e[0].last_success_version)}async function A(o){let{aptosConfig:e,processorType:t}=o,s={processor:{_eq:t.valueOf()}};return(await p({aptosConfig:e,query:{query:i,variables:{where_condition:s}},originMethod:"getProcessorStatus"})).processor_status[0]}export{l as a,h as b,m as c,C as d,T as e,q as f,p as g,f as h,w as i,A as j};
2
+ //# sourceMappingURL=chunk-CHA5DSSD.mjs.map
@@ -0,0 +1,2 @@
1
+ var o="1.9.0";export{o as a};
2
+ //# sourceMappingURL=chunk-DE5OOOVY.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.8.0\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
1
+ {"version":3,"sources":["../../src/version.ts"],"sourcesContent":["// Copyright © Aptos Foundation\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The current version of the SDK\n *\n * hardcoded for now, we would want to have it injected dynamically\n */\nexport const VERSION = \"1.9.0\";\n"],"mappings":"AAQO,IAAMA,EAAU","names":["VERSION"]}
@@ -1,2 +1,2 @@
1
- import{b as r}from"./chunk-QGIJNA37.mjs";async function p(e){let{aptosConfig:t,overrides:s,params:n,contentType:o,acceptType:i,path:a,originMethod:u,type:R}=e,d=t.getRequestUrl(R);return r({url:d,method:"GET",originMethod:u,path:a,contentType:o?.valueOf(),acceptType:i?.valueOf(),params:n,overrides:{...t.clientConfig,...s}},t)}async function g(e){return p({...e,type:0})}async function f(e){let t=[],s,n=e.params;do{let o=await p({type:0,aptosConfig:e.aptosConfig,originMethod:e.originMethod,path:e.path,params:n,overrides:e.overrides});s=o.headers["x-aptos-cursor"],delete o.headers,t.push(...o.data),n.start=s}while(s!=null);return t}export{p as a,g as b,f as c};
2
- //# sourceMappingURL=chunk-JJ6Y35DF.mjs.map
1
+ import{b as r}from"./chunk-VMXBMAYK.mjs";async function p(e){let{aptosConfig:t,overrides:s,params:n,contentType:o,acceptType:i,path:a,originMethod:u,type:R}=e,d=t.getRequestUrl(R);return r({url:d,method:"GET",originMethod:u,path:a,contentType:o?.valueOf(),acceptType:i?.valueOf(),params:n,overrides:{...t.clientConfig,...s}},t)}async function g(e){return p({...e,type:0})}async function f(e){let t=[],s,n=e.params;do{let o=await p({type:0,aptosConfig:e.aptosConfig,originMethod:e.originMethod,path:e.path,params:n,overrides:e.overrides});s=o.headers["x-aptos-cursor"],delete o.headers,t.push(...o.data),n.start=s}while(s!=null);return t}export{p as a,g as b,f as c};
2
+ //# sourceMappingURL=chunk-DGOT2VR5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-ENDUXRTK.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
- //# sourceMappingURL=chunk-EUHPML5E.mjs.map
1
+ import{a as i}from"./chunk-6EMN3BOV.mjs";import{g as a}from"./chunk-KWJTVJ7C.mjs";import{a as o}from"./chunk-FVA2OPG4.mjs";var n=class{constructor(t){this.config=t}async simple(t){return a({aptosConfig:this.config,...t})}async multiAgent(t){return a({aptosConfig:this.config,...t})}};o([i],n.prototype,"simple",1),o([i],n.prototype,"multiAgent",1);export{n as a};
2
+ //# sourceMappingURL=chunk-EF2F7NWO.mjs.map
@@ -1,2 +1,2 @@
1
- import{c as a}from"./chunk-2H5Z5EHH.mjs";import e from"eventemitter3";var i=class extends e{constructor(t){super();this.config=t}start(t){let{sender:n}=t;this.account=n,this.transactionWorker=new a(this.config,n),this.transactionWorker.start(),this.registerToEvents()}push(t){let{data:n,options:o}=t;for(let r of n)this.transactionWorker.push(r,o)}registerToEvents(){this.transactionWorker.on("transactionSent",async t=>{this.emit("transactionSent",t)}),this.transactionWorker.on("transactionSendFailed",async t=>{this.emit("transactionSendFailed",t)}),this.transactionWorker.on("transactionExecuted",async t=>{this.emit("transactionExecuted",t)}),this.transactionWorker.on("transactionExecutionFailed",async t=>{this.emit("transactionExecutionFailed",t)}),this.transactionWorker.on("executionFinish",async t=>{this.emit("executionFinish",t)})}forSingleAccount(t){try{let{sender:n,data:o,options:r}=t;this.start({sender:n}),this.push({data:o,options:r})}catch(n){throw new Error(`failed to submit transactions with error: ${n}`)}}};export{i as a};
2
- //# sourceMappingURL=chunk-FRLPX47J.mjs.map
1
+ import{c as a}from"./chunk-TN5BUH4F.mjs";import e from"eventemitter3";var i=class extends e{constructor(t){super();this.config=t}start(t){let{sender:n}=t;this.account=n,this.transactionWorker=new a(this.config,n),this.transactionWorker.start(),this.registerToEvents()}push(t){let{data:n,options:o}=t;for(let r of n)this.transactionWorker.push(r,o)}registerToEvents(){this.transactionWorker.on("transactionSent",async t=>{this.emit("transactionSent",t)}),this.transactionWorker.on("transactionSendFailed",async t=>{this.emit("transactionSendFailed",t)}),this.transactionWorker.on("transactionExecuted",async t=>{this.emit("transactionExecuted",t)}),this.transactionWorker.on("transactionExecutionFailed",async t=>{this.emit("transactionExecutionFailed",t)}),this.transactionWorker.on("executionFinish",async t=>{this.emit("executionFinish",t)})}forSingleAccount(t){try{let{sender:n,data:o,options:r}=t;this.start({sender:n}),this.push({data:o,options:r})}catch(n){throw new Error(`failed to submit transactions with error: ${n}`)}}};export{i as a};
2
+ //# sourceMappingURL=chunk-EQZ757ES.mjs.map