@aptos-labs/ts-sdk 1.14.0-zeta.1 → 1.14.0-zeta.3

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 (435) hide show
  1. package/dist/common/chunk-KSEUZTKY.js +2 -0
  2. package/dist/common/chunk-KSEUZTKY.js.map +1 -0
  3. package/dist/common/cli/index.js +1 -245
  4. package/dist/common/cli/index.js.map +1 -1
  5. package/dist/common/index.d.ts +1 -1
  6. package/dist/common/index.js +390 -11802
  7. package/dist/common/index.js.map +1 -1
  8. package/dist/esm/account/Account.mjs +1 -55
  9. package/dist/esm/account/Ed25519Account.mjs +1 -53
  10. package/dist/esm/account/EphemeralKeyPair.mjs +1 -36
  11. package/dist/esm/account/KeylessAccount.mjs +1 -56
  12. package/dist/esm/account/MultiKeyAccount.mjs +1 -55
  13. package/dist/esm/account/SingleKeyAccount.mjs +1 -53
  14. package/dist/esm/account/index.mjs +1 -76
  15. package/dist/esm/api/account.mjs +1 -76
  16. package/dist/esm/api/ans.mjs +1 -87
  17. package/dist/esm/api/aptos.mjs +1 -116
  18. package/dist/esm/api/aptosConfig.mjs +1 -9
  19. package/dist/esm/api/coin.mjs +1 -86
  20. package/dist/esm/api/digitalAsset.mjs +1 -87
  21. package/dist/esm/api/event.mjs +1 -54
  22. package/dist/esm/api/faucet.mjs +1 -53
  23. package/dist/esm/api/fungibleAsset.mjs +1 -87
  24. package/dist/esm/api/general.mjs +1 -84
  25. package/dist/esm/api/index.mjs +1 -120
  26. package/dist/esm/api/keyless.mjs +1 -70
  27. package/dist/esm/api/staking.mjs +1 -54
  28. package/dist/esm/api/transaction.mjs +1 -94
  29. package/dist/esm/api/transactionSubmission/build.mjs +1 -85
  30. package/dist/esm/api/transactionSubmission/helpers.mjs +1 -9
  31. package/dist/esm/api/transactionSubmission/management.mjs +1 -89
  32. package/dist/esm/api/transactionSubmission/sign.mjs +1 -109
  33. package/dist/esm/api/transactionSubmission/sign.mjs.map +1 -1
  34. package/dist/esm/api/transactionSubmission/simulate.mjs +1 -86
  35. package/dist/esm/api/transactionSubmission/submit.mjs +1 -86
  36. package/dist/esm/api/utils.mjs +1 -34
  37. package/dist/esm/bcs/consts.mjs +1 -17
  38. package/dist/esm/bcs/deserializer.mjs +1 -8
  39. package/dist/esm/bcs/index.mjs +1 -57
  40. package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -12
  41. package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -11
  42. package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -25
  43. package/dist/esm/bcs/serializable/moveStructs.mjs +1 -18
  44. package/dist/esm/bcs/serializer.mjs +1 -18
  45. package/dist/esm/chunk-23MNZ5LZ.mjs +2 -0
  46. package/dist/esm/{chunk-RCQMWXEW.mjs.map → chunk-23MNZ5LZ.mjs.map} +1 -1
  47. package/dist/esm/chunk-24ZOKI52.mjs +2 -0
  48. package/dist/esm/{chunk-F2ZWA7B7.mjs.map → chunk-24ZOKI52.mjs.map} +1 -1
  49. package/dist/esm/chunk-25H3DXTL.mjs +2 -0
  50. package/dist/esm/{chunk-B5S6DDUD.mjs.map → chunk-25H3DXTL.mjs.map} +1 -1
  51. package/dist/esm/chunk-2ECWQRBB.mjs +2 -0
  52. package/dist/esm/{chunk-2OQW7BMN.mjs.map → chunk-2ECWQRBB.mjs.map} +1 -1
  53. package/dist/esm/chunk-2HD2G4AH.mjs +2 -0
  54. package/dist/esm/{chunk-Y2LV3S5W.mjs.map → chunk-2HD2G4AH.mjs.map} +1 -1
  55. package/dist/esm/chunk-3CMS2KOX.mjs +2 -0
  56. package/dist/esm/{chunk-NW45SCPY.mjs.map → chunk-3CMS2KOX.mjs.map} +1 -1
  57. package/dist/esm/chunk-3COVJN6Z.mjs +2 -0
  58. package/dist/esm/{chunk-2JOCR2VL.mjs.map → chunk-3COVJN6Z.mjs.map} +1 -1
  59. package/dist/esm/chunk-3CUVYW32.mjs +2 -0
  60. package/dist/esm/{chunk-DIYZRGR6.mjs.map → chunk-3CUVYW32.mjs.map} +1 -1
  61. package/dist/esm/chunk-3FVRXELT.mjs +2 -0
  62. package/dist/esm/{chunk-KK2BSALW.mjs.map → chunk-3FVRXELT.mjs.map} +1 -1
  63. package/dist/esm/chunk-3JPVQHOR.mjs +2 -0
  64. package/dist/esm/{chunk-GGMTQAQP.mjs.map → chunk-3JPVQHOR.mjs.map} +1 -1
  65. package/dist/esm/chunk-3S3GIUQY.mjs +2 -0
  66. package/dist/esm/{chunk-ASF2VWOX.mjs.map → chunk-3S3GIUQY.mjs.map} +1 -1
  67. package/dist/esm/chunk-3VGX3TXH.mjs +2 -0
  68. package/dist/esm/{chunk-7FO3S6IZ.mjs.map → chunk-3VGX3TXH.mjs.map} +1 -1
  69. package/dist/esm/chunk-56CNRT2K.mjs +2 -0
  70. package/dist/esm/{chunk-SBB4YEPT.mjs.map → chunk-56CNRT2K.mjs.map} +1 -1
  71. package/dist/esm/chunk-5XOFEQWC.mjs +2 -0
  72. package/dist/esm/{chunk-ATVFVXR6.mjs.map → chunk-5XOFEQWC.mjs.map} +1 -1
  73. package/dist/esm/chunk-6EMN3BOV.mjs +2 -0
  74. package/dist/esm/{chunk-SIJELMDP.mjs.map → chunk-6EMN3BOV.mjs.map} +1 -1
  75. package/dist/esm/chunk-6RBUXB5I.mjs +2 -0
  76. package/dist/esm/{chunk-WK5ZSNE2.mjs.map → chunk-6RBUXB5I.mjs.map} +1 -1
  77. package/dist/esm/chunk-6WIB3GGF.mjs +2 -0
  78. package/dist/esm/{chunk-CTJSZT5V.mjs.map → chunk-6WIB3GGF.mjs.map} +1 -1
  79. package/dist/esm/chunk-75J7H3XD.mjs +2 -0
  80. package/dist/esm/{chunk-GBEVD2VM.mjs.map → chunk-75J7H3XD.mjs.map} +1 -1
  81. package/dist/esm/chunk-7IMWGGA6.mjs +2 -0
  82. package/dist/esm/{chunk-UX5NSZEN.mjs.map → chunk-7IMWGGA6.mjs.map} +1 -1
  83. package/dist/esm/chunk-7KOC7VNK.mjs +2 -0
  84. package/dist/esm/{chunk-YYOPNUX5.mjs.map → chunk-7KOC7VNK.mjs.map} +1 -1
  85. package/dist/esm/chunk-7SIQDOYY.mjs +2 -0
  86. package/dist/esm/{chunk-ST4QXIMI.mjs.map → chunk-7SIQDOYY.mjs.map} +1 -1
  87. package/dist/esm/chunk-7STYQ5ZE.mjs +2 -0
  88. package/dist/esm/{chunk-UEBBLQJ5.mjs.map → chunk-7STYQ5ZE.mjs.map} +1 -1
  89. package/dist/esm/chunk-7XYECSW6.mjs +2 -0
  90. package/dist/esm/{chunk-GSVQ6EUD.mjs.map → chunk-7XYECSW6.mjs.map} +1 -1
  91. package/dist/esm/chunk-AH44UPM4.mjs +2 -0
  92. package/dist/esm/{chunk-EYHRMZPO.mjs.map → chunk-AH44UPM4.mjs.map} +1 -1
  93. package/dist/esm/chunk-AHNE2QA3.mjs +2 -0
  94. package/dist/esm/{chunk-WDRH2URB.mjs.map → chunk-AHNE2QA3.mjs.map} +1 -1
  95. package/dist/esm/chunk-AJ7UC2G3.mjs +2 -0
  96. package/dist/esm/{chunk-ZAHJ7KXB.mjs.map → chunk-AJ7UC2G3.mjs.map} +1 -1
  97. package/dist/esm/chunk-AOCNYMMX.mjs +2 -0
  98. package/dist/esm/{chunk-YV7M4CFP.mjs.map → chunk-AOCNYMMX.mjs.map} +1 -1
  99. package/dist/esm/chunk-BTLFW3YY.mjs +2 -0
  100. package/dist/esm/{chunk-2ZEGJU43.mjs.map → chunk-BTLFW3YY.mjs.map} +1 -1
  101. package/dist/esm/chunk-C3L4ETUF.mjs +2 -0
  102. package/dist/esm/{chunk-PIMQHG2J.mjs.map → chunk-C3L4ETUF.mjs.map} +1 -1
  103. package/dist/esm/chunk-CB6CNNM2.mjs +2 -0
  104. package/dist/esm/{chunk-VPWUODU4.mjs.map → chunk-CB6CNNM2.mjs.map} +1 -1
  105. package/dist/esm/chunk-CO53EOHE.mjs +2 -0
  106. package/dist/esm/{chunk-MZZLEY6O.mjs.map → chunk-CO53EOHE.mjs.map} +1 -1
  107. package/dist/esm/chunk-COW5IGYC.mjs +2 -0
  108. package/dist/esm/{chunk-FXKSE3ZP.mjs.map → chunk-COW5IGYC.mjs.map} +1 -1
  109. package/dist/esm/chunk-CS7B3FVO.mjs +2 -0
  110. package/dist/esm/{chunk-CXUGZXED.mjs.map → chunk-CS7B3FVO.mjs.map} +1 -1
  111. package/dist/esm/chunk-DD2VWOMZ.mjs +2 -0
  112. package/dist/esm/{chunk-55NODGHC.mjs.map → chunk-DD2VWOMZ.mjs.map} +1 -1
  113. package/dist/esm/chunk-EB7AI4B4.mjs +2 -0
  114. package/dist/esm/{chunk-AR7X6GWQ.mjs.map → chunk-EB7AI4B4.mjs.map} +1 -1
  115. package/dist/esm/chunk-FBPNHF54.mjs +2 -0
  116. package/dist/esm/{chunk-QMM2KL6C.mjs.map → chunk-FBPNHF54.mjs.map} +1 -1
  117. package/dist/esm/chunk-FLYEALDB.mjs +2 -0
  118. package/dist/esm/{chunk-76TSTAU4.mjs.map → chunk-FLYEALDB.mjs.map} +1 -1
  119. package/dist/esm/chunk-FVA2OPG4.mjs +2 -0
  120. package/dist/esm/chunk-GNNNICLW.mjs +2 -0
  121. package/dist/esm/{chunk-DGV7DYU4.mjs.map → chunk-GNNNICLW.mjs.map} +1 -1
  122. package/dist/esm/chunk-GQ6HIKZT.mjs +2 -0
  123. package/dist/esm/{chunk-NYL77J4X.mjs.map → chunk-GQ6HIKZT.mjs.map} +1 -1
  124. package/dist/esm/chunk-H62IKYXG.mjs +2 -0
  125. package/dist/esm/{chunk-QFOG4LIN.mjs.map → chunk-H62IKYXG.mjs.map} +1 -1
  126. package/dist/esm/chunk-HGZGTBA4.mjs +2 -0
  127. package/dist/esm/{chunk-PYLOAMR2.mjs.map → chunk-HGZGTBA4.mjs.map} +1 -1
  128. package/dist/esm/chunk-HHVAU5HU.mjs +2 -0
  129. package/dist/esm/{chunk-UKU6A2W2.mjs.map → chunk-HHVAU5HU.mjs.map} +1 -1
  130. package/dist/esm/chunk-HMFL7AOJ.mjs +2 -0
  131. package/dist/esm/{chunk-KMXSRHJ6.mjs.map → chunk-HMFL7AOJ.mjs.map} +1 -1
  132. package/dist/esm/chunk-HSFG2AIK.mjs +2 -0
  133. package/dist/esm/{chunk-HBNSRCZN.mjs.map → chunk-HSFG2AIK.mjs.map} +1 -1
  134. package/dist/esm/chunk-HYDDIAJ6.mjs +2 -0
  135. package/dist/esm/{chunk-IC56GQFJ.mjs.map → chunk-HYDDIAJ6.mjs.map} +1 -1
  136. package/dist/esm/chunk-HYU23YVP.mjs +2 -0
  137. package/dist/esm/{chunk-U3IUCR2G.mjs.map → chunk-HYU23YVP.mjs.map} +1 -1
  138. package/dist/esm/chunk-JLWKIYHV.mjs +2 -0
  139. package/dist/esm/{chunk-WHBWEN6N.mjs.map → chunk-JLWKIYHV.mjs.map} +1 -1
  140. package/dist/esm/chunk-JM2B5E2I.mjs +2 -0
  141. package/dist/esm/{chunk-CX3NAVRD.mjs.map → chunk-JM2B5E2I.mjs.map} +1 -1
  142. package/dist/esm/chunk-JM544NRW.mjs +2 -0
  143. package/dist/esm/{chunk-7REUIYF4.mjs.map → chunk-JM544NRW.mjs.map} +1 -1
  144. package/dist/esm/chunk-KMKSA7LM.mjs +2 -0
  145. package/dist/esm/{chunk-FF4JPDKD.mjs.map → chunk-KMKSA7LM.mjs.map} +1 -1
  146. package/dist/esm/chunk-L54P6EGN.mjs +2 -0
  147. package/dist/esm/{chunk-SS3NUM5L.mjs.map → chunk-L54P6EGN.mjs.map} +1 -1
  148. package/dist/esm/chunk-L5WUYZ35.mjs +2 -0
  149. package/dist/esm/{chunk-7FUHWL6A.mjs.map → chunk-L5WUYZ35.mjs.map} +1 -1
  150. package/dist/esm/chunk-LDQ6JFEF.mjs +2 -0
  151. package/dist/esm/{chunk-N4WKFNQ6.mjs.map → chunk-LDQ6JFEF.mjs.map} +1 -1
  152. package/dist/esm/chunk-LR65XHSF.mjs +2 -0
  153. package/dist/esm/{chunk-PU5AFUX3.mjs.map → chunk-LR65XHSF.mjs.map} +1 -1
  154. package/dist/esm/chunk-MGOHPDX4.mjs +2 -0
  155. package/dist/esm/{chunk-2TJJWII2.mjs.map → chunk-MGOHPDX4.mjs.map} +1 -1
  156. package/dist/esm/chunk-MOKAU77C.mjs +2 -0
  157. package/dist/esm/{chunk-IHNPN5CQ.mjs.map → chunk-MOKAU77C.mjs.map} +1 -1
  158. package/dist/esm/chunk-MWUJCP27.mjs +2 -0
  159. package/dist/esm/{chunk-6MSZMIFW.mjs.map → chunk-MWUJCP27.mjs.map} +1 -1
  160. package/dist/esm/chunk-N466X3S6.mjs +2 -0
  161. package/dist/esm/{chunk-WLTBF4DF.mjs.map → chunk-N466X3S6.mjs.map} +1 -1
  162. package/dist/esm/chunk-NBEXLW7P.mjs +2 -0
  163. package/dist/esm/{chunk-D2BVBXWO.mjs.map → chunk-NBEXLW7P.mjs.map} +1 -1
  164. package/dist/esm/chunk-NC5HHEEM.mjs +2 -0
  165. package/dist/esm/{chunk-XANFAUBD.mjs.map → chunk-NC5HHEEM.mjs.map} +1 -1
  166. package/dist/esm/chunk-O3PLAAN7.mjs +2 -0
  167. package/dist/esm/{chunk-LLLQJWRZ.mjs.map → chunk-O3PLAAN7.mjs.map} +1 -1
  168. package/dist/esm/chunk-P2WALKSW.mjs +2 -0
  169. package/dist/esm/{chunk-O6PSHSN3.mjs.map → chunk-P2WALKSW.mjs.map} +1 -1
  170. package/dist/esm/chunk-P7JMD7KZ.mjs +2 -0
  171. package/dist/esm/{chunk-TBHU6ZW6.mjs.map → chunk-P7JMD7KZ.mjs.map} +1 -1
  172. package/dist/esm/chunk-PFFAQZHT.mjs +2 -0
  173. package/dist/esm/{chunk-DNPMS2OF.mjs.map → chunk-PFFAQZHT.mjs.map} +1 -1
  174. package/dist/esm/chunk-PGCBIU33.mjs +2 -0
  175. package/dist/esm/{chunk-4OYYOYSO.mjs.map → chunk-PGCBIU33.mjs.map} +1 -1
  176. package/dist/esm/chunk-PMPTAPM3.mjs +2 -0
  177. package/dist/esm/{chunk-DVPQGCFT.mjs.map → chunk-PMPTAPM3.mjs.map} +1 -1
  178. package/dist/esm/chunk-PYUWGGAW.mjs +2 -0
  179. package/dist/esm/chunk-PYUWGGAW.mjs.map +1 -0
  180. package/dist/esm/chunk-R52BRP36.mjs +2 -0
  181. package/dist/esm/{chunk-BXMHDQHW.mjs.map → chunk-R52BRP36.mjs.map} +1 -1
  182. package/dist/esm/chunk-RKHPXZM6.mjs +2 -0
  183. package/dist/esm/{chunk-PCLNX6FS.mjs.map → chunk-RKHPXZM6.mjs.map} +1 -1
  184. package/dist/esm/chunk-RKTM5GBP.mjs +2 -0
  185. package/dist/esm/{chunk-LI2QV6RU.mjs.map → chunk-RKTM5GBP.mjs.map} +1 -1
  186. package/dist/esm/{chunk-4PJ5FYGQ.mjs → chunk-S4SEFF4K.mjs} +27 -302
  187. package/dist/esm/{chunk-4PJ5FYGQ.mjs.map → chunk-S4SEFF4K.mjs.map} +1 -1
  188. package/dist/esm/chunk-SI7MPP6G.mjs +2 -0
  189. package/dist/esm/{chunk-RX4VG2AT.mjs.map → chunk-SI7MPP6G.mjs.map} +1 -1
  190. package/dist/esm/chunk-SLI3KELH.mjs +2 -0
  191. package/dist/esm/{chunk-7IDBB4J4.mjs.map → chunk-SLI3KELH.mjs.map} +1 -1
  192. package/dist/esm/chunk-STYDBDYL.mjs +2 -0
  193. package/dist/esm/{chunk-FDWJNY4U.mjs.map → chunk-STYDBDYL.mjs.map} +1 -1
  194. package/dist/esm/chunk-T23OVRNF.mjs +2 -0
  195. package/dist/esm/{chunk-CMNJG4NN.mjs.map → chunk-T23OVRNF.mjs.map} +1 -1
  196. package/dist/esm/chunk-TE3WIJ26.mjs +2 -0
  197. package/dist/esm/{chunk-CC4DQ6NH.mjs.map → chunk-TE3WIJ26.mjs.map} +1 -1
  198. package/dist/esm/chunk-TICM455H.mjs +2 -0
  199. package/dist/esm/{chunk-ZMFKQUHL.mjs.map → chunk-TICM455H.mjs.map} +1 -1
  200. package/dist/esm/chunk-TJDC5PWD.mjs +2 -0
  201. package/dist/esm/{chunk-NMKCJNQM.mjs.map → chunk-TJDC5PWD.mjs.map} +1 -1
  202. package/dist/esm/chunk-TVRJ3M7B.mjs +2 -0
  203. package/dist/esm/{chunk-FQQW55X7.mjs.map → chunk-TVRJ3M7B.mjs.map} +1 -1
  204. package/dist/esm/chunk-U5C2PXC6.mjs +2 -0
  205. package/dist/esm/{chunk-WVGO4D7K.mjs.map → chunk-U5C2PXC6.mjs.map} +1 -1
  206. package/dist/esm/chunk-U6Z4FNB7.mjs +2 -0
  207. package/dist/esm/{chunk-AC3OGAL6.mjs.map → chunk-U6Z4FNB7.mjs.map} +1 -1
  208. package/dist/esm/chunk-UTXJOB3O.mjs +2 -0
  209. package/dist/esm/{chunk-QBBTUC66.mjs.map → chunk-UTXJOB3O.mjs.map} +1 -1
  210. package/dist/esm/chunk-VL6EYA53.mjs +2 -0
  211. package/dist/esm/{chunk-VZQXLVEP.mjs.map → chunk-VL6EYA53.mjs.map} +1 -1
  212. package/dist/esm/chunk-VPKPQBKL.mjs +2 -0
  213. package/dist/esm/{chunk-6LRQSBRH.mjs.map → chunk-VPKPQBKL.mjs.map} +1 -1
  214. package/dist/esm/chunk-VSD2AWUR.mjs +2 -0
  215. package/dist/esm/chunk-VSD2AWUR.mjs.map +1 -0
  216. package/dist/esm/chunk-VT6XJSRO.mjs +2 -0
  217. package/dist/esm/{chunk-7JRMOHBP.mjs.map → chunk-VT6XJSRO.mjs.map} +1 -1
  218. package/dist/esm/chunk-WM2NCYZL.mjs +2 -0
  219. package/dist/esm/{chunk-VKJQORON.mjs.map → chunk-WM2NCYZL.mjs.map} +1 -1
  220. package/dist/esm/chunk-WWGROAKX.mjs +2 -0
  221. package/dist/esm/{chunk-W76MGKZB.mjs.map → chunk-WWGROAKX.mjs.map} +1 -1
  222. package/dist/esm/chunk-XZGQMZ2H.mjs +2 -0
  223. package/dist/esm/{chunk-VJP2VWMF.mjs.map → chunk-XZGQMZ2H.mjs.map} +1 -1
  224. package/dist/esm/chunk-Y33CIIZX.mjs +2 -0
  225. package/dist/esm/{chunk-JHDHNGJ3.mjs.map → chunk-Y33CIIZX.mjs.map} +1 -1
  226. package/dist/esm/chunk-Y4SSUCPJ.mjs +2 -0
  227. package/dist/esm/{chunk-VDJBDX3A.mjs.map → chunk-Y4SSUCPJ.mjs.map} +1 -1
  228. package/dist/esm/chunk-YE5B2S5L.mjs +2 -0
  229. package/dist/esm/{chunk-NFJCQRVK.mjs.map → chunk-YE5B2S5L.mjs.map} +1 -1
  230. package/dist/esm/chunk-YGOJYDJA.mjs +2 -0
  231. package/dist/esm/{chunk-LYK4TQZO.mjs.map → chunk-YGOJYDJA.mjs.map} +1 -1
  232. package/dist/esm/chunk-YNNPWCF6.mjs +2 -0
  233. package/dist/esm/{chunk-NXFO2W4G.mjs.map → chunk-YNNPWCF6.mjs.map} +1 -1
  234. package/dist/esm/chunk-YV7OBLK2.mjs +2 -0
  235. package/dist/esm/{chunk-TLNHRJB2.mjs.map → chunk-YV7OBLK2.mjs.map} +1 -1
  236. package/dist/esm/chunk-ZKRG4C4U.mjs +2 -0
  237. package/dist/esm/{chunk-LYMY63SO.mjs.map → chunk-ZKRG4C4U.mjs.map} +1 -1
  238. package/dist/esm/chunk-ZNEBMSNC.mjs +2 -0
  239. package/dist/esm/{chunk-JL2JHVS4.mjs.map → chunk-ZNEBMSNC.mjs.map} +1 -1
  240. package/dist/esm/chunk-ZPMS2Q37.mjs +2 -0
  241. package/dist/esm/{chunk-KVSQ57HU.mjs.map → chunk-ZPMS2Q37.mjs.map} +1 -1
  242. package/dist/esm/cli/index.mjs +1 -12
  243. package/dist/esm/cli/localNode.mjs +1 -8
  244. package/dist/esm/cli/move.mjs +1 -7
  245. package/dist/esm/client/core.mjs +1 -27
  246. package/dist/esm/client/get.mjs +1 -32
  247. package/dist/esm/client/index.mjs +1 -55
  248. package/dist/esm/client/post.mjs +1 -36
  249. package/dist/esm/client/types.mjs +1 -7
  250. package/dist/esm/core/account/index.mjs +1 -19
  251. package/dist/esm/core/account/utils/address.mjs +1 -18
  252. package/dist/esm/core/account/utils/index.mjs +1 -19
  253. package/dist/esm/core/accountAddress.mjs +1 -15
  254. package/dist/esm/core/authenticationKey.mjs +1 -14
  255. package/dist/esm/core/common.mjs +1 -7
  256. package/dist/esm/core/crypto/ed25519.mjs +1 -29
  257. package/dist/esm/core/crypto/ephemeral.mjs +1 -28
  258. package/dist/esm/core/crypto/hdKey.mjs +1 -25
  259. package/dist/esm/core/crypto/index.mjs +1 -124
  260. package/dist/esm/core/crypto/keyless.mjs +1 -55
  261. package/dist/esm/core/crypto/multiEd25519.mjs +1 -28
  262. package/dist/esm/core/crypto/multiKey.mjs +1 -34
  263. package/dist/esm/core/crypto/poseidon.mjs +1 -15
  264. package/dist/esm/core/crypto/privateKey.mjs +1 -1
  265. package/dist/esm/core/crypto/proof.mjs +1 -19
  266. package/dist/esm/core/crypto/publicKey.mjs +1 -21
  267. package/dist/esm/core/crypto/secp256k1.mjs +1 -27
  268. package/dist/esm/core/crypto/signature.mjs +1 -19
  269. package/dist/esm/core/crypto/singleKey.mjs +1 -33
  270. package/dist/esm/core/crypto/utils.mjs +1 -9
  271. package/dist/esm/core/hex.mjs +1 -10
  272. package/dist/esm/core/index.mjs +1 -141
  273. package/dist/esm/index.mjs +1 -635
  274. package/dist/esm/internal/account.mjs +1 -106
  275. package/dist/esm/internal/ans.mjs +1 -120
  276. package/dist/esm/internal/coin.mjs +1 -85
  277. package/dist/esm/internal/digitalAsset.mjs +1 -127
  278. package/dist/esm/internal/event.mjs +1 -55
  279. package/dist/esm/internal/faucet.mjs +1 -52
  280. package/dist/esm/internal/fungibleAsset.mjs +1 -91
  281. package/dist/esm/internal/general.mjs +1 -46
  282. package/dist/esm/internal/keyless.mjs +1 -73
  283. package/dist/esm/internal/staking.mjs +1 -53
  284. package/dist/esm/internal/transaction.mjs +1 -51
  285. package/dist/esm/internal/transactionSubmission.mjs +1 -102
  286. package/dist/esm/internal/view.mjs +1 -83
  287. package/dist/esm/transactions/authenticator/account.mjs +1 -44
  288. package/dist/esm/transactions/authenticator/index.mjs +1 -60
  289. package/dist/esm/transactions/authenticator/transaction.mjs +1 -48
  290. package/dist/esm/transactions/index.mjs +1 -284
  291. package/dist/esm/transactions/instances/chainId.mjs +1 -11
  292. package/dist/esm/transactions/instances/identifier.mjs +1 -11
  293. package/dist/esm/transactions/instances/index.mjs +1 -96
  294. package/dist/esm/transactions/instances/moduleId.mjs +1 -38
  295. package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -43
  296. package/dist/esm/transactions/instances/rawTransaction.mjs +1 -48
  297. package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -20
  298. package/dist/esm/transactions/instances/signedTransaction.mjs +1 -45
  299. package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -43
  300. package/dist/esm/transactions/instances/transactionArgument.mjs +1 -1
  301. package/dist/esm/transactions/instances/transactionPayload.mjs +1 -56
  302. package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -74
  303. package/dist/esm/transactions/management/asyncQueue.mjs +1 -9
  304. package/dist/esm/transactions/management/index.mjs +1 -95
  305. package/dist/esm/transactions/management/transactionWorker.mjs +1 -91
  306. package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -75
  307. package/dist/esm/transactions/transactionBuilder/index.mjs +1 -162
  308. package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -85
  309. package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -58
  310. package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +1 -1
  311. package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -98
  312. package/dist/esm/transactions/typeTag/index.mjs +1 -74
  313. package/dist/esm/transactions/typeTag/parser.mjs +1 -43
  314. package/dist/esm/transactions/types.mjs +1 -1
  315. package/dist/esm/types/generated/queries.mjs +1 -57
  316. package/dist/esm/types/generated/types.mjs +1 -809
  317. package/dist/esm/types/generated/types.mjs.map +1 -1
  318. package/dist/esm/types/index.mjs +1 -68
  319. package/dist/esm/types/indexer.mjs +1 -1
  320. package/dist/esm/types/keyless.mjs +1 -9
  321. package/dist/esm/utils/apiEndpoints.mjs +1 -21
  322. package/dist/esm/utils/const.mjs +1 -21
  323. package/dist/esm/utils/helpers.mjs +1 -7
  324. package/dist/esm/utils/index.mjs +1 -56
  325. package/dist/esm/utils/memoize.mjs +1 -9
  326. package/dist/esm/utils/normalizeBundle.mjs +1 -19
  327. package/dist/esm/version.d.mts +1 -1
  328. package/dist/esm/version.mjs +1 -7
  329. package/package.json +2 -2
  330. package/src/account/KeylessAccount.ts +1 -2
  331. package/src/transactions/transactionBuilder/transactionBuilder.ts +16 -2
  332. package/src/version.ts +1 -1
  333. package/dist/common/chunk-QRI7EC4T.js +0 -24
  334. package/dist/common/chunk-QRI7EC4T.js.map +0 -1
  335. package/dist/esm/chunk-2JOCR2VL.mjs +0 -32
  336. package/dist/esm/chunk-2OQW7BMN.mjs +0 -129
  337. package/dist/esm/chunk-2TJJWII2.mjs +0 -23
  338. package/dist/esm/chunk-2ZEGJU43.mjs +0 -252
  339. package/dist/esm/chunk-4OYYOYSO.mjs +0 -336
  340. package/dist/esm/chunk-55NODGHC.mjs +0 -135
  341. package/dist/esm/chunk-6LRQSBRH.mjs +0 -130
  342. package/dist/esm/chunk-6MSZMIFW.mjs +0 -23
  343. package/dist/esm/chunk-76TSTAU4.mjs +0 -120
  344. package/dist/esm/chunk-7FO3S6IZ.mjs +0 -324
  345. package/dist/esm/chunk-7FUHWL6A.mjs +0 -42
  346. package/dist/esm/chunk-7IDBB4J4.mjs +0 -33
  347. package/dist/esm/chunk-7JRMOHBP.mjs +0 -247
  348. package/dist/esm/chunk-7REUIYF4.mjs +0 -63
  349. package/dist/esm/chunk-AC3OGAL6.mjs +0 -87
  350. package/dist/esm/chunk-AR7X6GWQ.mjs +0 -356
  351. package/dist/esm/chunk-ASF2VWOX.mjs +0 -142
  352. package/dist/esm/chunk-ATVFVXR6.mjs +0 -43
  353. package/dist/esm/chunk-B5S6DDUD.mjs +0 -120
  354. package/dist/esm/chunk-BXMHDQHW.mjs +0 -512
  355. package/dist/esm/chunk-CC4DQ6NH.mjs +0 -19
  356. package/dist/esm/chunk-CMNJG4NN.mjs +0 -345
  357. package/dist/esm/chunk-CTJSZT5V.mjs +0 -87
  358. package/dist/esm/chunk-CX3NAVRD.mjs +0 -205
  359. package/dist/esm/chunk-CXUGZXED.mjs +0 -307
  360. package/dist/esm/chunk-D2BVBXWO.mjs +0 -7
  361. package/dist/esm/chunk-DGV7DYU4.mjs +0 -413
  362. package/dist/esm/chunk-DIYZRGR6.mjs +0 -242
  363. package/dist/esm/chunk-DNPMS2OF.mjs +0 -236
  364. package/dist/esm/chunk-DVPQGCFT.mjs +0 -74
  365. package/dist/esm/chunk-EYHRMZPO.mjs +0 -34
  366. package/dist/esm/chunk-F2ZWA7B7.mjs +0 -412
  367. package/dist/esm/chunk-FDWJNY4U.mjs +0 -22
  368. package/dist/esm/chunk-FF4JPDKD.mjs +0 -315
  369. package/dist/esm/chunk-FQQW55X7.mjs +0 -288
  370. package/dist/esm/chunk-FXKSE3ZP.mjs +0 -25
  371. package/dist/esm/chunk-GBEVD2VM.mjs +0 -99
  372. package/dist/esm/chunk-GGMTQAQP.mjs +0 -11
  373. package/dist/esm/chunk-GSVQ6EUD.mjs +0 -649
  374. package/dist/esm/chunk-HBNSRCZN.mjs +0 -100
  375. package/dist/esm/chunk-IC56GQFJ.mjs +0 -127
  376. package/dist/esm/chunk-IHNPN5CQ.mjs +0 -256
  377. package/dist/esm/chunk-JHDHNGJ3.mjs +0 -126
  378. package/dist/esm/chunk-JL2JHVS4.mjs +0 -49
  379. package/dist/esm/chunk-JV3GSIJW.mjs +0 -268
  380. package/dist/esm/chunk-JV3GSIJW.mjs.map +0 -1
  381. package/dist/esm/chunk-KK2BSALW.mjs +0 -32
  382. package/dist/esm/chunk-KMXSRHJ6.mjs +0 -93
  383. package/dist/esm/chunk-KVSQ57HU.mjs +0 -45
  384. package/dist/esm/chunk-LI2QV6RU.mjs +0 -129
  385. package/dist/esm/chunk-LLLQJWRZ.mjs +0 -35
  386. package/dist/esm/chunk-LYK4TQZO.mjs +0 -70
  387. package/dist/esm/chunk-LYMY63SO.mjs +0 -124
  388. package/dist/esm/chunk-MZZLEY6O.mjs +0 -92
  389. package/dist/esm/chunk-N4WKFNQ6.mjs +0 -156
  390. package/dist/esm/chunk-NFJCQRVK.mjs +0 -37
  391. package/dist/esm/chunk-NMKCJNQM.mjs +0 -20
  392. package/dist/esm/chunk-NW45SCPY.mjs +0 -36
  393. package/dist/esm/chunk-NXFO2W4G.mjs +0 -84
  394. package/dist/esm/chunk-NYL77J4X.mjs +0 -97
  395. package/dist/esm/chunk-O6PSHSN3.mjs +0 -53
  396. package/dist/esm/chunk-OR7TEZ25.mjs +0 -16
  397. package/dist/esm/chunk-PCLNX6FS.mjs +0 -17
  398. package/dist/esm/chunk-PIMQHG2J.mjs +0 -49
  399. package/dist/esm/chunk-PU5AFUX3.mjs +0 -52
  400. package/dist/esm/chunk-PYLOAMR2.mjs +0 -29
  401. package/dist/esm/chunk-QBBTUC66.mjs +0 -15
  402. package/dist/esm/chunk-QFOG4LIN.mjs +0 -319
  403. package/dist/esm/chunk-QMM2KL6C.mjs +0 -12
  404. package/dist/esm/chunk-RCQMWXEW.mjs +0 -35
  405. package/dist/esm/chunk-RX4VG2AT.mjs +0 -314
  406. package/dist/esm/chunk-SBB4YEPT.mjs +0 -17
  407. package/dist/esm/chunk-SIJELMDP.mjs +0 -29
  408. package/dist/esm/chunk-SS3NUM5L.mjs +0 -94
  409. package/dist/esm/chunk-ST4QXIMI.mjs +0 -37
  410. package/dist/esm/chunk-TBHU6ZW6.mjs +0 -215
  411. package/dist/esm/chunk-TLNHRJB2.mjs +0 -155
  412. package/dist/esm/chunk-U3IUCR2G.mjs +0 -54
  413. package/dist/esm/chunk-U7QBZ6PP.mjs +0 -400
  414. package/dist/esm/chunk-U7QBZ6PP.mjs.map +0 -1
  415. package/dist/esm/chunk-UEBBLQJ5.mjs +0 -94
  416. package/dist/esm/chunk-UKU6A2W2.mjs +0 -232
  417. package/dist/esm/chunk-UX5NSZEN.mjs +0 -134
  418. package/dist/esm/chunk-VDJBDX3A.mjs +0 -79
  419. package/dist/esm/chunk-VJP2VWMF.mjs +0 -58
  420. package/dist/esm/chunk-VKJQORON.mjs +0 -93
  421. package/dist/esm/chunk-VPWUODU4.mjs +0 -51
  422. package/dist/esm/chunk-VZQXLVEP.mjs +0 -197
  423. package/dist/esm/chunk-W76MGKZB.mjs +0 -33
  424. package/dist/esm/chunk-WDRH2URB.mjs +0 -91
  425. package/dist/esm/chunk-WHBWEN6N.mjs +0 -206
  426. package/dist/esm/chunk-WK5ZSNE2.mjs +0 -173
  427. package/dist/esm/chunk-WLTBF4DF.mjs +0 -22
  428. package/dist/esm/chunk-WVGO4D7K.mjs +0 -254
  429. package/dist/esm/chunk-XANFAUBD.mjs +0 -44
  430. package/dist/esm/chunk-Y2LV3S5W.mjs +0 -410
  431. package/dist/esm/chunk-YV7M4CFP.mjs +0 -137
  432. package/dist/esm/chunk-YYOPNUX5.mjs +0 -41
  433. package/dist/esm/chunk-ZAHJ7KXB.mjs +0 -81
  434. package/dist/esm/chunk-ZMFKQUHL.mjs +0 -117
  435. /package/dist/esm/{chunk-OR7TEZ25.mjs.map → chunk-FVA2OPG4.mjs.map} +0 -0
@@ -1,232 +0,0 @@
1
- import {
2
- Ed25519PublicKey,
3
- Ed25519Signature
4
- } from "./chunk-RX4VG2AT.mjs";
5
- import {
6
- Signature
7
- } from "./chunk-FDWJNY4U.mjs";
8
- import {
9
- AccountPublicKey
10
- } from "./chunk-FXKSE3ZP.mjs";
11
- import {
12
- AuthenticationKey
13
- } from "./chunk-UEBBLQJ5.mjs";
14
-
15
- // src/core/crypto/multiEd25519.ts
16
- var _MultiEd25519PublicKey = class _MultiEd25519PublicKey extends AccountPublicKey {
17
- /**
18
- * Public key for a K-of-N multi-sig transaction. A K-of-N multi-sig transaction means that for such a
19
- * transaction to be executed, at least K out of the N authorized signers have signed the transaction
20
- * and passed the check conducted by the chain.
21
- *
22
- * @see {@link
23
- * https://aptos.dev/integration/creating-a-signed-transaction/ | Creating a Signed Transaction}
24
- *
25
- * @param args.publicKeys A list of public keys
26
- * @param args.threshold At least "threshold" signatures must be valid
27
- */
28
- constructor(args) {
29
- super();
30
- const { publicKeys, threshold } = args;
31
- if (publicKeys.length > _MultiEd25519PublicKey.MAX_KEYS || publicKeys.length < _MultiEd25519PublicKey.MIN_KEYS) {
32
- throw new Error(
33
- `Must have between ${_MultiEd25519PublicKey.MIN_KEYS} and ${_MultiEd25519PublicKey.MAX_KEYS} public keys, inclusive`
34
- );
35
- }
36
- if (threshold < _MultiEd25519PublicKey.MIN_THRESHOLD || threshold > publicKeys.length) {
37
- throw new Error(
38
- `Threshold must be between ${_MultiEd25519PublicKey.MIN_THRESHOLD} and ${publicKeys.length}, inclusive`
39
- );
40
- }
41
- this.publicKeys = publicKeys;
42
- this.threshold = threshold;
43
- }
44
- // region AccountPublicKey
45
- verifySignature(args) {
46
- const { message, signature } = args;
47
- if (!(signature instanceof MultiEd25519Signature)) {
48
- return false;
49
- }
50
- const indices = [];
51
- for (let i = 0; i < 4; i += 1) {
52
- for (let j = 0; j < 8; j += 1) {
53
- const bitIsSet = (signature.bitmap[i] & 1 << 7 - j) !== 0;
54
- if (bitIsSet) {
55
- const index = i * 8 + j;
56
- indices.push(index);
57
- }
58
- }
59
- }
60
- if (indices.length !== signature.signatures.length) {
61
- throw new Error("Bitmap and signatures length mismatch");
62
- }
63
- if (indices.length < this.threshold) {
64
- throw new Error("Not enough signatures");
65
- }
66
- for (let i = 0; i < indices.length; i += 1) {
67
- const publicKey = this.publicKeys[indices[i]];
68
- if (!publicKey.verifySignature({ message, signature: signature.signatures[i] })) {
69
- return false;
70
- }
71
- }
72
- return true;
73
- }
74
- authKey() {
75
- return AuthenticationKey.fromSchemeAndBytes({
76
- scheme: 1 /* MultiEd25519 */,
77
- input: this.toUint8Array()
78
- });
79
- }
80
- /**
81
- * Converts a PublicKeys into Uint8Array (bytes) with: bytes = p1_bytes | ... | pn_bytes | threshold
82
- */
83
- toUint8Array() {
84
- const bytes = new Uint8Array(this.publicKeys.length * Ed25519PublicKey.LENGTH + 1);
85
- this.publicKeys.forEach((k, i) => {
86
- bytes.set(k.toUint8Array(), i * Ed25519PublicKey.LENGTH);
87
- });
88
- bytes[this.publicKeys.length * Ed25519PublicKey.LENGTH] = this.threshold;
89
- return bytes;
90
- }
91
- // endregion
92
- // region Serializable
93
- serialize(serializer) {
94
- serializer.serializeBytes(this.toUint8Array());
95
- }
96
- static deserialize(deserializer) {
97
- const bytes = deserializer.deserializeBytes();
98
- const threshold = bytes[bytes.length - 1];
99
- const keys = [];
100
- for (let i = 0; i < bytes.length - 1; i += Ed25519PublicKey.LENGTH) {
101
- const begin = i;
102
- keys.push(new Ed25519PublicKey(bytes.subarray(begin, begin + Ed25519PublicKey.LENGTH)));
103
- }
104
- return new _MultiEd25519PublicKey({ publicKeys: keys, threshold });
105
- }
106
- // endregion
107
- };
108
- /**
109
- * Maximum number of public keys supported
110
- */
111
- _MultiEd25519PublicKey.MAX_KEYS = 32;
112
- /**
113
- * Minimum number of public keys needed
114
- */
115
- _MultiEd25519PublicKey.MIN_KEYS = 2;
116
- /**
117
- * Minimum threshold for the number of valid signatures required
118
- */
119
- _MultiEd25519PublicKey.MIN_THRESHOLD = 1;
120
- var MultiEd25519PublicKey = _MultiEd25519PublicKey;
121
- var _MultiEd25519Signature = class _MultiEd25519Signature extends Signature {
122
- /**
123
- * Signature for a K-of-N multi-sig transaction.
124
- *
125
- * @see {@link
126
- * https://aptos.dev/integration/creating-a-signed-transaction/#multisignature-transactions | Creating a Signed Transaction}
127
- *
128
- * @param args.signatures A list of signatures
129
- * @param args.bitmap 4 bytes, at most 32 signatures are supported. If Nth bit value is `1`, the Nth
130
- * signature should be provided in `signatures`. Bits are read from left to right.
131
- * Alternatively, you can specify an array of bitmap positions.
132
- * Valid position should range between 0 and 31.
133
- * @see MultiEd25519Signature.createBitmap
134
- */
135
- constructor(args) {
136
- super();
137
- const { signatures, bitmap } = args;
138
- if (signatures.length > _MultiEd25519Signature.MAX_SIGNATURES_SUPPORTED) {
139
- throw new Error(
140
- `The number of signatures cannot be greater than ${_MultiEd25519Signature.MAX_SIGNATURES_SUPPORTED}`
141
- );
142
- }
143
- this.signatures = signatures;
144
- if (!(bitmap instanceof Uint8Array)) {
145
- this.bitmap = _MultiEd25519Signature.createBitmap({ bits: bitmap });
146
- } else if (bitmap.length !== _MultiEd25519Signature.BITMAP_LEN) {
147
- throw new Error(`"bitmap" length should be ${_MultiEd25519Signature.BITMAP_LEN}`);
148
- } else {
149
- this.bitmap = bitmap;
150
- }
151
- }
152
- // region AccountSignature
153
- /**
154
- * Converts a MultiSignature into Uint8Array (bytes) with `bytes = s1_bytes | ... | sn_bytes | bitmap`
155
- */
156
- toUint8Array() {
157
- const bytes = new Uint8Array(this.signatures.length * Ed25519Signature.LENGTH + _MultiEd25519Signature.BITMAP_LEN);
158
- this.signatures.forEach((k, i) => {
159
- bytes.set(k.toUint8Array(), i * Ed25519Signature.LENGTH);
160
- });
161
- bytes.set(this.bitmap, this.signatures.length * Ed25519Signature.LENGTH);
162
- return bytes;
163
- }
164
- // endregion
165
- // region Serializable
166
- serialize(serializer) {
167
- serializer.serializeBytes(this.toUint8Array());
168
- }
169
- static deserialize(deserializer) {
170
- const bytes = deserializer.deserializeBytes();
171
- const bitmap = bytes.subarray(bytes.length - 4);
172
- const signatures = [];
173
- for (let i = 0; i < bytes.length - bitmap.length; i += Ed25519Signature.LENGTH) {
174
- const begin = i;
175
- signatures.push(new Ed25519Signature(bytes.subarray(begin, begin + Ed25519Signature.LENGTH)));
176
- }
177
- return new _MultiEd25519Signature({ signatures, bitmap });
178
- }
179
- // endregion
180
- /**
181
- * Helper method to create a bitmap out of the specified bit positions
182
- * @param args.bits The bitmap positions that should be set. A position starts at index 0.
183
- * Valid position should range between 0 and 31.
184
- * @example
185
- * Here's an example of valid `bits`
186
- * ```
187
- * [0, 2, 31]
188
- * ```
189
- * `[0, 2, 31]` means the 1st, 3rd and 32nd bits should be set in the bitmap.
190
- * The result bitmap should be 0b1010000000000000000000000000001
191
- *
192
- * @returns bitmap that is 32bit long
193
- */
194
- static createBitmap(args) {
195
- const { bits } = args;
196
- const firstBitInByte = 128;
197
- const bitmap = new Uint8Array([0, 0, 0, 0]);
198
- const dupCheckSet = /* @__PURE__ */ new Set();
199
- bits.forEach((bit, index) => {
200
- if (bit >= _MultiEd25519Signature.MAX_SIGNATURES_SUPPORTED) {
201
- throw new Error(`Cannot have a signature larger than ${_MultiEd25519Signature.MAX_SIGNATURES_SUPPORTED - 1}.`);
202
- }
203
- if (dupCheckSet.has(bit)) {
204
- throw new Error("Duplicate bits detected.");
205
- }
206
- if (index > 0 && bit <= bits[index - 1]) {
207
- throw new Error("The bits need to be sorted in ascending order.");
208
- }
209
- dupCheckSet.add(bit);
210
- const byteOffset = Math.floor(bit / 8);
211
- let byte = bitmap[byteOffset];
212
- byte |= firstBitInByte >> bit % 8;
213
- bitmap[byteOffset] = byte;
214
- });
215
- return bitmap;
216
- }
217
- };
218
- /**
219
- * Maximum number of Ed25519 signatures supported
220
- */
221
- _MultiEd25519Signature.MAX_SIGNATURES_SUPPORTED = 32;
222
- /**
223
- * Number of bytes in the bitmap representing who signed the transaction (32-bits)
224
- */
225
- _MultiEd25519Signature.BITMAP_LEN = 4;
226
- var MultiEd25519Signature = _MultiEd25519Signature;
227
-
228
- export {
229
- MultiEd25519PublicKey,
230
- MultiEd25519Signature
231
- };
232
- //# sourceMappingURL=chunk-UKU6A2W2.mjs.map
@@ -1,134 +0,0 @@
1
- import {
2
- getCurrentFungibleAssetBalances,
3
- getFungibleAssetActivities,
4
- getFungibleAssetMetadata,
5
- transferFungibleAsset
6
- } from "./chunk-NYL77J4X.mjs";
7
- import {
8
- waitForIndexerOnVersion
9
- } from "./chunk-CC4DQ6NH.mjs";
10
-
11
- // src/api/fungibleAsset.ts
12
- var FungibleAsset = class {
13
- constructor(config) {
14
- this.config = config;
15
- }
16
- /**
17
- * Queries all fungible asset metadata.
18
- *
19
- * @example
20
- * const fungibleAsset = await aptos.getFungibleAssetMetadata()
21
- *
22
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
23
- * @param args.options Optional configuration for pagination and filtering
24
- *
25
- * @returns A list of fungible asset metadata
26
- */
27
- async getFungibleAssetMetadata(args) {
28
- await waitForIndexerOnVersion({
29
- config: this.config,
30
- minimumLedgerVersion: args?.minimumLedgerVersion,
31
- processorType: "fungible_asset_processor" /* FUNGIBLE_ASSET_PROCESSOR */
32
- });
33
- return getFungibleAssetMetadata({ aptosConfig: this.config, ...args });
34
- }
35
- /**
36
- * Queries a fungible asset metadata
37
- *
38
- * This query returns the fungible asset metadata for a specific fungible asset.
39
- *
40
- * @example
41
- * const fungibleAsset = await aptos.getFungibleAssetMetadataByAssetType({assetType:"0x123::test_coin::TestCoin"})
42
- *
43
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
44
- * @param args.assetType The asset type of the fungible asset.
45
- * e.g
46
- * "0x1::aptos_coin::AptosCoin" for Aptos Coin
47
- * "0xc2948283c2ce03aafbb294821de7ee684b06116bb378ab614fa2de07a99355a8" - address format if this is fungible asset
48
- *
49
- * @returns A fungible asset metadata item
50
- */
51
- async getFungibleAssetMetadataByAssetType(args) {
52
- await waitForIndexerOnVersion({
53
- config: this.config,
54
- minimumLedgerVersion: args?.minimumLedgerVersion,
55
- processorType: "fungible_asset_processor" /* FUNGIBLE_ASSET_PROCESSOR */
56
- });
57
- const data = await getFungibleAssetMetadata({
58
- aptosConfig: this.config,
59
- options: {
60
- where: {
61
- asset_type: { _eq: args.assetType }
62
- }
63
- }
64
- });
65
- return data[0];
66
- }
67
- /**
68
- * Queries all fungible asset activities
69
- *
70
- * @example
71
- * const fungibleAssetActivities = await aptos.getFungibleAssetActivities()
72
- *
73
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
74
- * @param args.options Optional configuration for pagination and filtering
75
- *
76
- * @returns A list of fungible asset metadata
77
- */
78
- async getFungibleAssetActivities(args) {
79
- await waitForIndexerOnVersion({
80
- config: this.config,
81
- minimumLedgerVersion: args?.minimumLedgerVersion,
82
- processorType: "fungible_asset_processor" /* FUNGIBLE_ASSET_PROCESSOR */
83
- });
84
- return getFungibleAssetActivities({ aptosConfig: this.config, ...args });
85
- }
86
- /**
87
- * Queries all fungible asset balances
88
- *
89
- * @example
90
- * const fungibleAssetBalances = await aptos.getCurrentFungibleAssetBalances()
91
- *
92
- * @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
93
- * @param args.options Optional configuration for pagination and filtering
94
- *
95
- * @returns A list of fungible asset metadata
96
- */
97
- async getCurrentFungibleAssetBalances(args) {
98
- await waitForIndexerOnVersion({
99
- config: this.config,
100
- minimumLedgerVersion: args?.minimumLedgerVersion,
101
- processorType: "fungible_asset_processor" /* FUNGIBLE_ASSET_PROCESSOR */
102
- });
103
- return getCurrentFungibleAssetBalances({ aptosConfig: this.config, ...args });
104
- }
105
- /**
106
- * Transfer `amount` of fungible asset from sender's primary store to recipient's primary store.
107
- *
108
- * Use this method to transfer any fungible asset including fungible token.
109
- *
110
- * @example
111
- * const transaction = await aptos.transferFungibleAsset({
112
- * sender: alice,
113
- * fungibleAssetMetadataAddress: "0x123",
114
- * recipient: "0x456",
115
- * amount: 5
116
- * })
117
- *
118
- * @param sender The sender account
119
- * @param fungibleAssetMetadataAddress The fungible asset account address.
120
- * For example if you’re transferring USDT this would be the USDT address
121
- * @param recipient The recipient account address
122
- * @param amount Number of assets to transfer
123
- *
124
- * @returns A SimpleTransaction that can be simulated or submitted to chain.
125
- */
126
- async transferFungibleAsset(args) {
127
- return transferFungibleAsset({ aptosConfig: this.config, ...args });
128
- }
129
- };
130
-
131
- export {
132
- FungibleAsset
133
- };
134
- //# sourceMappingURL=chunk-UX5NSZEN.mjs.map
@@ -1,79 +0,0 @@
1
- import {
2
- Ed25519Account
3
- } from "./chunk-KMXSRHJ6.mjs";
4
- import {
5
- SingleKeyAccount
6
- } from "./chunk-JHDHNGJ3.mjs";
7
- import {
8
- Ed25519PrivateKey
9
- } from "./chunk-RX4VG2AT.mjs";
10
-
11
- // src/account/Account.ts
12
- var Account = class {
13
- static generate(args = {}) {
14
- const { scheme = 0 /* Ed25519 */, legacy = true } = args;
15
- if (scheme === 0 /* Ed25519 */ && legacy) {
16
- return Ed25519Account.generate();
17
- }
18
- return SingleKeyAccount.generate({ scheme });
19
- }
20
- static fromPrivateKey(args) {
21
- const { privateKey, address, legacy = true } = args;
22
- if (privateKey instanceof Ed25519PrivateKey && legacy) {
23
- return new Ed25519Account({
24
- privateKey,
25
- address
26
- });
27
- }
28
- return new SingleKeyAccount({ privateKey, address });
29
- }
30
- /**
31
- * @deprecated use `fromPrivateKey` instead.
32
- * Instantiates an account given a private key and a specified account address.
33
- * This is primarily used to instantiate an `Account` that has had its authentication key rotated.
34
- *
35
- * @param args.privateKey PrivateKey - the underlying private key for the account
36
- * @param args.address AccountAddress - The account address the `Account` will sign for
37
- * @param args.legacy optional. If set to false, the keypair generated is a Unified keypair. Defaults
38
- * to generating a Legacy Ed25519 keypair
39
- *
40
- * @returns Account
41
- */
42
- static fromPrivateKeyAndAddress(args) {
43
- return this.fromPrivateKey(args);
44
- }
45
- static fromDerivationPath(args) {
46
- const { scheme = 0 /* Ed25519 */, mnemonic, path, legacy = true } = args;
47
- if (scheme === 0 /* Ed25519 */ && legacy) {
48
- return Ed25519Account.fromDerivationPath({ mnemonic, path });
49
- }
50
- return SingleKeyAccount.fromDerivationPath({ scheme, mnemonic, path });
51
- }
52
- /**
53
- * @deprecated use `publicKey.authKey()` instead.
54
- * This key enables account owners to rotate their private key(s)
55
- * associated with the account without changing the address that hosts their account.
56
- * See here for more info: {@link https://aptos.dev/concepts/accounts#single-signer-authentication}
57
- *
58
- * @param args.publicKey PublicKey - public key of the account
59
- * @returns The authentication key for the associated account
60
- */
61
- static authKey(args) {
62
- const { publicKey } = args;
63
- return publicKey.authKey();
64
- }
65
- /**
66
- * Verify the given message and signature with the public key.
67
- * @param args.message raw message data in HexInput format
68
- * @param args.signature signed message Signature
69
- * @returns
70
- */
71
- verifySignature(args) {
72
- return this.publicKey.verifySignature(args);
73
- }
74
- };
75
-
76
- export {
77
- Account
78
- };
79
- //# sourceMappingURL=chunk-VDJBDX3A.mjs.map
@@ -1,58 +0,0 @@
1
- import {
2
- FeePayerRawTransaction,
3
- MultiAgentRawTransaction
4
- } from "./chunk-2OQW7BMN.mjs";
5
- import {
6
- RAW_TRANSACTION_SALT,
7
- RAW_TRANSACTION_WITH_DATA_SALT
8
- } from "./chunk-NFJCQRVK.mjs";
9
-
10
- // src/transactions/transactionBuilder/signingMessage.ts
11
- import { sha3_256 as sha3Hash } from "@noble/hashes/sha3";
12
- function deriveTransactionType(transaction) {
13
- if (transaction.feePayerAddress) {
14
- return new FeePayerRawTransaction(
15
- transaction.rawTransaction,
16
- transaction.secondarySignerAddresses ?? [],
17
- transaction.feePayerAddress
18
- );
19
- }
20
- if (transaction.secondarySignerAddresses) {
21
- return new MultiAgentRawTransaction(transaction.rawTransaction, transaction.secondarySignerAddresses);
22
- }
23
- return transaction.rawTransaction;
24
- }
25
- function generateSigningMessage(bytes, domainSeparator) {
26
- const hash = sha3Hash.create();
27
- if (!domainSeparator.startsWith("APTOS::")) {
28
- throw new Error(`Domain separator needs to start with 'APTOS::'. Provided - ${domainSeparator}`);
29
- }
30
- hash.update(domainSeparator);
31
- const prefix = hash.digest();
32
- const body = bytes;
33
- const mergedArray = new Uint8Array(prefix.length + body.length);
34
- mergedArray.set(prefix);
35
- mergedArray.set(body, prefix.length);
36
- return mergedArray;
37
- }
38
- function generateSigningMessageForSerializable(serializable) {
39
- return generateSigningMessage(serializable.bcsToBytes(), `APTOS::${serializable.constructor.name}`);
40
- }
41
- function generateSigningMessageForTransaction(transaction) {
42
- const rawTxn = deriveTransactionType(transaction);
43
- if (transaction.feePayerAddress) {
44
- return generateSigningMessage(rawTxn.bcsToBytes(), RAW_TRANSACTION_WITH_DATA_SALT);
45
- }
46
- if (transaction.secondarySignerAddresses) {
47
- return generateSigningMessage(rawTxn.bcsToBytes(), RAW_TRANSACTION_WITH_DATA_SALT);
48
- }
49
- return generateSigningMessage(rawTxn.bcsToBytes(), RAW_TRANSACTION_SALT);
50
- }
51
-
52
- export {
53
- deriveTransactionType,
54
- generateSigningMessage,
55
- generateSigningMessageForSerializable,
56
- generateSigningMessageForTransaction
57
- };
58
- //# sourceMappingURL=chunk-VJP2VWMF.mjs.map
@@ -1,93 +0,0 @@
1
- import {
2
- AptosApiError
3
- } from "./chunk-PCLNX6FS.mjs";
4
- import {
5
- VERSION
6
- } from "./chunk-D2BVBXWO.mjs";
7
-
8
- // src/client/core.ts
9
- var errors = {
10
- 400: "Bad Request",
11
- 401: "Unauthorized",
12
- 403: "Forbidden",
13
- 404: "Not Found",
14
- 429: "Too Many Requests",
15
- 500: "Internal Server Error",
16
- 502: "Bad Gateway",
17
- 503: "Service Unavailable"
18
- };
19
- async function request(options, client) {
20
- const { url, method, body, contentType, params, overrides, originMethod } = options;
21
- const headers = {
22
- ...overrides?.HEADERS,
23
- "x-aptos-client": `aptos-typescript-sdk/${VERSION}`,
24
- "content-type": contentType ?? "application/json" /* JSON */,
25
- "x-aptos-typescript-sdk-origin-method": originMethod
26
- };
27
- if (overrides?.AUTH_TOKEN) {
28
- headers.Authorization = `Bearer ${overrides?.AUTH_TOKEN}`;
29
- }
30
- if (overrides?.API_KEY) {
31
- headers.Authorization = `Bearer ${overrides?.API_KEY}`;
32
- }
33
- return client.provider({
34
- url,
35
- method,
36
- body,
37
- params,
38
- headers,
39
- overrides
40
- });
41
- }
42
- async function aptosRequest(options, aptosConfig, apiType) {
43
- const { url, path } = options;
44
- const fullUrl = path ? `${url}/${path}` : url;
45
- const response = await request({ ...options, url: fullUrl }, aptosConfig.client);
46
- const result = {
47
- status: response.status,
48
- statusText: response.statusText,
49
- data: response.data,
50
- headers: response.headers,
51
- config: response.config,
52
- request: response.request,
53
- url: fullUrl
54
- };
55
- if (result.status === 401) {
56
- throw new AptosApiError(options, result, `Error: ${result.data}`);
57
- }
58
- if (apiType === "Indexer" /* INDEXER */) {
59
- const indexerResponse = result.data;
60
- if (indexerResponse.errors) {
61
- throw new AptosApiError(
62
- options,
63
- result,
64
- `Indexer error: ${indexerResponse.errors[0].message}` ?? `Indexer unhandled Error ${response.status} : ${response.statusText}`
65
- );
66
- }
67
- result.data = indexerResponse.data;
68
- }
69
- if (result.status >= 200 && result.status < 300) {
70
- return result;
71
- }
72
- if (result.status >= 500) {
73
- throw new AptosApiError(options, result, `${response.data}`);
74
- }
75
- if (aptosConfig.isPepperServiceRequest(url) || aptosConfig.isProverServiceRequest(url)) {
76
- throw new AptosApiError(options, result, `${response.data}`);
77
- }
78
- let errorMessage;
79
- if (result && result.data && "message" in result.data && "error_code" in result.data) {
80
- errorMessage = JSON.stringify(result.data);
81
- } else if (result.status in errors) {
82
- errorMessage = errors[result.status];
83
- } else {
84
- errorMessage = `Unhandled Error ${result.status} : ${result.statusText}`;
85
- }
86
- throw new AptosApiError(options, result, `${apiType} error: ${errorMessage}`);
87
- }
88
-
89
- export {
90
- request,
91
- aptosRequest
92
- };
93
- //# sourceMappingURL=chunk-VKJQORON.mjs.map
@@ -1,51 +0,0 @@
1
- import {
2
- RawTransaction
3
- } from "./chunk-2OQW7BMN.mjs";
4
- import {
5
- AccountAddress
6
- } from "./chunk-CMNJG4NN.mjs";
7
- import {
8
- Serializable
9
- } from "./chunk-FQQW55X7.mjs";
10
-
11
- // src/transactions/instances/simpleTransaction.ts
12
- var SimpleTransaction = class _SimpleTransaction extends Serializable {
13
- /**
14
- * SimpleTransaction represents a simple transaction type of a single signer that
15
- * can be submitted to Aptos chain for execution.
16
- *
17
- * SimpleTransaction metadata contains the Raw Transaction and an optional
18
- * sponsor Account Address to pay the gas fees.
19
- *
20
- * @param rawTransaction The Raw Tranasaction
21
- * @param feePayerAddress The sponsor Account Address
22
- */
23
- constructor(rawTransaction, feePayerAddress) {
24
- super();
25
- this.rawTransaction = rawTransaction;
26
- this.feePayerAddress = feePayerAddress;
27
- }
28
- serialize(serializer) {
29
- this.rawTransaction.serialize(serializer);
30
- if (this.feePayerAddress === void 0) {
31
- serializer.serializeBool(false);
32
- } else {
33
- serializer.serializeBool(true);
34
- this.feePayerAddress.serialize(serializer);
35
- }
36
- }
37
- static deserialize(deserializer) {
38
- const rawTransaction = RawTransaction.deserialize(deserializer);
39
- const feepayerPresent = deserializer.deserializeBool();
40
- let feePayerAddress;
41
- if (feepayerPresent) {
42
- feePayerAddress = AccountAddress.deserialize(deserializer);
43
- }
44
- return new _SimpleTransaction(rawTransaction, feePayerAddress);
45
- }
46
- };
47
-
48
- export {
49
- SimpleTransaction
50
- };
51
- //# sourceMappingURL=chunk-VPWUODU4.mjs.map